summaryrefslogtreecommitdiff
path: root/libstdc++-v3
diff options
context:
space:
mode:
authorBenjamin Kosnik <bkoz@redhat.com>2005-06-27 15:33:38 +0000
committerBenjamin Kosnik <bkoz@gcc.gnu.org>2005-06-27 15:33:38 +0000
commitfd1e17264b0e1b9adaf0cd2302b2f33a2e036b0c (patch)
tree0df480a2eef205a44aee318644b3d0b7c574b6a6 /libstdc++-v3
parentd4d3b0fffae3a6ad0979efdb6f1834c2c3711bfe (diff)
downloadgcc-fd1e17264b0e1b9adaf0cd2302b2f33a2e036b0c.tar.gz
documentation.html: Add link for policy based associative containers docs.
2005-06-27 Benjamin Kosnik <bkoz@redhat.com> Ami Tavory <pbassoc@gmail.com> * docs/html/documentation.html: Add link for policy based associative containers docs. * docs/html/ext/pb_assoc/Std_hash_set_impl.jpg: New. * docs/html/ext/pb_assoc/acks.html: New. * docs/html/ext/pb_assoc/balls_and_bins.jpg: New. * docs/html/ext/pb_assoc/basic_assoc_cntnr.html: New. * docs/html/ext/pb_assoc/basic_assoc_cntnr_compound_data.html: New. * docs/html/ext/pb_assoc/basic_assoc_cntnr_no_data.html: New. * docs/html/ext/pb_assoc/basic_ds_tag.html: New. * docs/html/ext/pb_assoc/basic_hash_assoc_cntnr.html: New. * docs/html/ext/pb_assoc/basic_hash_ds_tag.html: New. * docs/html/ext/pb_assoc/basic_invalidation_guarantee.html: New. * docs/html/ext/pb_assoc/basic_ms_tag.html: New. * docs/html/ext/pb_assoc/basic_tree_assoc_cntnr.html: New. * docs/html/ext/pb_assoc/ basic_tree_assoc_cntnr_const_node_iterator.html: New. * docs/html/ext/pb_assoc/ basic_tree_assoc_cntnr_node_iterator.html: New. * docs/html/ext/pb_assoc/basic_tree_assoc_cntnr_rev.html: New. * docs/html/ext/pb_assoc/basic_tree_assoc_cntnr_rev_it.html: New. * docs/html/ext/pb_assoc/basic_tree_ds_tag.html: New. * docs/html/ext/pb_assoc/cc_hash_assoc_cntnr.html: New. * docs/html/ext/pb_assoc/cc_hash_ds_tag.html: New. * docs/html/ext/pb_assoc/ cc_hash_max_collision_check_resize_trigger.html: New. * docs/html/ext/pb_assoc/cc_hash_policy_cd.jpg: New. * docs/html/ext/pb_assoc/cd.jpg: New. * docs/html/ext/pb_assoc/component_requirements.html: New. * docs/html/ext/pb_assoc/compound_data_enabled_ms_tag.html: New. * docs/html/ext/pb_assoc/compound_data_type.html: New. * docs/html/ext/pb_assoc/compound_ds_tag.html: New. * docs/html/ext/pb_assoc/concepts.html: New. * docs/html/ext/pb_assoc/contact.html: New. * docs/html/ext/pb_assoc/counter_update_metadata.html: New. * docs/html/ext/pb_assoc/counter_update_policy.html: New. * docs/html/ext/pb_assoc/data_enabled_ms_tag.html: New. * docs/html/ext/pb_assoc/design.html: New. * docs/html/ext/pb_assoc/different_underlying_dss.jpg: New. * docs/html/ext/pb_assoc/direct_mask_range_hashing.html: New. * docs/html/ext/pb_assoc/direct_mod_range_hashing.html: New. * docs/html/ext/pb_assoc/disclaimer.html: New. * docs/html/ext/pb_assoc/ds_gen.html: New. * docs/html/ext/pb_assoc/ds_tag_cd.jpg: New. * docs/html/ext/pb_assoc/ds_traits.html: New. * docs/html/ext/pb_assoc/embedded_lists_1.jpg: New. * docs/html/ext/pb_assoc/embedded_lists_2.jpg: New. * docs/html/ext/pb_assoc/examples.html: New. * docs/html/ext/pb_assoc/exception_guarantees_specifics.html: New. * docs/html/ext/pb_assoc/find_invalidation_guarantee.html: New. * docs/html/ext/pb_assoc/find_iterators_cd.jpg: New. * docs/html/ext/pb_assoc/find_iterators_range_ops_1.jpg: New. * docs/html/ext/pb_assoc/find_iterators_range_ops_2.jpg: New. * docs/html/ext/pb_assoc/generics.html: New. * docs/html/ext/pb_assoc/gp_hash_assoc_cntnr.html: New. * docs/html/ext/pb_assoc/gp_hash_ds_tag.html: New. * docs/html/ext/pb_assoc/gp_hash_policy_cd.jpg: New. * docs/html/ext/pb_assoc/hash_and_probe_general.html: New. * docs/html/ext/pb_assoc/hash_based_containers.html: New. * docs/html/ext/pb_assoc/hash_cd.jpg: New. * docs/html/ext/pb_assoc/hash_exponential_size_policy.html: New. * docs/html/ext/pb_assoc/hash_fn.html: New. * docs/html/ext/pb_assoc/hash_load_check_resize_trigger.html: New. * docs/html/ext/pb_assoc/hash_policies.html: New. * docs/html/ext/pb_assoc/hash_policy_cd.jpg: New. * docs/html/ext/pb_assoc/hash_prime_size_policy.html: New. * docs/html/ext/pb_assoc/hash_range_hashing_seq_diagram.jpg: New. * docs/html/ext/pb_assoc/hash_range_hashing_seq_diagram2.jpg: New. * docs/html/ext/pb_assoc/hash_ranged_hash_range_hashing_fns.jpg: New. * docs/html/ext/pb_assoc/hash_standard_resize_policy.html: New. * docs/html/ext/pb_assoc/home.html: New. * docs/html/ext/pb_assoc/index.html: New. * docs/html/ext/pb_assoc/insert_resize_sequence_diagram1.jpg: New. * docs/html/ext/pb_assoc/insert_resize_sequence_diagram2.jpg: New. * docs/html/ext/pb_assoc/insert_resize_sequence_diagram3.jpg: New. * docs/html/ext/pb_assoc/insert_type_methods.html: New. * docs/html/ext/pb_assoc/interface.html: New. * docs/html/ext/pb_assoc/interval_node_invariants.jpg: New. * docs/html/ext/pb_assoc/introduction.html: New. * docs/html/ext/pb_assoc/invalidation_guarantee_cd.jpg: New. * docs/html/ext/pb_assoc/invalidation_guarantee_erase.jpg: New. * docs/html/ext/pb_assoc/lib_download.html: New. * docs/html/ext/pb_assoc/linear_probe_fn.html: New. * docs/html/ext/pb_assoc/list_updates.html: New. * docs/html/ext/pb_assoc/lu_assoc_cntnr.html: New. * docs/html/ext/pb_assoc/lu_based_containers.html: New. * docs/html/ext/pb_assoc/lu_cd.jpg: New. * docs/html/ext/pb_assoc/lu_ds_tag.html: New. * docs/html/ext/pb_assoc/lu_ops.jpg: New. * docs/html/ext/pb_assoc/mmap_value_utils.html: New. * docs/html/ext/pb_assoc/motivation.html: New. * docs/html/ext/pb_assoc/move_to_front_update_metadata.html: New. * docs/html/ext/pb_assoc/move_to_front_update_policy.html: New. * docs/html/ext/pb_assoc/ms_cd.jpg: New. * docs/html/ext/pb_assoc/ms_gen.html: New. * docs/html/ext/pb_assoc/ms_tag_cd.jpg: New. * docs/html/ext/pb_assoc/ms_traits.html: New. * docs/html/ext/pb_assoc/node_invariant_invalidations.jpg: New. * docs/html/ext/pb_assoc/node_invariants.html: New. * docs/html/ext/pb_assoc/node_invariants.jpg: New. * docs/html/ext/pb_assoc/non_unique_mapping.html: New. * docs/html/ext/pb_assoc/non_unique_mapping_containers.jpg: New. * docs/html/ext/pb_assoc/null_data_type.html: New. * docs/html/ext/pb_assoc/null_hash_fn.html: New. * docs/html/ext/pb_assoc/null_probe_fn.html: New. * docs/html/ext/pb_assoc/order_by_key.html: New. * docs/html/ext/pb_assoc/order_statistics_key.html: New. * docs/html/ext/pb_assoc/order_statistics_key_cmp.html: New. * docs/html/ext/pb_assoc/order_statistics_node_updator.html: New. * docs/html/ext/pb_assoc/ov_tree_ds_tag.html: New. * docs/html/ext/pb_assoc/overview.html: New. * docs/html/ext/pb_assoc/pb_assoc_ex.html: New. * docs/html/ext/pb_assoc/portability.html: New. * docs/html/ext/pb_assoc/quadratic_probe_fn.html: New. * docs/html/ext/pb_assoc/range_invalidation_guarantee.html: New. * docs/html/ext/pb_assoc/rank_node_invariants.jpg: New. * docs/html/ext/pb_assoc/rationale_null_node_updator.jpg: New. * docs/html/ext/pb_assoc/rb_tree_ds_tag.html: New. * docs/html/ext/pb_assoc/reference_iterator.jpg: New. * docs/html/ext/pb_assoc/references.html: New. * docs/html/ext/pb_assoc/regression_tests.html: New. * docs/html/ext/pb_assoc/resize_general.html: New. * docs/html/ext/pb_assoc/resize_policies.html: New. * docs/html/ext/pb_assoc/resize_policy_cd.jpg: New. * docs/html/ext/pb_assoc/restoring_node_invariants.jpg: New. * docs/html/ext/pb_assoc/sample_node_updator.hpp: New. * docs/html/ext/pb_assoc/sample_probe_fn.hpp: New. * docs/html/ext/pb_assoc/sample_probe_fn.html: New. * docs/html/ext/pb_assoc/sample_range_hashing.hpp: New. * docs/html/ext/pb_assoc/sample_range_hashing.html: New. * docs/html/ext/pb_assoc/sample_ranged_hash_fn.hpp: New. * docs/html/ext/pb_assoc/sample_ranged_hash_fn.html: New. * docs/html/ext/pb_assoc/sample_ranged_probe_fn.hpp: New. * docs/html/ext/pb_assoc/sample_ranged_probe_fn.html: New. * docs/html/ext/pb_assoc/sample_resize_policy.hpp: New. * docs/html/ext/pb_assoc/sample_resize_policy.html: New. * docs/html/ext/pb_assoc/sample_resize_trigger.hpp: New. * docs/html/ext/pb_assoc/sample_size_policy.hpp: New. * docs/html/ext/pb_assoc/sample_update_policy.hpp: New. * docs/html/ext/pb_assoc/size_policies_general.html: New. * docs/html/ext/pb_assoc/splay_tree_ds_tag.html: New. * docs/html/ext/pb_assoc/timing_tests.html: New. * docs/html/ext/pb_assoc/toc.html: New. * docs/html/ext/pb_assoc/tree_assoc_cntnr.html: New. * docs/html/ext/pb_assoc/ tree_assoc_cntnr_const_node_iterator.html: New. * docs/html/ext/pb_assoc/tree_assoc_cntnr_node_iterator.html: New. * docs/html/ext/pb_assoc/tree_based_containers.html: New. * docs/html/ext/pb_assoc/tree_cd.jpg: New. * docs/html/ext/pb_assoc/trigger_policies_general.html: New. * docs/html/ext/pb_assoc/tutorial.html: New. * docs/html/ext/pb_assoc/update_seq_diagram.jpg: New. * include/Makefile.am: Add assoc_srcdir, assoc_builddir, assoc_subdir, assoc_headers. * include/Makefile.in: Regenerate. * include/ext/typelist.h: New. * include/ext/pb_assoc/assoc_cntnr.hpp: New. * include/ext/pb_assoc/data_type.hpp: New. * include/ext/pb_assoc/ds_trait.hpp: New. * include/ext/pb_assoc/exception.hpp: New. * include/ext/pb_assoc/hash_policy.hpp: New. * include/ext/pb_assoc/lu_policy.hpp: New. * include/ext/pb_assoc/ms_trait.hpp: New. * include/ext/pb_assoc/tree_policy.hpp: New. * include/ext/pb_assoc/trivial_iterator_def.hpp: New. * include/ext/pb_assoc/detail/assoc_cntnr_base.hpp: New. * include/ext/pb_assoc/detail/cond_dealtor.hpp: New. * include/ext/pb_assoc/detail/constructors_destructor_fn_imps.hpp: New. * include/ext/pb_assoc/detail/ds_trait_imp.hpp: New. * include/ext/pb_assoc/detail/hash_types_traits.hpp: New. * include/ext/pb_assoc/detail/map_debug_base.hpp: New. * include/ext/pb_assoc/detail/mapping_level_imp.hpp: New. * include/ext/pb_assoc/detail/ms_category_imp.hpp: New. * include/ext/pb_assoc/detail/ms_trait_imp.hpp: New. * include/ext/pb_assoc/detail/order_statistics_imp.hpp: New. * include/ext/pb_assoc/detail/standard_policies.hpp: New. * include/ext/pb_assoc/detail/standard_sizes.hpp: New. * include/ext/pb_assoc/detail/type_utils.hpp: New. * include/ext/pb_assoc/detail/typelist.hpp: New. * include/ext/pb_assoc/detail/types_traits.hpp: New. * include/ext/pb_assoc/detail/basic_assoc_cntnr/ constructor_destructor_fn_imps.hpp: New. * include/ext/pb_assoc/detail/basic_assoc_cntnr/ constructors_destructor_fn_imps.hpp: New. * include/ext/pb_assoc/detail/basic_assoc_cntnr/d_extract_key.hpp: New. * include/ext/pb_assoc/detail/basic_assoc_cntnr/ d_find_fn_imps.hpp: New. * include/ext/pb_assoc/detail/basic_assoc_cntnr/ d_insert_fn_imps.hpp: New. * include/ext/pb_assoc/detail/basic_assoc_cntnr/erase_fn_imps.hpp: New. * include/ext/pb_assoc/detail/basic_assoc_cntnr/extract_key.hpp: New. * include/ext/pb_assoc/detail/basic_assoc_cntnr/info_fn_imps.hpp: New. * include/ext/pb_assoc/detail/basic_assoc_cntnr/ insert_fn_imps.hpp: New. * include/ext/pb_assoc/detail/basic_assoc_cntnr/ iterators_fn_imps.hpp: New. * include/ext/pb_assoc/detail/basic_hash_assoc_cntnr/ constructor_destructor_fn_imps.hpp: New. * include/ext/pb_assoc/detail/basic_hash_assoc_cntnr/ constructors_destructor_fn_imps.hpp: New. * include/ext/pb_assoc/detail/basic_hash_assoc_cntnr/ resize_fn_imps.hpp: New. * include/ext/pb_assoc/detail/basic_tree_assoc_cntnr/ constructor_destructor_fn_imps.hpp: New. * include/ext/pb_assoc/detail/basic_tree_assoc_cntnr/ constructors_destructor_fn_imps.hpp: New. * include/ext/pb_assoc/detail/basic_tree_assoc_cntnr/ erase_fn_imps.hpp: New. * include/ext/pb_assoc/detail/basic_tree_assoc_cntnr/ node_iteration_fn_imps.hpp: New. * include/ext/pb_assoc/detail/basic_tree_assoc_cntnr/ policy_access_fn_imps.hpp: New. * include/ext/pb_assoc/detail/basic_tree_assoc_cntnr/ r_erase_fn_imps.hpp: New. * include/ext/pb_assoc/detail/basic_tree_assoc_cntnr/ r_range_iteration_fn_imps.hpp: New. * include/ext/pb_assoc/detail/basic_tree_assoc_cntnr/ range_iteration_fn_imps.hpp: New. * include/ext/pb_assoc/detail/basic_tree_assoc_cntnr/ split_join_fn_imps.hpp: New. * include/ext/pb_assoc/detail/bin_search_tree_/ bin_search_tree_.hpp: New. * include/ext/pb_assoc/detail/bin_search_tree_/ cond_dtor_entry_dealtor.hpp: New. * include/ext/pb_assoc/detail/bin_search_tree_/ cond_key_dtor_entry_dealtor.hpp: New. * include/ext/pb_assoc/detail/bin_search_tree_/ constructors_destructor_fn_imps.hpp: New. * include/ext/pb_assoc/detail/bin_search_tree_/debug_fn_imps.hpp: New. * include/ext/pb_assoc/detail/bin_search_tree_/erase_fn_imps.hpp: New. * include/ext/pb_assoc/detail/bin_search_tree_/find_fn_imps.hpp: New. * include/ext/pb_assoc/detail/bin_search_tree_/find_iterators.hpp: New. * include/ext/pb_assoc/detail/bin_search_tree_/info_fn_imps.hpp: New. * include/ext/pb_assoc/detail/bin_search_tree_/insert_fn_imps.hpp: New. * include/ext/pb_assoc/detail/bin_search_tree_/ iterators_fn_imps.hpp: New. * include/ext/pb_assoc/detail/bin_search_tree_/node_iterators.hpp: New. * include/ext/pb_assoc/detail/bin_search_tree_/ r_erase_fn_imps.hpp: New. * include/ext/pb_assoc/detail/bin_search_tree_/rotate_fn_imps.hpp: New. * include/ext/pb_assoc/detail/bin_search_tree_/ split_join_fn_imps.hpp: New. * include/ext/pb_assoc/detail/cc_hash_assoc_cntnr/ constructor_destructor_fn_imps.hpp: New. * include/ext/pb_assoc/detail/cc_ht_map_/cc_ht_map_.hpp: New. * include/ext/pb_assoc/detail/cc_ht_map_/cmp_fn_imps.hpp: New. * include/ext/pb_assoc/detail/cc_ht_map_/ cond_key_dtor_entry_dealtor.hpp: New. * include/ext/pb_assoc/detail/cc_ht_map_/ constructor_destructor_fn_imps.hpp: New. * include/ext/pb_assoc/detail/cc_ht_map_/ constructor_destructor_no_store_hash_fn_imps.hpp: New. * include/ext/pb_assoc/detail/cc_ht_map_/ constructor_destructor_store_hash_fn_imps.hpp: New. * include/ext/pb_assoc/detail/cc_ht_map_/debug_fn_imps.hpp: New. * include/ext/pb_assoc/detail/cc_ht_map_/ debug_no_store_hash_fn_imps.hpp: New. * include/ext/pb_assoc/detail/cc_ht_map_/ debug_store_hash_fn_imps.hpp: New. * include/ext/pb_assoc/detail/cc_ht_map_/entry_list_fn_imps.hpp: New. * include/ext/pb_assoc/detail/cc_ht_map_/erase_fn_imps.hpp: New. * include/ext/pb_assoc/detail/cc_ht_map_/ erase_no_store_hash_fn_imps.hpp: New. * include/ext/pb_assoc/detail/cc_ht_map_/ erase_store_hash_fn_imps.hpp: New. * include/ext/pb_assoc/detail/cc_ht_map_/ find_fn_imps.hpp: New. * include/ext/pb_assoc/detail/cc_ht_map_/ find_no_store_hash_fn_imps.hpp: New. * include/ext/pb_assoc/detail/cc_ht_map_/ find_store_hash_fn_imps.hpp: New. * include/ext/pb_assoc/detail/cc_ht_map_/info_fn_imps.hpp: New. * include/ext/pb_assoc/detail/cc_ht_map_/insert_fn_imps.hpp: New. * include/ext/pb_assoc/detail/cc_ht_map_/ insert_no_store_hash_fn_imps.hpp: New. * include/ext/pb_assoc/detail/cc_ht_map_/ insert_store_hash_fn_imps.hpp: New. * include/ext/pb_assoc/detail/cc_ht_map_/iterators_fn_imps.hpp: New. * include/ext/pb_assoc/detail/cc_ht_map_/ policy_access_fn_imps.hpp: New. * include/ext/pb_assoc/detail/cc_ht_map_/resize_fn_imps.hpp: New. * include/ext/pb_assoc/detail/cc_ht_map_/ resize_no_store_hash_fn_imps.hpp: New. * include/ext/pb_assoc/detail/cc_ht_map_/ resize_store_hash_fn_imps.hpp: New. * include/ext/pb_assoc/detail/cc_ht_map_/size_fn_imps.hpp: New. * include/ext/pb_assoc/detail/cc_ht_map_/standard_policies.hpp: New. * include/ext/pb_assoc/detail/eq_fn/eq_by_less.hpp: New. * include/ext/pb_assoc/detail/eq_fn/hash_eq_fn.hpp: New. * include/ext/pb_assoc/detail/gp_hash_assoc_cntnr/ constructor_destructor_fn_imps.hpp: New. * include/ext/pb_assoc/detail/gp_ht_map_/ constructor_destructor_fn_imps.hpp: New. * include/ext/pb_assoc/detail/gp_ht_map_/ constructor_destructor_no_store_hash_fn_imps.hpp: New. * include/ext/pb_assoc/detail/gp_ht_map_/ constructor_destructor_store_hash_fn_imps.hpp: New. * include/ext/pb_assoc/detail/gp_ht_map_/debug_fn_imps.hpp: New. * include/ext/pb_assoc/detail/gp_ht_map_/ debug_no_store_hash_fn_imps.hpp: New. * include/ext/pb_assoc/detail/gp_ht_map_/ debug_store_hash_fn_imps.hpp: New. * include/ext/pb_assoc/detail/gp_ht_map_/erase_fn_imps.hpp: New. * include/ext/pb_assoc/detail/gp_ht_map_/ erase_no_store_hash_fn_imps.hpp: New. * include/ext/pb_assoc/detail/gp_ht_map_/ erase_store_hash_fn_imps.hpp: New. * include/ext/pb_assoc/detail/gp_ht_map_/find_fn_imps.hpp: New. * include/ext/pb_assoc/detail/gp_ht_map_/ find_no_store_hash_fn_imps.hpp: New. * include/ext/pb_assoc/detail/gp_ht_map_/ find_store_hash_fn_imps.hpp: New. * include/ext/pb_assoc/detail/gp_ht_map_/gp_ht_map_.hpp: New. * include/ext/pb_assoc/detail/gp_ht_map_/info_fn_imps.hpp: New. * include/ext/pb_assoc/detail/gp_ht_map_/insert_fn_imps.hpp: New. * include/ext/pb_assoc/detail/gp_ht_map_/ insert_no_store_hash_fn_imps.hpp: New. * include/ext/pb_assoc/detail/gp_ht_map_/ insert_store_hash_fn_imps.hpp: New. * include/ext/pb_assoc/detail/gp_ht_map_/iterator_fn_imps.hpp: New. * include/ext/pb_assoc/detail/gp_ht_map_/ policy_access_fn_imps.hpp: New. * include/ext/pb_assoc/detail/gp_ht_map_/resize_fn_imps.hpp: New. * include/ext/pb_assoc/detail/gp_ht_map_/ resize_no_store_hash_fn_imps.hpp: New. * include/ext/pb_assoc/detail/gp_ht_map_/ resize_store_hash_fn_imps.hpp: New. * include/ext/pb_assoc/detail/hash_fn/ direct_mask_range_hashing_imp.hpp: New. * include/ext/pb_assoc/detail/hash_fn/ direct_mod_range_hashing_imp.hpp: New. * include/ext/pb_assoc/detail/hash_fn/linear_probe_fn_imp.hpp: New. * include/ext/pb_assoc/detail/hash_fn/ mask_based_range_hashing.hpp: New. * include/ext/pb_assoc/detail/hash_fn/mod_based_range_hashing.hpp: New. * include/ext/pb_assoc/detail/hash_fn/probe_fn_base.hpp: New. * include/ext/pb_assoc/detail/hash_fn/quadratic_probe_fn_imp.hpp: New. * include/ext/pb_assoc/detail/hash_fn/ranged_hash_fn.hpp: New. * include/ext/pb_assoc/detail/hash_fn/ranged_probe_fn.hpp: New. * include/ext/pb_assoc/detail/lu_assoc_cntnr/ constructor_destructor_fn_imps.hpp: New. * include/ext/pb_assoc/detail/lu_assoc_cntnr/ policy_access_fn_imps.hpp: New. * include/ext/pb_assoc/detail/lu_map_/ constructor_destructor_fn_imps.hpp: New. * include/ext/pb_assoc/detail/lu_map_/debug_fn_imps.hpp: New. * include/ext/pb_assoc/detail/lu_map_/erase_fn_imps.hpp: New. * include/ext/pb_assoc/detail/lu_map_/find_fn_imps.hpp: New. * include/ext/pb_assoc/detail/lu_map_/info_fn_imps.hpp: New. * include/ext/pb_assoc/detail/lu_map_/insert_fn_imps.hpp: New. * include/ext/pb_assoc/detail/lu_map_/iterators_fn_imps.hpp: New. * include/ext/pb_assoc/detail/lu_map_/lu_map_.hpp: New. * include/ext/pb_assoc/detail/lu_map_/policy_access_fn_imps.hpp: New. * include/ext/pb_assoc/detail/lu_policy/ counter_lu_metadata_imp.hpp: New. * include/ext/pb_assoc/detail/lu_policy/counter_lu_policy_imp.hpp: New. * include/ext/pb_assoc/detail/lu_policy/mtf_lu_policy_imp.hpp: New. * include/ext/pb_assoc/detail/ov_tree_map_/cond_dtor.hpp: New. * include/ext/pb_assoc/detail/ov_tree_map_/ constructors_destructor_fn_imps.hpp: New. * include/ext/pb_assoc/detail/ov_tree_map_/debug_fn_imps.hpp: New. * include/ext/pb_assoc/detail/ov_tree_map_/erase_fn_imps.hpp: New. * include/ext/pb_assoc/detail/ov_tree_map_/find_fn_imps.hpp: New. * include/ext/pb_assoc/detail/ov_tree_map_/info_fn_imps.hpp: New. * include/ext/pb_assoc/detail/ov_tree_map_/insert_fn_imps.hpp: New. * include/ext/pb_assoc/detail/ov_tree_map_/iterators_fn_imps.hpp: New. * include/ext/pb_assoc/detail/ov_tree_map_/node_iterators.hpp: New. * include/ext/pb_assoc/detail/ov_tree_map_/ov_tree_map_.hpp: New. * include/ext/pb_assoc/detail/ov_tree_map_/split_join_fn_imps.hpp: New. * include/ext/pb_assoc/detail/rb_tree_map_/ constructors_destructor_fn_imps.hpp: New. * include/ext/pb_assoc/detail/rb_tree_map_/debug_fn_imps.hpp: New. * include/ext/pb_assoc/detail/rb_tree_map_/erase_fn_imps.hpp: New. * include/ext/pb_assoc/detail/rb_tree_map_/find_fn_imps.hpp: New. * include/ext/pb_assoc/detail/rb_tree_map_/info_fn_imps.hpp: New. * include/ext/pb_assoc/detail/rb_tree_map_/insert_fn_imps.hpp: New. * include/ext/pb_assoc/detail/rb_tree_map_/node.hpp: New. * include/ext/pb_assoc/detail/rb_tree_map_/rb_tree_.hpp: New. * include/ext/pb_assoc/detail/rb_tree_map_/split_join_fn_imps.hpp: New. * include/ext/pb_assoc/detail/resize_policy/ cc_hash_max_collision_resize_trigger_imp.hpp: New. * include/ext/pb_assoc/detail/resize_policy/ hash_exponential_size_policy_imp.hpp: New. * include/ext/pb_assoc/detail/resize_policy/ hash_load_check_resize_trigger_imp.hpp: New. * include/ext/pb_assoc/detail/resize_policy/ hash_prime_size_policy_imp.hpp: New. * include/ext/pb_assoc/detail/resize_policy/ hash_standard_resize_policy_imp.hpp: New. * include/ext/pb_assoc/detail/resize_policy/ ht_prime_size_policy_imp.hpp: New. * include/ext/pb_assoc/detail/resize_policy/size_base.hpp: New. * include/ext/pb_assoc/detail/splay_tree_/ constructors_destructor_fn_imps.hpp: New. * include/ext/pb_assoc/detail/splay_tree_/debug_fn_imps.hpp: New. * include/ext/pb_assoc/detail/splay_tree_/erase_fn_imps.hpp: New. * include/ext/pb_assoc/detail/splay_tree_/find_fn_imps.hpp: New. * include/ext/pb_assoc/detail/splay_tree_/info_fn_imps.hpp: New. * include/ext/pb_assoc/detail/splay_tree_/insert_fn_imps.hpp: New. * include/ext/pb_assoc/detail/splay_tree_/node.hpp: New. * include/ext/pb_assoc/detail/splay_tree_/splay_fn_imps.hpp: New. * include/ext/pb_assoc/detail/splay_tree_/splay_tree_.hpp: New. * include/ext/pb_assoc/detail/splay_tree_/split_join_fn_imps.hpp: New. * include/ext/pb_assoc/detail/tree_assoc_cntnr/ constructor_destructor_fn_imps.hpp: New. * include/ext/pb_assoc/detail/tree_policy/ null_node_updator_imp.hpp: New. * include/ext/pb_assoc/detail/tree_policy/ order_statistics_imp.hpp: New. * include/ext/pb_assoc/detail/typelist/typelist_append.hpp: New. * include/ext/pb_assoc/detail/typelist/typelist_apply.hpp: New. * include/ext/pb_assoc/detail/typelist/typelist_at_index.hpp: New. * include/ext/pb_assoc/detail/typelist/typelist_contains.hpp: New. * include/ext/pb_assoc/detail/typelist/typelist_filter.hpp: New. * include/ext/pb_assoc/detail/typelist/typelist_transform.hpp: New. * include/ext/pb_assoc/detail/typelist/ typelist_typelist_append.hpp: New. * include/ext/pb_assoc/detail/unordered_iterator/ const_find_iterator.hpp: New. * include/ext/pb_assoc/detail/unordered_iterator/ const_iterator.hpp: New. * include/ext/pb_assoc/detail/unordered_iterator/ find_iterator.hpp: New. * include/ext/pb_assoc/detail/unordered_iterator/iterator.hpp: New. * include/ext/pb_assoc/detail/value_type_adapter/ constructor_destructor_and_related.hpp: New. * include/ext/pb_assoc/detail/value_type_adapter/ erase_fn_imps.hpp: New. * include/ext/pb_assoc/detail/value_type_adapter/ erase_if_pred.hpp: New. * include/ext/pb_assoc/detail/value_type_adapter/find_fn_imps.hpp: New. * include/ext/pb_assoc/detail/value_type_adapter/info_fn_imps.hpp: New. * include/ext/pb_assoc/detail/value_type_adapter/ insert_fn_imps.hpp: New. * include/ext/pb_assoc/detail/value_type_adapter/ invalidation_guarantee_selector.hpp: New. * include/ext/pb_assoc/detail/value_type_adapter/ it_value_type_traits.hpp: New. * include/ext/pb_assoc/detail/value_type_adapter/iterator.hpp: New. * include/ext/pb_assoc/detail/value_type_adapter/ iterator_fn_imps.hpp: New. * include/ext/pb_assoc/detail/value_type_adapter/ref_pair.hpp: New. * include/ext/pb_assoc/detail/value_type_adapter/ value_type_adapter.hpp: New. * include/ext/pb_assoc/detail/value_type_adapter/ value_type_traits.hpp: New. * testsuite/Makefile.am (CLEANFILES): Add .o, .dat, .cc. * testsuite/Makefile.in: Regenerate. * testsuite/testsuite_common_types.h: New. * testsuite/testsuite_visualization.h: New. * testsuite/ext/pb_assoc/example/basic_map.cc: New. * testsuite/ext/pb_assoc/example/basic_multimap.cc: New. * testsuite/ext/pb_assoc/example/basic_set.cc: New. * testsuite/ext/pb_assoc/example/ds_traits.cc: New. * testsuite/ext/pb_assoc/example/erase_if.cc: New. * testsuite/ext/pb_assoc/example/extract_key.cc: New. * testsuite/ext/pb_assoc/example/hash_find_neg.cc: New. * testsuite/ext/pb_assoc/example/hash_illegal_resize.cc: New. * testsuite/ext/pb_assoc/example/hash_initial_size.cc: New. * testsuite/ext/pb_assoc/example/hash_load_set_change.cc: New. * testsuite/ext/pb_assoc/example/hash_mod.cc: New. * testsuite/ext/pb_assoc/example/hash_resize.cc: New. * testsuite/ext/pb_assoc/example/hash_resize_neg.cc: New. * testsuite/ext/pb_assoc/example/hash_shift_mask.cc: New. * testsuite/ext/pb_assoc/example/mapping_level.cc: New. * testsuite/ext/pb_assoc/example/mapping_level_neg.cc: New. * testsuite/ext/pb_assoc/example/ms_traits.cc: New. * testsuite/ext/pb_assoc/example/ranged_hash.cc: New. * testsuite/ext/pb_assoc/example/store_hash.cc: New. * testsuite/ext/pb_assoc/example/tree_intervals.cc: New. * testsuite/ext/pb_assoc/example/tree_join.cc: New. * testsuite/ext/pb_assoc/example/tree_order_statistics.cc: New. * testsuite/ext/pb_assoc/example/tree_order_statistics_join.cc: New. * testsuite/ext/pb_assoc/example/tree_split.cc: New. * testsuite/performance/20_util/allocator/(insert.cc, insert_insert.cc, list_sort_search.cc, map_mt_find.cc, map_thread.cc, producer_consumer.cc): Recast to use typelists and move to... * testsuite/performance/23_containers/find/map.cc: New. * testsuite/performance/23_containers/index/map.cc: New. * testsuite/performance/23_containers/insert/associative.cc: New. * testsuite/performance/23_containers/insert/sequence.cc: New. * testsuite/performance/23_containers/insert_erase/associative.cc: New. * testsuite/performance/23_containers/producer_consumer/ (associative.cc, sequence.cc): New. * testsuite/performance/23_containers/sort_search/list.cc: New. * testsuite/performance/23_containers/container_benchmark.cc: Remove. * testsuite/performance/23_containers/map_create_fill.cc: Move... * testsuite/performance/23_containers/create/map.cc: ...here. * testsuite/performance/23_containers/set_create_from_sorted.cc: Move. * testsuite/performance/23_containers/create_from_sorted/set.cc: here. * testsuite/performance/23_containers/list_create_fill_sort.cc: Move... * testsuite/performance/23_containers/create_sort/list.cc: ...here. * testsuite/performance/23_containers/set_insert_from_sorted.cc: Move. * testsuite/performance/23_containers/insert_from_sorted/set.cc: here. Co-Authored-By: Ami Tavory <pbassoc@gmail.com> From-SVN: r101354
Diffstat (limited to 'libstdc++-v3')
-rw-r--r--libstdc++-v3/ChangeLog497
-rw-r--r--libstdc++-v3/docs/html/documentation.html1
-rw-r--r--libstdc++-v3/docs/html/ext/pb_assoc/Std_hash_set_impl.jpgbin0 -> 51488 bytes
-rw-r--r--libstdc++-v3/docs/html/ext/pb_assoc/acks.html46
-rw-r--r--libstdc++-v3/docs/html/ext/pb_assoc/balls_and_bins.jpgbin0 -> 18512 bytes
-rw-r--r--libstdc++-v3/docs/html/ext/pb_assoc/basic_assoc_cntnr.html1229
-rw-r--r--libstdc++-v3/docs/html/ext/pb_assoc/basic_assoc_cntnr_compound_data.html1244
-rw-r--r--libstdc++-v3/docs/html/ext/pb_assoc/basic_assoc_cntnr_no_data.html1046
-rw-r--r--libstdc++-v3/docs/html/ext/pb_assoc/basic_ds_tag.html41
-rw-r--r--libstdc++-v3/docs/html/ext/pb_assoc/basic_hash_assoc_cntnr.html609
-rw-r--r--libstdc++-v3/docs/html/ext/pb_assoc/basic_hash_ds_tag.html74
-rw-r--r--libstdc++-v3/docs/html/ext/pb_assoc/basic_invalidation_guarantee.html41
-rw-r--r--libstdc++-v3/docs/html/ext/pb_assoc/basic_ms_tag.html41
-rw-r--r--libstdc++-v3/docs/html/ext/pb_assoc/basic_tree_assoc_cntnr.html940
-rw-r--r--libstdc++-v3/docs/html/ext/pb_assoc/basic_tree_assoc_cntnr_const_node_iterator.html488
-rw-r--r--libstdc++-v3/docs/html/ext/pb_assoc/basic_tree_assoc_cntnr_node_iterator.html250
-rw-r--r--libstdc++-v3/docs/html/ext/pb_assoc/basic_tree_assoc_cntnr_rev.html771
-rw-r--r--libstdc++-v3/docs/html/ext/pb_assoc/basic_tree_assoc_cntnr_rev_it.html771
-rw-r--r--libstdc++-v3/docs/html/ext/pb_assoc/basic_tree_ds_tag.html74
-rw-r--r--libstdc++-v3/docs/html/ext/pb_assoc/cc_hash_assoc_cntnr.html679
-rw-r--r--libstdc++-v3/docs/html/ext/pb_assoc/cc_hash_ds_tag.html74
-rw-r--r--libstdc++-v3/docs/html/ext/pb_assoc/cc_hash_max_collision_check_resize_trigger.html701
-rw-r--r--libstdc++-v3/docs/html/ext/pb_assoc/cc_hash_policy_cd.jpgbin0 -> 27118 bytes
-rw-r--r--libstdc++-v3/docs/html/ext/pb_assoc/cd.jpgbin0 -> 58234 bytes
-rw-r--r--libstdc++-v3/docs/html/ext/pb_assoc/component_requirements.html51
-rw-r--r--libstdc++-v3/docs/html/ext/pb_assoc/compound_data_enabled_ms_tag.html41
-rw-r--r--libstdc++-v3/docs/html/ext/pb_assoc/compound_data_type.html128
-rw-r--r--libstdc++-v3/docs/html/ext/pb_assoc/compound_ds_tag.html77
-rw-r--r--libstdc++-v3/docs/html/ext/pb_assoc/concepts.html124
-rw-r--r--libstdc++-v3/docs/html/ext/pb_assoc/contact.html19
-rw-r--r--libstdc++-v3/docs/html/ext/pb_assoc/counter_update_metadata.html101
-rw-r--r--libstdc++-v3/docs/html/ext/pb_assoc/counter_update_policy.html380
-rw-r--r--libstdc++-v3/docs/html/ext/pb_assoc/data_enabled_ms_tag.html41
-rw-r--r--libstdc++-v3/docs/html/ext/pb_assoc/design.html23
-rw-r--r--libstdc++-v3/docs/html/ext/pb_assoc/different_underlying_dss.jpgbin0 -> 34944 bytes
-rw-r--r--libstdc++-v3/docs/html/ext/pb_assoc/direct_mask_range_hashing.html251
-rw-r--r--libstdc++-v3/docs/html/ext/pb_assoc/direct_mod_range_hashing.html228
-rw-r--r--libstdc++-v3/docs/html/ext/pb_assoc/disclaimer.html25
-rw-r--r--libstdc++-v3/docs/html/ext/pb_assoc/ds_gen.html368
-rw-r--r--libstdc++-v3/docs/html/ext/pb_assoc/ds_tag_cd.jpgbin0 -> 54661 bytes
-rw-r--r--libstdc++-v3/docs/html/ext/pb_assoc/ds_traits.html41
-rw-r--r--libstdc++-v3/docs/html/ext/pb_assoc/embedded_lists_1.jpgbin0 -> 24191 bytes
-rw-r--r--libstdc++-v3/docs/html/ext/pb_assoc/embedded_lists_2.jpgbin0 -> 23766 bytes
-rw-r--r--libstdc++-v3/docs/html/ext/pb_assoc/examples.html185
-rw-r--r--libstdc++-v3/docs/html/ext/pb_assoc/exception_guarantees_specifics.html31
-rw-r--r--libstdc++-v3/docs/html/ext/pb_assoc/find_invalidation_guarantee.html74
-rw-r--r--libstdc++-v3/docs/html/ext/pb_assoc/find_iterators_cd.jpgbin0 -> 48752 bytes
-rw-r--r--libstdc++-v3/docs/html/ext/pb_assoc/find_iterators_range_ops_1.jpgbin0 -> 18521 bytes
-rw-r--r--libstdc++-v3/docs/html/ext/pb_assoc/find_iterators_range_ops_2.jpgbin0 -> 25683 bytes
-rw-r--r--libstdc++-v3/docs/html/ext/pb_assoc/generics.html25
-rw-r--r--libstdc++-v3/docs/html/ext/pb_assoc/gp_hash_assoc_cntnr.html816
-rw-r--r--libstdc++-v3/docs/html/ext/pb_assoc/gp_hash_ds_tag.html74
-rw-r--r--libstdc++-v3/docs/html/ext/pb_assoc/gp_hash_policy_cd.jpgbin0 -> 39817 bytes
-rw-r--r--libstdc++-v3/docs/html/ext/pb_assoc/hash_and_probe_general.html45
-rw-r--r--libstdc++-v3/docs/html/ext/pb_assoc/hash_based_containers.html1056
-rw-r--r--libstdc++-v3/docs/html/ext/pb_assoc/hash_cd.jpgbin0 -> 54780 bytes
-rw-r--r--libstdc++-v3/docs/html/ext/pb_assoc/hash_exponential_size_policy.html267
-rw-r--r--libstdc++-v3/docs/html/ext/pb_assoc/hash_fn.html25
-rw-r--r--libstdc++-v3/docs/html/ext/pb_assoc/hash_load_check_resize_trigger.html744
-rw-r--r--libstdc++-v3/docs/html/ext/pb_assoc/hash_policies.html375
-rw-r--r--libstdc++-v3/docs/html/ext/pb_assoc/hash_policy_cd.jpgbin0 -> 59739 bytes
-rw-r--r--libstdc++-v3/docs/html/ext/pb_assoc/hash_prime_size_policy.html211
-rw-r--r--libstdc++-v3/docs/html/ext/pb_assoc/hash_range_hashing_seq_diagram.jpgbin0 -> 30271 bytes
-rw-r--r--libstdc++-v3/docs/html/ext/pb_assoc/hash_range_hashing_seq_diagram2.jpgbin0 -> 20756 bytes
-rw-r--r--libstdc++-v3/docs/html/ext/pb_assoc/hash_ranged_hash_range_hashing_fns.jpgbin0 -> 35579 bytes
-rw-r--r--libstdc++-v3/docs/html/ext/pb_assoc/hash_standard_resize_policy.html986
-rw-r--r--libstdc++-v3/docs/html/ext/pb_assoc/home.html56
-rw-r--r--libstdc++-v3/docs/html/ext/pb_assoc/index.html12
-rw-r--r--libstdc++-v3/docs/html/ext/pb_assoc/insert_resize_sequence_diagram1.jpgbin0 -> 66060 bytes
-rw-r--r--libstdc++-v3/docs/html/ext/pb_assoc/insert_resize_sequence_diagram2.jpgbin0 -> 43557 bytes
-rw-r--r--libstdc++-v3/docs/html/ext/pb_assoc/insert_resize_sequence_diagram3.jpgbin0 -> 39549 bytes
-rw-r--r--libstdc++-v3/docs/html/ext/pb_assoc/insert_type_methods.html42
-rw-r--r--libstdc++-v3/docs/html/ext/pb_assoc/interface.html342
-rw-r--r--libstdc++-v3/docs/html/ext/pb_assoc/interval_node_invariants.jpgbin0 -> 31555 bytes
-rw-r--r--libstdc++-v3/docs/html/ext/pb_assoc/introduction.html31
-rw-r--r--libstdc++-v3/docs/html/ext/pb_assoc/invalidation_guarantee_cd.jpgbin0 -> 23162 bytes
-rw-r--r--libstdc++-v3/docs/html/ext/pb_assoc/invalidation_guarantee_erase.jpgbin0 -> 56109 bytes
-rw-r--r--libstdc++-v3/docs/html/ext/pb_assoc/lib_download.html47
-rw-r--r--libstdc++-v3/docs/html/ext/pb_assoc/linear_probe_fn.html238
-rw-r--r--libstdc++-v3/docs/html/ext/pb_assoc/list_updates.html138
-rw-r--r--libstdc++-v3/docs/html/ext/pb_assoc/lu_assoc_cntnr.html570
-rw-r--r--libstdc++-v3/docs/html/ext/pb_assoc/lu_based_containers.html225
-rw-r--r--libstdc++-v3/docs/html/ext/pb_assoc/lu_cd.jpgbin0 -> 60906 bytes
-rw-r--r--libstdc++-v3/docs/html/ext/pb_assoc/lu_ds_tag.html74
-rw-r--r--libstdc++-v3/docs/html/ext/pb_assoc/lu_ops.jpgbin0 -> 36112 bytes
-rw-r--r--libstdc++-v3/docs/html/ext/pb_assoc/mmap_value_utils.html128
-rw-r--r--libstdc++-v3/docs/html/ext/pb_assoc/motivation.html281
-rw-r--r--libstdc++-v3/docs/html/ext/pb_assoc/move_to_front_update_metadata.html41
-rw-r--r--libstdc++-v3/docs/html/ext/pb_assoc/move_to_front_update_policy.html256
-rw-r--r--libstdc++-v3/docs/html/ext/pb_assoc/ms_cd.jpgbin0 -> 61973 bytes
-rw-r--r--libstdc++-v3/docs/html/ext/pb_assoc/ms_gen.html440
-rw-r--r--libstdc++-v3/docs/html/ext/pb_assoc/ms_tag_cd.jpgbin0 -> 21009 bytes
-rw-r--r--libstdc++-v3/docs/html/ext/pb_assoc/ms_traits.html131
-rw-r--r--libstdc++-v3/docs/html/ext/pb_assoc/node_invariant_invalidations.jpgbin0 -> 43521 bytes
-rw-r--r--libstdc++-v3/docs/html/ext/pb_assoc/node_invariants.html154
-rw-r--r--libstdc++-v3/docs/html/ext/pb_assoc/node_invariants.jpgbin0 -> 32622 bytes
-rw-r--r--libstdc++-v3/docs/html/ext/pb_assoc/non_unique_mapping.html404
-rw-r--r--libstdc++-v3/docs/html/ext/pb_assoc/non_unique_mapping_containers.jpgbin0 -> 19257 bytes
-rw-r--r--libstdc++-v3/docs/html/ext/pb_assoc/null_data_type.html41
-rw-r--r--libstdc++-v3/docs/html/ext/pb_assoc/null_hash_fn.html44
-rw-r--r--libstdc++-v3/docs/html/ext/pb_assoc/null_probe_fn.html44
-rw-r--r--libstdc++-v3/docs/html/ext/pb_assoc/order_by_key.html254
-rw-r--r--libstdc++-v3/docs/html/ext/pb_assoc/order_statistics_key.html373
-rw-r--r--libstdc++-v3/docs/html/ext/pb_assoc/order_statistics_key_cmp.html422
-rw-r--r--libstdc++-v3/docs/html/ext/pb_assoc/order_statistics_node_updator.html278
-rw-r--r--libstdc++-v3/docs/html/ext/pb_assoc/ov_tree_ds_tag.html74
-rw-r--r--libstdc++-v3/docs/html/ext/pb_assoc/overview.html139
-rw-r--r--libstdc++-v3/docs/html/ext/pb_assoc/pb_assoc_ex.html74
-rw-r--r--libstdc++-v3/docs/html/ext/pb_assoc/portability.html26
-rw-r--r--libstdc++-v3/docs/html/ext/pb_assoc/quadratic_probe_fn.html238
-rw-r--r--libstdc++-v3/docs/html/ext/pb_assoc/range_invalidation_guarantee.html74
-rw-r--r--libstdc++-v3/docs/html/ext/pb_assoc/rank_node_invariants.jpgbin0 -> 28798 bytes
-rw-r--r--libstdc++-v3/docs/html/ext/pb_assoc/rationale_null_node_updator.jpgbin0 -> 27057 bytes
-rw-r--r--libstdc++-v3/docs/html/ext/pb_assoc/rb_tree_ds_tag.html74
-rw-r--r--libstdc++-v3/docs/html/ext/pb_assoc/reference_iterator.jpgbin0 -> 32467 bytes
-rw-r--r--libstdc++-v3/docs/html/ext/pb_assoc/references.html94
-rw-r--r--libstdc++-v3/docs/html/ext/pb_assoc/regression_tests.html25
-rw-r--r--libstdc++-v3/docs/html/ext/pb_assoc/resize_general.html28
-rw-r--r--libstdc++-v3/docs/html/ext/pb_assoc/resize_policies.html487
-rw-r--r--libstdc++-v3/docs/html/ext/pb_assoc/resize_policy_cd.jpgbin0 -> 58948 bytes
-rw-r--r--libstdc++-v3/docs/html/ext/pb_assoc/restoring_node_invariants.jpgbin0 -> 26335 bytes
-rw-r--r--libstdc++-v3/docs/html/ext/pb_assoc/sample_node_updator.hpp116
-rw-r--r--libstdc++-v3/docs/html/ext/pb_assoc/sample_probe_fn.hpp121
-rw-r--r--libstdc++-v3/docs/html/ext/pb_assoc/sample_probe_fn.html177
-rw-r--r--libstdc++-v3/docs/html/ext/pb_assoc/sample_range_hashing.hpp147
-rw-r--r--libstdc++-v3/docs/html/ext/pb_assoc/sample_range_hashing.html213
-rw-r--r--libstdc++-v3/docs/html/ext/pb_assoc/sample_ranged_hash_fn.hpp141
-rw-r--r--libstdc++-v3/docs/html/ext/pb_assoc/sample_ranged_hash_fn.html129
-rw-r--r--libstdc++-v3/docs/html/ext/pb_assoc/sample_ranged_probe_fn.hpp143
-rw-r--r--libstdc++-v3/docs/html/ext/pb_assoc/sample_ranged_probe_fn.html129
-rw-r--r--libstdc++-v3/docs/html/ext/pb_assoc/sample_resize_policy.hpp310
-rw-r--r--libstdc++-v3/docs/html/ext/pb_assoc/sample_resize_policy.html536
-rw-r--r--libstdc++-v3/docs/html/ext/pb_assoc/sample_resize_trigger.hpp341
-rw-r--r--libstdc++-v3/docs/html/ext/pb_assoc/sample_size_policy.hpp140
-rw-r--r--libstdc++-v3/docs/html/ext/pb_assoc/sample_update_policy.hpp171
-rw-r--r--libstdc++-v3/docs/html/ext/pb_assoc/size_policies_general.html22
-rw-r--r--libstdc++-v3/docs/html/ext/pb_assoc/splay_tree_ds_tag.html74
-rw-r--r--libstdc++-v3/docs/html/ext/pb_assoc/timing_tests.html60
-rw-r--r--libstdc++-v3/docs/html/ext/pb_assoc/toc.html35
-rw-r--r--libstdc++-v3/docs/html/ext/pb_assoc/tree_assoc_cntnr.html493
-rw-r--r--libstdc++-v3/docs/html/ext/pb_assoc/tree_assoc_cntnr_const_node_iterator.html488
-rw-r--r--libstdc++-v3/docs/html/ext/pb_assoc/tree_assoc_cntnr_node_iterator.html250
-rw-r--r--libstdc++-v3/docs/html/ext/pb_assoc/tree_based_containers.html246
-rw-r--r--libstdc++-v3/docs/html/ext/pb_assoc/tree_cd.jpgbin0 -> 60672 bytes
-rw-r--r--libstdc++-v3/docs/html/ext/pb_assoc/trigger_policies_general.html23
-rw-r--r--libstdc++-v3/docs/html/ext/pb_assoc/tutorial.html66
-rw-r--r--libstdc++-v3/docs/html/ext/pb_assoc/update_seq_diagram.jpgbin0 -> 23396 bytes
-rw-r--r--libstdc++-v3/include/Makefile.am271
-rw-r--r--libstdc++-v3/include/Makefile.in268
-rw-r--r--libstdc++-v3/include/ext/pb_assoc/assoc_cntnr.hpp1590
-rw-r--r--libstdc++-v3/include/ext/pb_assoc/data_type.hpp (renamed from libstdc++-v3/testsuite/performance/23_containers/set_insert_from_sorted.cc)62
-rw-r--r--libstdc++-v3/include/ext/pb_assoc/detail/assoc_cntnr_base.hpp346
-rw-r--r--libstdc++-v3/include/ext/pb_assoc/detail/basic_assoc_cntnr/constructor_destructor_fn_imps.hpp164
-rw-r--r--libstdc++-v3/include/ext/pb_assoc/detail/basic_assoc_cntnr/constructors_destructor_fn_imps.hpp48
-rw-r--r--libstdc++-v3/include/ext/pb_assoc/detail/basic_assoc_cntnr/d_extract_key.hpp51
-rw-r--r--libstdc++-v3/include/ext/pb_assoc/detail/basic_assoc_cntnr/d_find_fn_imps.hpp51
-rw-r--r--libstdc++-v3/include/ext/pb_assoc/detail/basic_assoc_cntnr/d_insert_fn_imps.hpp51
-rw-r--r--libstdc++-v3/include/ext/pb_assoc/detail/basic_assoc_cntnr/erase_fn_imps.hpp68
-rw-r--r--libstdc++-v3/include/ext/pb_assoc/detail/basic_assoc_cntnr/extract_key.hpp51
-rw-r--r--libstdc++-v3/include/ext/pb_assoc/detail/basic_assoc_cntnr/info_fn_imps.hpp67
-rw-r--r--libstdc++-v3/include/ext/pb_assoc/detail/basic_assoc_cntnr/insert_fn_imps.hpp51
-rw-r--r--libstdc++-v3/include/ext/pb_assoc/detail/basic_assoc_cntnr/iterators_fn_imps.hpp76
-rw-r--r--libstdc++-v3/include/ext/pb_assoc/detail/basic_hash_assoc_cntnr/constructor_destructor_fn_imps.hpp50
-rw-r--r--libstdc++-v3/include/ext/pb_assoc/detail/basic_hash_assoc_cntnr/constructors_destructor_fn_imps.hpp50
-rw-r--r--libstdc++-v3/include/ext/pb_assoc/detail/basic_hash_assoc_cntnr/resize_fn_imps.hpp51
-rw-r--r--libstdc++-v3/include/ext/pb_assoc/detail/basic_tree_assoc_cntnr/constructor_destructor_fn_imps.hpp50
-rw-r--r--libstdc++-v3/include/ext/pb_assoc/detail/basic_tree_assoc_cntnr/constructors_destructor_fn_imps.hpp50
-rw-r--r--libstdc++-v3/include/ext/pb_assoc/detail/basic_tree_assoc_cntnr/erase_fn_imps.hpp60
-rw-r--r--libstdc++-v3/include/ext/pb_assoc/detail/basic_tree_assoc_cntnr/node_iteration_fn_imps.hpp44
-rw-r--r--libstdc++-v3/include/ext/pb_assoc/detail/basic_tree_assoc_cntnr/policy_access_fn_imps.hpp76
-rw-r--r--libstdc++-v3/include/ext/pb_assoc/detail/basic_tree_assoc_cntnr/r_erase_fn_imps.hpp44
-rw-r--r--libstdc++-v3/include/ext/pb_assoc/detail/basic_tree_assoc_cntnr/r_range_iteration_fn_imps.hpp43
-rw-r--r--libstdc++-v3/include/ext/pb_assoc/detail/basic_tree_assoc_cntnr/range_iteration_fn_imps.hpp43
-rw-r--r--libstdc++-v3/include/ext/pb_assoc/detail/basic_tree_assoc_cntnr/split_join_fn_imps.hpp60
-rw-r--r--libstdc++-v3/include/ext/pb_assoc/detail/bin_search_tree_/bin_search_tree_.hpp525
-rw-r--r--libstdc++-v3/include/ext/pb_assoc/detail/bin_search_tree_/cond_dtor_entry_dealtor.hpp74
-rw-r--r--libstdc++-v3/include/ext/pb_assoc/detail/bin_search_tree_/cond_key_dtor_entry_dealtor.hpp85
-rw-r--r--libstdc++-v3/include/ext/pb_assoc/detail/bin_search_tree_/constructors_destructor_fn_imps.hpp258
-rw-r--r--libstdc++-v3/include/ext/pb_assoc/detail/bin_search_tree_/debug_fn_imps.hpp278
-rw-r--r--libstdc++-v3/include/ext/pb_assoc/detail/bin_search_tree_/erase_fn_imps.hpp124
-rw-r--r--libstdc++-v3/include/ext/pb_assoc/detail/bin_search_tree_/find_fn_imps.hpp184
-rw-r--r--libstdc++-v3/include/ext/pb_assoc/detail/bin_search_tree_/find_iterators.hpp391
-rw-r--r--libstdc++-v3/include/ext/pb_assoc/detail/bin_search_tree_/info_fn_imps.hpp87
-rw-r--r--libstdc++-v3/include/ext/pb_assoc/detail/bin_search_tree_/insert_fn_imps.hpp215
-rw-r--r--libstdc++-v3/include/ext/pb_assoc/detail/bin_search_tree_/iterators_fn_imps.hpp164
-rw-r--r--libstdc++-v3/include/ext/pb_assoc/detail/bin_search_tree_/node_iterators.hpp144
-rw-r--r--libstdc++-v3/include/ext/pb_assoc/detail/bin_search_tree_/r_erase_fn_imps.hpp124
-rw-r--r--libstdc++-v3/include/ext/pb_assoc/detail/bin_search_tree_/rotate_fn_imps.hpp163
-rw-r--r--libstdc++-v3/include/ext/pb_assoc/detail/bin_search_tree_/split_join_fn_imps.hpp192
-rw-r--r--libstdc++-v3/include/ext/pb_assoc/detail/cc_hash_assoc_cntnr/constructor_destructor_fn_imps.hpp153
-rw-r--r--libstdc++-v3/include/ext/pb_assoc/detail/cc_ht_map_/cc_ht_map_.hpp602
-rw-r--r--libstdc++-v3/include/ext/pb_assoc/detail/cc_ht_map_/cmp_fn_imps.hpp92
-rw-r--r--libstdc++-v3/include/ext/pb_assoc/detail/cc_ht_map_/cond_key_dtor_entry_dealtor.hpp138
-rw-r--r--libstdc++-v3/include/ext/pb_assoc/detail/cc_ht_map_/constructor_destructor_fn_imps.hpp227
-rw-r--r--libstdc++-v3/include/ext/pb_assoc/detail/cc_ht_map_/constructor_destructor_no_store_hash_fn_imps.hpp61
-rw-r--r--libstdc++-v3/include/ext/pb_assoc/detail/cc_ht_map_/constructor_destructor_store_hash_fn_imps.hpp63
-rw-r--r--libstdc++-v3/include/ext/pb_assoc/detail/cc_ht_map_/debug_fn_imps.hpp83
-rw-r--r--libstdc++-v3/include/ext/pb_assoc/detail/cc_ht_map_/debug_no_store_hash_fn_imps.hpp54
-rw-r--r--libstdc++-v3/include/ext/pb_assoc/detail/cc_ht_map_/debug_store_hash_fn_imps.hpp59
-rw-r--r--libstdc++-v3/include/ext/pb_assoc/detail/cc_ht_map_/entry_list_fn_imps.hpp111
-rw-r--r--libstdc++-v3/include/ext/pb_assoc/detail/cc_ht_map_/erase_fn_imps.hpp114
-rw-r--r--libstdc++-v3/include/ext/pb_assoc/detail/cc_ht_map_/erase_no_store_hash_fn_imps.hpp159
-rw-r--r--libstdc++-v3/include/ext/pb_assoc/detail/cc_ht_map_/erase_store_hash_fn_imps.hpp159
-rw-r--r--libstdc++-v3/include/ext/pb_assoc/detail/cc_ht_map_/find_fn_imps.hpp83
-rw-r--r--libstdc++-v3/include/ext/pb_assoc/detail/cc_ht_map_/find_no_store_hash_fn_imps.hpp86
-rw-r--r--libstdc++-v3/include/ext/pb_assoc/detail/cc_ht_map_/find_store_hash_fn_imps.hpp88
-rw-r--r--libstdc++-v3/include/ext/pb_assoc/detail/cc_ht_map_/info_fn_imps.hpp68
-rw-r--r--libstdc++-v3/include/ext/pb_assoc/detail/cc_ht_map_/insert_fn_imps.hpp63
-rw-r--r--libstdc++-v3/include/ext/pb_assoc/detail/cc_ht_map_/insert_no_store_hash_fn_imps.hpp148
-rw-r--r--libstdc++-v3/include/ext/pb_assoc/detail/cc_ht_map_/insert_store_hash_fn_imps.hpp157
-rw-r--r--libstdc++-v3/include/ext/pb_assoc/detail/cc_ht_map_/iterators_fn_imps.hpp153
-rw-r--r--libstdc++-v3/include/ext/pb_assoc/detail/cc_ht_map_/policy_access_fn_imps.hpp108
-rw-r--r--libstdc++-v3/include/ext/pb_assoc/detail/cc_ht_map_/resize_fn_imps.hpp146
-rw-r--r--libstdc++-v3/include/ext/pb_assoc/detail/cc_ht_map_/resize_no_store_hash_fn_imps.hpp61
-rw-r--r--libstdc++-v3/include/ext/pb_assoc/detail/cc_ht_map_/resize_store_hash_fn_imps.hpp63
-rw-r--r--libstdc++-v3/include/ext/pb_assoc/detail/cc_ht_map_/size_fn_imps.hpp69
-rw-r--r--libstdc++-v3/include/ext/pb_assoc/detail/cc_ht_map_/standard_policies.hpp50
-rw-r--r--libstdc++-v3/include/ext/pb_assoc/detail/cond_dealtor.hpp129
-rw-r--r--libstdc++-v3/include/ext/pb_assoc/detail/constructors_destructor_fn_imps.hpp126
-rw-r--r--libstdc++-v3/include/ext/pb_assoc/detail/ds_trait_imp.hpp336
-rw-r--r--libstdc++-v3/include/ext/pb_assoc/detail/eq_fn/eq_by_less.hpp78
-rw-r--r--libstdc++-v3/include/ext/pb_assoc/detail/eq_fn/hash_eq_fn.hpp211
-rw-r--r--libstdc++-v3/include/ext/pb_assoc/detail/gp_hash_assoc_cntnr/constructor_destructor_fn_imps.hpp166
-rw-r--r--libstdc++-v3/include/ext/pb_assoc/detail/gp_ht_map_/constructor_destructor_fn_imps.hpp255
-rw-r--r--libstdc++-v3/include/ext/pb_assoc/detail/gp_ht_map_/constructor_destructor_no_store_hash_fn_imps.hpp61
-rw-r--r--libstdc++-v3/include/ext/pb_assoc/detail/gp_ht_map_/constructor_destructor_store_hash_fn_imps.hpp64
-rw-r--r--libstdc++-v3/include/ext/pb_assoc/detail/gp_ht_map_/debug_fn_imps.hpp60
-rw-r--r--libstdc++-v3/include/ext/pb_assoc/detail/gp_ht_map_/debug_no_store_hash_fn_imps.hpp81
-rw-r--r--libstdc++-v3/include/ext/pb_assoc/detail/gp_ht_map_/debug_store_hash_fn_imps.hpp86
-rw-r--r--libstdc++-v3/include/ext/pb_assoc/detail/gp_ht_map_/erase_fn_imps.hpp110
-rw-r--r--libstdc++-v3/include/ext/pb_assoc/detail/gp_ht_map_/erase_no_store_hash_fn_imps.hpp104
-rw-r--r--libstdc++-v3/include/ext/pb_assoc/detail/gp_ht_map_/erase_store_hash_fn_imps.hpp109
-rw-r--r--libstdc++-v3/include/ext/pb_assoc/detail/gp_ht_map_/find_fn_imps.hpp94
-rw-r--r--libstdc++-v3/include/ext/pb_assoc/detail/gp_ht_map_/find_no_store_hash_fn_imps.hpp116
-rw-r--r--libstdc++-v3/include/ext/pb_assoc/detail/gp_ht_map_/find_store_hash_fn_imps.hpp118
-rw-r--r--libstdc++-v3/include/ext/pb_assoc/detail/gp_ht_map_/gp_ht_map_.hpp602
-rw-r--r--libstdc++-v3/include/ext/pb_assoc/detail/gp_ht_map_/info_fn_imps.hpp68
-rw-r--r--libstdc++-v3/include/ext/pb_assoc/detail/gp_ht_map_/insert_fn_imps.hpp67
-rw-r--r--libstdc++-v3/include/ext/pb_assoc/detail/gp_ht_map_/insert_no_store_hash_fn_imps.hpp184
-rw-r--r--libstdc++-v3/include/ext/pb_assoc/detail/gp_ht_map_/insert_store_hash_fn_imps.hpp195
-rw-r--r--libstdc++-v3/include/ext/pb_assoc/detail/gp_ht_map_/iterator_fn_imps.hpp181
-rw-r--r--libstdc++-v3/include/ext/pb_assoc/detail/gp_ht_map_/policy_access_fn_imps.hpp124
-rw-r--r--libstdc++-v3/include/ext/pb_assoc/detail/gp_ht_map_/resize_fn_imps.hpp158
-rw-r--r--libstdc++-v3/include/ext/pb_assoc/detail/gp_ht_map_/resize_no_store_hash_fn_imps.hpp84
-rw-r--r--libstdc++-v3/include/ext/pb_assoc/detail/gp_ht_map_/resize_store_hash_fn_imps.hpp93
-rw-r--r--libstdc++-v3/include/ext/pb_assoc/detail/hash_fn/direct_mask_range_hashing_imp.hpp67
-rw-r--r--libstdc++-v3/include/ext/pb_assoc/detail/hash_fn/direct_mod_range_hashing_imp.hpp67
-rw-r--r--libstdc++-v3/include/ext/pb_assoc/detail/hash_fn/linear_probe_fn_imp.hpp58
-rw-r--r--libstdc++-v3/include/ext/pb_assoc/detail/hash_fn/mask_based_range_hashing.hpp139
-rw-r--r--libstdc++-v3/include/ext/pb_assoc/detail/hash_fn/mod_based_range_hashing.hpp112
-rw-r--r--libstdc++-v3/include/ext/pb_assoc/detail/hash_fn/probe_fn_base.hpp96
-rw-r--r--libstdc++-v3/include/ext/pb_assoc/detail/hash_fn/quadratic_probe_fn_imp.hpp57
-rw-r--r--libstdc++-v3/include/ext/pb_assoc/detail/hash_fn/ranged_hash_fn.hpp459
-rw-r--r--libstdc++-v3/include/ext/pb_assoc/detail/hash_fn/ranged_probe_fn.hpp473
-rw-r--r--libstdc++-v3/include/ext/pb_assoc/detail/hash_types_traits.hpp94
-rw-r--r--libstdc++-v3/include/ext/pb_assoc/detail/lu_assoc_cntnr/constructor_destructor_fn_imps.hpp121
-rw-r--r--libstdc++-v3/include/ext/pb_assoc/detail/lu_assoc_cntnr/policy_access_fn_imps.hpp77
-rw-r--r--libstdc++-v3/include/ext/pb_assoc/detail/lu_map_/constructor_destructor_fn_imps.hpp178
-rw-r--r--libstdc++-v3/include/ext/pb_assoc/detail/lu_map_/debug_fn_imps.hpp (renamed from libstdc++-v3/testsuite/performance/23_containers/set_create_from_sorted.cc)58
-rw-r--r--libstdc++-v3/include/ext/pb_assoc/detail/lu_map_/erase_fn_imps.hpp129
-rw-r--r--libstdc++-v3/include/ext/pb_assoc/detail/lu_map_/find_fn_imps.hpp136
-rw-r--r--libstdc++-v3/include/ext/pb_assoc/detail/lu_map_/info_fn_imps.hpp67
-rw-r--r--libstdc++-v3/include/ext/pb_assoc/detail/lu_map_/insert_fn_imps.hpp148
-rw-r--r--libstdc++-v3/include/ext/pb_assoc/detail/lu_map_/iterators_fn_imps.hpp106
-rw-r--r--libstdc++-v3/include/ext/pb_assoc/detail/lu_map_/lu_map_.hpp464
-rw-r--r--libstdc++-v3/include/ext/pb_assoc/detail/lu_map_/policy_access_fn_imps.hpp60
-rw-r--r--libstdc++-v3/include/ext/pb_assoc/detail/lu_policy/counter_lu_metadata_imp.hpp66
-rw-r--r--libstdc++-v3/include/ext/pb_assoc/detail/lu_policy/counter_lu_policy_imp.hpp74
-rw-r--r--libstdc++-v3/include/ext/pb_assoc/detail/lu_policy/mtf_lu_policy_imp.hpp65
-rw-r--r--libstdc++-v3/include/ext/pb_assoc/detail/map_debug_base.hpp248
-rw-r--r--libstdc++-v3/include/ext/pb_assoc/detail/mapping_level_imp.hpp90
-rw-r--r--libstdc++-v3/include/ext/pb_assoc/detail/ms_category_imp.hpp81
-rw-r--r--libstdc++-v3/include/ext/pb_assoc/detail/ms_trait_imp.hpp136
-rw-r--r--libstdc++-v3/include/ext/pb_assoc/detail/order_statistics_imp.hpp436
-rw-r--r--libstdc++-v3/include/ext/pb_assoc/detail/ov_tree_map_/cond_dtor.hpp88
-rw-r--r--libstdc++-v3/include/ext/pb_assoc/detail/ov_tree_map_/constructors_destructor_fn_imps.hpp278
-rw-r--r--libstdc++-v3/include/ext/pb_assoc/detail/ov_tree_map_/debug_fn_imps.hpp101
-rw-r--r--libstdc++-v3/include/ext/pb_assoc/detail/ov_tree_map_/erase_fn_imps.hpp234
-rw-r--r--libstdc++-v3/include/ext/pb_assoc/detail/ov_tree_map_/find_fn_imps.hpp44
-rw-r--r--libstdc++-v3/include/ext/pb_assoc/detail/ov_tree_map_/info_fn_imps.hpp95
-rw-r--r--libstdc++-v3/include/ext/pb_assoc/detail/ov_tree_map_/insert_fn_imps.hpp44
-rw-r--r--libstdc++-v3/include/ext/pb_assoc/detail/ov_tree_map_/iterators_fn_imps.hpp44
-rw-r--r--libstdc++-v3/include/ext/pb_assoc/detail/ov_tree_map_/node_iterators.hpp178
-rw-r--r--libstdc++-v3/include/ext/pb_assoc/detail/ov_tree_map_/ov_tree_map_.hpp628
-rw-r--r--libstdc++-v3/include/ext/pb_assoc/detail/ov_tree_map_/split_join_fn_imps.hpp189
-rw-r--r--libstdc++-v3/include/ext/pb_assoc/detail/rb_tree_map_/constructors_destructor_fn_imps.hpp116
-rw-r--r--libstdc++-v3/include/ext/pb_assoc/detail/rb_tree_map_/debug_fn_imps.hpp87
-rw-r--r--libstdc++-v3/include/ext/pb_assoc/detail/rb_tree_map_/erase_fn_imps.hpp403
-rw-r--r--libstdc++-v3/include/ext/pb_assoc/detail/rb_tree_map_/find_fn_imps.hpp44
-rw-r--r--libstdc++-v3/include/ext/pb_assoc/detail/rb_tree_map_/info_fn_imps.hpp52
-rw-r--r--libstdc++-v3/include/ext/pb_assoc/detail/rb_tree_map_/insert_fn_imps.hpp176
-rw-r--r--libstdc++-v3/include/ext/pb_assoc/detail/rb_tree_map_/node.hpp89
-rw-r--r--libstdc++-v3/include/ext/pb_assoc/detail/rb_tree_map_/rb_tree_.hpp360
-rw-r--r--libstdc++-v3/include/ext/pb_assoc/detail/rb_tree_map_/split_join_fn_imps.hpp381
-rw-r--r--libstdc++-v3/include/ext/pb_assoc/detail/resize_policy/cc_hash_max_collision_resize_trigger_imp.hpp227
-rw-r--r--libstdc++-v3/include/ext/pb_assoc/detail/resize_policy/hash_exponential_size_policy_imp.hpp123
-rw-r--r--libstdc++-v3/include/ext/pb_assoc/detail/resize_policy/hash_load_check_resize_trigger_imp.hpp352
-rw-r--r--libstdc++-v3/include/ext/pb_assoc/detail/resize_policy/hash_prime_size_policy_imp.hpp150
-rw-r--r--libstdc++-v3/include/ext/pb_assoc/detail/resize_policy/hash_standard_resize_policy_imp.hpp342
-rw-r--r--libstdc++-v3/include/ext/pb_assoc/detail/resize_policy/ht_prime_size_policy_imp.hpp97
-rw-r--r--libstdc++-v3/include/ext/pb_assoc/detail/resize_policy/size_base.hpp170
-rw-r--r--libstdc++-v3/include/ext/pb_assoc/detail/splay_tree_/constructors_destructor_fn_imps.hpp112
-rw-r--r--libstdc++-v3/include/ext/pb_assoc/detail/splay_tree_/debug_fn_imps.hpp73
-rw-r--r--libstdc++-v3/include/ext/pb_assoc/detail/splay_tree_/erase_fn_imps.hpp245
-rw-r--r--libstdc++-v3/include/ext/pb_assoc/detail/splay_tree_/find_fn_imps.hpp122
-rw-r--r--libstdc++-v3/include/ext/pb_assoc/detail/splay_tree_/info_fn_imps.hpp43
-rw-r--r--libstdc++-v3/include/ext/pb_assoc/detail/splay_tree_/insert_fn_imps.hpp89
-rw-r--r--libstdc++-v3/include/ext/pb_assoc/detail/splay_tree_/node.hpp89
-rw-r--r--libstdc++-v3/include/ext/pb_assoc/detail/splay_tree_/splay_fn_imps.hpp289
-rw-r--r--libstdc++-v3/include/ext/pb_assoc/detail/splay_tree_/splay_tree_.hpp342
-rw-r--r--libstdc++-v3/include/ext/pb_assoc/detail/splay_tree_/split_join_fn_imps.hpp125
-rw-r--r--libstdc++-v3/include/ext/pb_assoc/detail/standard_policies.hpp188
-rw-r--r--libstdc++-v3/include/ext/pb_assoc/detail/standard_sizes.hpp65
-rw-r--r--libstdc++-v3/include/ext/pb_assoc/detail/tree_assoc_cntnr/constructor_destructor_fn_imps.hpp130
-rw-r--r--libstdc++-v3/include/ext/pb_assoc/detail/tree_policy/null_node_updator_imp.hpp49
-rw-r--r--libstdc++-v3/include/ext/pb_assoc/detail/tree_policy/order_statistics_imp.hpp436
-rw-r--r--libstdc++-v3/include/ext/pb_assoc/detail/type_utils.hpp449
-rw-r--r--libstdc++-v3/include/ext/pb_assoc/detail/typelist.hpp220
-rw-r--r--libstdc++-v3/include/ext/pb_assoc/detail/typelist/typelist_append.hpp84
-rw-r--r--libstdc++-v3/include/ext/pb_assoc/detail/typelist/typelist_apply.hpp90
-rw-r--r--libstdc++-v3/include/ext/pb_assoc/detail/typelist/typelist_at_index.hpp80
-rw-r--r--libstdc++-v3/include/ext/pb_assoc/detail/typelist/typelist_contains.hpp99
-rw-r--r--libstdc++-v3/include/ext/pb_assoc/detail/typelist/typelist_filter.hpp97
-rw-r--r--libstdc++-v3/include/ext/pb_assoc/detail/typelist/typelist_transform.hpp87
-rw-r--r--libstdc++-v3/include/ext/pb_assoc/detail/typelist/typelist_typelist_append.hpp89
-rw-r--r--libstdc++-v3/include/ext/pb_assoc/detail/types_traits.hpp295
-rw-r--r--libstdc++-v3/include/ext/pb_assoc/detail/unordered_iterator/const_find_iterator.hpp138
-rw-r--r--libstdc++-v3/include/ext/pb_assoc/detail/unordered_iterator/const_iterator.hpp122
-rw-r--r--libstdc++-v3/include/ext/pb_assoc/detail/unordered_iterator/find_iterator.hpp147
-rw-r--r--libstdc++-v3/include/ext/pb_assoc/detail/unordered_iterator/iterator.hpp139
-rw-r--r--libstdc++-v3/include/ext/pb_assoc/detail/value_type_adapter/constructor_destructor_and_related.hpp183
-rw-r--r--libstdc++-v3/include/ext/pb_assoc/detail/value_type_adapter/erase_fn_imps.hpp43
-rw-r--r--libstdc++-v3/include/ext/pb_assoc/detail/value_type_adapter/erase_if_pred.hpp72
-rw-r--r--libstdc++-v3/include/ext/pb_assoc/detail/value_type_adapter/find_fn_imps.hpp43
-rw-r--r--libstdc++-v3/include/ext/pb_assoc/detail/value_type_adapter/info_fn_imps.hpp68
-rw-r--r--libstdc++-v3/include/ext/pb_assoc/detail/value_type_adapter/insert_fn_imps.hpp44
-rw-r--r--libstdc++-v3/include/ext/pb_assoc/detail/value_type_adapter/invalidation_guarantee_selector.hpp128
-rw-r--r--libstdc++-v3/include/ext/pb_assoc/detail/value_type_adapter/it_value_type_traits.hpp224
-rw-r--r--libstdc++-v3/include/ext/pb_assoc/detail/value_type_adapter/iterator.hpp196
-rw-r--r--libstdc++-v3/include/ext/pb_assoc/detail/value_type_adapter/iterator_fn_imps.hpp44
-rw-r--r--libstdc++-v3/include/ext/pb_assoc/detail/value_type_adapter/ref_pair.hpp73
-rw-r--r--libstdc++-v3/include/ext/pb_assoc/detail/value_type_adapter/value_type_adapter.hpp600
-rw-r--r--libstdc++-v3/include/ext/pb_assoc/detail/value_type_adapter/value_type_traits.hpp102
-rw-r--r--libstdc++-v3/include/ext/pb_assoc/ds_trait.hpp125
-rw-r--r--libstdc++-v3/include/ext/pb_assoc/exception.hpp69
-rw-r--r--libstdc++-v3/include/ext/pb_assoc/hash_policy.hpp717
-rw-r--r--libstdc++-v3/include/ext/pb_assoc/lu_policy.hpp181
-rw-r--r--libstdc++-v3/include/ext/pb_assoc/ms_trait.hpp82
-rw-r--r--libstdc++-v3/include/ext/pb_assoc/tree_policy.hpp215
-rw-r--r--libstdc++-v3/include/ext/pb_assoc/trivial_iterator_def.hpp58
-rw-r--r--libstdc++-v3/include/ext/typelist.h368
-rw-r--r--libstdc++-v3/testsuite/Makefile.am3
-rw-r--r--libstdc++-v3/testsuite/Makefile.in3
-rw-r--r--libstdc++-v3/testsuite/ext/pb_assoc/example/basic_map.cc122
-rw-r--r--libstdc++-v3/testsuite/ext/pb_assoc/example/basic_multimap.cc110
-rw-r--r--libstdc++-v3/testsuite/ext/pb_assoc/example/basic_set.cc120
-rw-r--r--libstdc++-v3/testsuite/ext/pb_assoc/example/ds_traits.cc262
-rw-r--r--libstdc++-v3/testsuite/ext/pb_assoc/example/erase_if.cc133
-rw-r--r--libstdc++-v3/testsuite/ext/pb_assoc/example/extract_key.cc132
-rw-r--r--libstdc++-v3/testsuite/ext/pb_assoc/example/hash_find_neg.cc73
-rw-r--r--libstdc++-v3/testsuite/ext/pb_assoc/example/hash_illegal_resize.cc148
-rw-r--r--libstdc++-v3/testsuite/ext/pb_assoc/example/hash_initial_size.cc122
-rw-r--r--libstdc++-v3/testsuite/ext/pb_assoc/example/hash_load_set_change.cc152
-rw-r--r--libstdc++-v3/testsuite/ext/pb_assoc/example/hash_mod.cc89
-rw-r--r--libstdc++-v3/testsuite/ext/pb_assoc/example/hash_resize.cc146
-rw-r--r--libstdc++-v3/testsuite/ext/pb_assoc/example/hash_resize_neg.cc73
-rw-r--r--libstdc++-v3/testsuite/ext/pb_assoc/example/hash_shift_mask.cc130
-rw-r--r--libstdc++-v3/testsuite/ext/pb_assoc/example/mapping_level.cc150
-rw-r--r--libstdc++-v3/testsuite/ext/pb_assoc/example/mapping_level_neg.cc83
-rw-r--r--libstdc++-v3/testsuite/ext/pb_assoc/example/ms_traits.cc121
-rw-r--r--libstdc++-v3/testsuite/ext/pb_assoc/example/ranged_hash.cc193
-rw-r--r--libstdc++-v3/testsuite/ext/pb_assoc/example/store_hash.cc111
-rw-r--r--libstdc++-v3/testsuite/ext/pb_assoc/example/tree_intervals.cc260
-rw-r--r--libstdc++-v3/testsuite/ext/pb_assoc/example/tree_join.cc127
-rw-r--r--libstdc++-v3/testsuite/ext/pb_assoc/example/tree_order_statistics.cc133
-rw-r--r--libstdc++-v3/testsuite/ext/pb_assoc/example/tree_order_statistics_join.cc106
-rw-r--r--libstdc++-v3/testsuite/ext/pb_assoc/example/tree_split.cc90
-rw-r--r--libstdc++-v3/testsuite/performance/20_util/allocator/insert.cc330
-rw-r--r--libstdc++-v3/testsuite/performance/20_util/allocator/insert_insert.cc217
-rw-r--r--libstdc++-v3/testsuite/performance/20_util/allocator/list_sort_search.cc127
-rw-r--r--libstdc++-v3/testsuite/performance/20_util/allocator/map_mt_find.cc152
-rw-r--r--libstdc++-v3/testsuite/performance/20_util/allocator/map_thread.cc139
-rw-r--r--libstdc++-v3/testsuite/performance/23_containers/container_benchmark.cc175
-rw-r--r--libstdc++-v3/testsuite/performance/23_containers/create/map.cc62
-rw-r--r--libstdc++-v3/testsuite/performance/23_containers/create_from_sorted/set.cc72
-rw-r--r--libstdc++-v3/testsuite/performance/23_containers/create_sort/list.cc65
-rw-r--r--libstdc++-v3/testsuite/performance/23_containers/find/map.cc68
-rw-r--r--libstdc++-v3/testsuite/performance/23_containers/index/map.cc71
-rw-r--r--libstdc++-v3/testsuite/performance/23_containers/insert/associative.cc73
-rw-r--r--libstdc++-v3/testsuite/performance/23_containers/insert/sequence.cc69
-rw-r--r--libstdc++-v3/testsuite/performance/23_containers/insert_erase/associative.cc76
-rw-r--r--libstdc++-v3/testsuite/performance/23_containers/insert_from_sorted/set.cc89
-rw-r--r--libstdc++-v3/testsuite/performance/23_containers/list_create_fill_sort.cc64
-rw-r--r--libstdc++-v3/testsuite/performance/23_containers/map_create_fill.cc53
-rw-r--r--libstdc++-v3/testsuite/performance/23_containers/producer_consumer/associative.cc (renamed from libstdc++-v3/testsuite/performance/20_util/allocator/producer_consumer.cc)143
-rw-r--r--libstdc++-v3/testsuite/performance/23_containers/producer_consumer/sequence.cc257
-rw-r--r--libstdc++-v3/testsuite/performance/23_containers/sort_search/list.cc84
-rw-r--r--libstdc++-v3/testsuite/testsuite_common_types.h425
-rw-r--r--libstdc++-v3/testsuite/testsuite_visualization.h150
399 files changed, 64037 insertions, 1459 deletions
diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog
index 89bd3181771..9d28642ea7d 100644
--- a/libstdc++-v3/ChangeLog
+++ b/libstdc++-v3/ChangeLog
@@ -1,3 +1,500 @@
+2005-06-27 Benjamin Kosnik <bkoz@redhat.com>
+ Ami Tavory <pbassoc@gmail.com>
+
+ * docs/html/documentation.html: Add link for policy based
+ associative containers docs.
+ * docs/html/ext/pb_assoc/Std_hash_set_impl.jpg: New.
+ * docs/html/ext/pb_assoc/acks.html: New.
+ * docs/html/ext/pb_assoc/balls_and_bins.jpg: New.
+ * docs/html/ext/pb_assoc/basic_assoc_cntnr.html: New.
+ * docs/html/ext/pb_assoc/basic_assoc_cntnr_compound_data.html: New.
+ * docs/html/ext/pb_assoc/basic_assoc_cntnr_no_data.html: New.
+ * docs/html/ext/pb_assoc/basic_ds_tag.html: New.
+ * docs/html/ext/pb_assoc/basic_hash_assoc_cntnr.html: New.
+ * docs/html/ext/pb_assoc/basic_hash_ds_tag.html: New.
+ * docs/html/ext/pb_assoc/basic_invalidation_guarantee.html: New.
+ * docs/html/ext/pb_assoc/basic_ms_tag.html: New.
+ * docs/html/ext/pb_assoc/basic_tree_assoc_cntnr.html: New.
+ * docs/html/ext/pb_assoc/
+ basic_tree_assoc_cntnr_const_node_iterator.html: New.
+ * docs/html/ext/pb_assoc/
+ basic_tree_assoc_cntnr_node_iterator.html: New.
+ * docs/html/ext/pb_assoc/basic_tree_assoc_cntnr_rev.html: New.
+ * docs/html/ext/pb_assoc/basic_tree_assoc_cntnr_rev_it.html: New.
+ * docs/html/ext/pb_assoc/basic_tree_ds_tag.html: New.
+ * docs/html/ext/pb_assoc/cc_hash_assoc_cntnr.html: New.
+ * docs/html/ext/pb_assoc/cc_hash_ds_tag.html: New.
+ * docs/html/ext/pb_assoc/
+ cc_hash_max_collision_check_resize_trigger.html: New.
+ * docs/html/ext/pb_assoc/cc_hash_policy_cd.jpg: New.
+ * docs/html/ext/pb_assoc/cd.jpg: New.
+ * docs/html/ext/pb_assoc/component_requirements.html: New.
+ * docs/html/ext/pb_assoc/compound_data_enabled_ms_tag.html: New.
+ * docs/html/ext/pb_assoc/compound_data_type.html: New.
+ * docs/html/ext/pb_assoc/compound_ds_tag.html: New.
+ * docs/html/ext/pb_assoc/concepts.html: New.
+ * docs/html/ext/pb_assoc/contact.html: New.
+ * docs/html/ext/pb_assoc/counter_update_metadata.html: New.
+ * docs/html/ext/pb_assoc/counter_update_policy.html: New.
+ * docs/html/ext/pb_assoc/data_enabled_ms_tag.html: New.
+ * docs/html/ext/pb_assoc/design.html: New.
+ * docs/html/ext/pb_assoc/different_underlying_dss.jpg: New.
+ * docs/html/ext/pb_assoc/direct_mask_range_hashing.html: New.
+ * docs/html/ext/pb_assoc/direct_mod_range_hashing.html: New.
+ * docs/html/ext/pb_assoc/disclaimer.html: New.
+ * docs/html/ext/pb_assoc/ds_gen.html: New.
+ * docs/html/ext/pb_assoc/ds_tag_cd.jpg: New.
+ * docs/html/ext/pb_assoc/ds_traits.html: New.
+ * docs/html/ext/pb_assoc/embedded_lists_1.jpg: New.
+ * docs/html/ext/pb_assoc/embedded_lists_2.jpg: New.
+ * docs/html/ext/pb_assoc/examples.html: New.
+ * docs/html/ext/pb_assoc/exception_guarantees_specifics.html: New.
+ * docs/html/ext/pb_assoc/find_invalidation_guarantee.html: New.
+ * docs/html/ext/pb_assoc/find_iterators_cd.jpg: New.
+ * docs/html/ext/pb_assoc/find_iterators_range_ops_1.jpg: New.
+ * docs/html/ext/pb_assoc/find_iterators_range_ops_2.jpg: New.
+ * docs/html/ext/pb_assoc/generics.html: New.
+ * docs/html/ext/pb_assoc/gp_hash_assoc_cntnr.html: New.
+ * docs/html/ext/pb_assoc/gp_hash_ds_tag.html: New.
+ * docs/html/ext/pb_assoc/gp_hash_policy_cd.jpg: New.
+ * docs/html/ext/pb_assoc/hash_and_probe_general.html: New.
+ * docs/html/ext/pb_assoc/hash_based_containers.html: New.
+ * docs/html/ext/pb_assoc/hash_cd.jpg: New.
+ * docs/html/ext/pb_assoc/hash_exponential_size_policy.html: New.
+ * docs/html/ext/pb_assoc/hash_fn.html: New.
+ * docs/html/ext/pb_assoc/hash_load_check_resize_trigger.html: New.
+ * docs/html/ext/pb_assoc/hash_policies.html: New.
+ * docs/html/ext/pb_assoc/hash_policy_cd.jpg: New.
+ * docs/html/ext/pb_assoc/hash_prime_size_policy.html: New.
+ * docs/html/ext/pb_assoc/hash_range_hashing_seq_diagram.jpg: New.
+ * docs/html/ext/pb_assoc/hash_range_hashing_seq_diagram2.jpg: New.
+ * docs/html/ext/pb_assoc/hash_ranged_hash_range_hashing_fns.jpg: New.
+ * docs/html/ext/pb_assoc/hash_standard_resize_policy.html: New.
+ * docs/html/ext/pb_assoc/home.html: New.
+ * docs/html/ext/pb_assoc/index.html: New.
+ * docs/html/ext/pb_assoc/insert_resize_sequence_diagram1.jpg: New.
+ * docs/html/ext/pb_assoc/insert_resize_sequence_diagram2.jpg: New.
+ * docs/html/ext/pb_assoc/insert_resize_sequence_diagram3.jpg: New.
+ * docs/html/ext/pb_assoc/insert_type_methods.html: New.
+ * docs/html/ext/pb_assoc/interface.html: New.
+ * docs/html/ext/pb_assoc/interval_node_invariants.jpg: New.
+ * docs/html/ext/pb_assoc/introduction.html: New.
+ * docs/html/ext/pb_assoc/invalidation_guarantee_cd.jpg: New.
+ * docs/html/ext/pb_assoc/invalidation_guarantee_erase.jpg: New.
+ * docs/html/ext/pb_assoc/lib_download.html: New.
+ * docs/html/ext/pb_assoc/linear_probe_fn.html: New.
+ * docs/html/ext/pb_assoc/list_updates.html: New.
+ * docs/html/ext/pb_assoc/lu_assoc_cntnr.html: New.
+ * docs/html/ext/pb_assoc/lu_based_containers.html: New.
+ * docs/html/ext/pb_assoc/lu_cd.jpg: New.
+ * docs/html/ext/pb_assoc/lu_ds_tag.html: New.
+ * docs/html/ext/pb_assoc/lu_ops.jpg: New.
+ * docs/html/ext/pb_assoc/mmap_value_utils.html: New.
+ * docs/html/ext/pb_assoc/motivation.html: New.
+ * docs/html/ext/pb_assoc/move_to_front_update_metadata.html: New.
+ * docs/html/ext/pb_assoc/move_to_front_update_policy.html: New.
+ * docs/html/ext/pb_assoc/ms_cd.jpg: New.
+ * docs/html/ext/pb_assoc/ms_gen.html: New.
+ * docs/html/ext/pb_assoc/ms_tag_cd.jpg: New.
+ * docs/html/ext/pb_assoc/ms_traits.html: New.
+ * docs/html/ext/pb_assoc/node_invariant_invalidations.jpg: New.
+ * docs/html/ext/pb_assoc/node_invariants.html: New.
+ * docs/html/ext/pb_assoc/node_invariants.jpg: New.
+ * docs/html/ext/pb_assoc/non_unique_mapping.html: New.
+ * docs/html/ext/pb_assoc/non_unique_mapping_containers.jpg: New.
+ * docs/html/ext/pb_assoc/null_data_type.html: New.
+ * docs/html/ext/pb_assoc/null_hash_fn.html: New.
+ * docs/html/ext/pb_assoc/null_probe_fn.html: New.
+ * docs/html/ext/pb_assoc/order_by_key.html: New.
+ * docs/html/ext/pb_assoc/order_statistics_key.html: New.
+ * docs/html/ext/pb_assoc/order_statistics_key_cmp.html: New.
+ * docs/html/ext/pb_assoc/order_statistics_node_updator.html: New.
+ * docs/html/ext/pb_assoc/ov_tree_ds_tag.html: New.
+ * docs/html/ext/pb_assoc/overview.html: New.
+ * docs/html/ext/pb_assoc/pb_assoc_ex.html: New.
+ * docs/html/ext/pb_assoc/portability.html: New.
+ * docs/html/ext/pb_assoc/quadratic_probe_fn.html: New.
+ * docs/html/ext/pb_assoc/range_invalidation_guarantee.html: New.
+ * docs/html/ext/pb_assoc/rank_node_invariants.jpg: New.
+ * docs/html/ext/pb_assoc/rationale_null_node_updator.jpg: New.
+ * docs/html/ext/pb_assoc/rb_tree_ds_tag.html: New.
+ * docs/html/ext/pb_assoc/reference_iterator.jpg: New.
+ * docs/html/ext/pb_assoc/references.html: New.
+ * docs/html/ext/pb_assoc/regression_tests.html: New.
+ * docs/html/ext/pb_assoc/resize_general.html: New.
+ * docs/html/ext/pb_assoc/resize_policies.html: New.
+ * docs/html/ext/pb_assoc/resize_policy_cd.jpg: New.
+ * docs/html/ext/pb_assoc/restoring_node_invariants.jpg: New.
+ * docs/html/ext/pb_assoc/sample_node_updator.hpp: New.
+ * docs/html/ext/pb_assoc/sample_probe_fn.hpp: New.
+ * docs/html/ext/pb_assoc/sample_probe_fn.html: New.
+ * docs/html/ext/pb_assoc/sample_range_hashing.hpp: New.
+ * docs/html/ext/pb_assoc/sample_range_hashing.html: New.
+ * docs/html/ext/pb_assoc/sample_ranged_hash_fn.hpp: New.
+ * docs/html/ext/pb_assoc/sample_ranged_hash_fn.html: New.
+ * docs/html/ext/pb_assoc/sample_ranged_probe_fn.hpp: New.
+ * docs/html/ext/pb_assoc/sample_ranged_probe_fn.html: New.
+ * docs/html/ext/pb_assoc/sample_resize_policy.hpp: New.
+ * docs/html/ext/pb_assoc/sample_resize_policy.html: New.
+ * docs/html/ext/pb_assoc/sample_resize_trigger.hpp: New.
+ * docs/html/ext/pb_assoc/sample_size_policy.hpp: New.
+ * docs/html/ext/pb_assoc/sample_update_policy.hpp: New.
+ * docs/html/ext/pb_assoc/size_policies_general.html: New.
+ * docs/html/ext/pb_assoc/splay_tree_ds_tag.html: New.
+ * docs/html/ext/pb_assoc/timing_tests.html: New.
+ * docs/html/ext/pb_assoc/toc.html: New.
+ * docs/html/ext/pb_assoc/tree_assoc_cntnr.html: New.
+ * docs/html/ext/pb_assoc/
+ tree_assoc_cntnr_const_node_iterator.html: New.
+ * docs/html/ext/pb_assoc/tree_assoc_cntnr_node_iterator.html: New.
+ * docs/html/ext/pb_assoc/tree_based_containers.html: New.
+ * docs/html/ext/pb_assoc/tree_cd.jpg: New.
+ * docs/html/ext/pb_assoc/trigger_policies_general.html: New.
+ * docs/html/ext/pb_assoc/tutorial.html: New.
+ * docs/html/ext/pb_assoc/update_seq_diagram.jpg: New.
+ * include/Makefile.am: Add assoc_srcdir, assoc_builddir, assoc_subdir,
+ assoc_headers.
+ * include/Makefile.in: Regenerate.
+ * include/ext/typelist.h: New.
+ * include/ext/pb_assoc/assoc_cntnr.hpp: New.
+ * include/ext/pb_assoc/data_type.hpp: New.
+ * include/ext/pb_assoc/ds_trait.hpp: New.
+ * include/ext/pb_assoc/exception.hpp: New.
+ * include/ext/pb_assoc/hash_policy.hpp: New.
+ * include/ext/pb_assoc/lu_policy.hpp: New.
+ * include/ext/pb_assoc/ms_trait.hpp: New.
+ * include/ext/pb_assoc/tree_policy.hpp: New.
+ * include/ext/pb_assoc/trivial_iterator_def.hpp: New.
+ * include/ext/pb_assoc/detail/assoc_cntnr_base.hpp: New.
+ * include/ext/pb_assoc/detail/cond_dealtor.hpp: New.
+ * include/ext/pb_assoc/detail/constructors_destructor_fn_imps.hpp: New.
+ * include/ext/pb_assoc/detail/ds_trait_imp.hpp: New.
+ * include/ext/pb_assoc/detail/hash_types_traits.hpp: New.
+ * include/ext/pb_assoc/detail/map_debug_base.hpp: New.
+ * include/ext/pb_assoc/detail/mapping_level_imp.hpp: New.
+ * include/ext/pb_assoc/detail/ms_category_imp.hpp: New.
+ * include/ext/pb_assoc/detail/ms_trait_imp.hpp: New.
+ * include/ext/pb_assoc/detail/order_statistics_imp.hpp: New.
+ * include/ext/pb_assoc/detail/standard_policies.hpp: New.
+ * include/ext/pb_assoc/detail/standard_sizes.hpp: New.
+ * include/ext/pb_assoc/detail/type_utils.hpp: New.
+ * include/ext/pb_assoc/detail/typelist.hpp: New.
+ * include/ext/pb_assoc/detail/types_traits.hpp: New.
+ * include/ext/pb_assoc/detail/basic_assoc_cntnr/
+ constructor_destructor_fn_imps.hpp: New.
+ * include/ext/pb_assoc/detail/basic_assoc_cntnr/
+ constructors_destructor_fn_imps.hpp: New.
+ * include/ext/pb_assoc/detail/basic_assoc_cntnr/d_extract_key.hpp: New.
+ * include/ext/pb_assoc/detail/basic_assoc_cntnr/
+ d_find_fn_imps.hpp: New.
+ * include/ext/pb_assoc/detail/basic_assoc_cntnr/
+ d_insert_fn_imps.hpp: New.
+ * include/ext/pb_assoc/detail/basic_assoc_cntnr/erase_fn_imps.hpp: New.
+ * include/ext/pb_assoc/detail/basic_assoc_cntnr/extract_key.hpp: New.
+ * include/ext/pb_assoc/detail/basic_assoc_cntnr/info_fn_imps.hpp: New.
+ * include/ext/pb_assoc/detail/basic_assoc_cntnr/
+ insert_fn_imps.hpp: New.
+ * include/ext/pb_assoc/detail/basic_assoc_cntnr/
+ iterators_fn_imps.hpp: New.
+ * include/ext/pb_assoc/detail/basic_hash_assoc_cntnr/
+ constructor_destructor_fn_imps.hpp: New.
+ * include/ext/pb_assoc/detail/basic_hash_assoc_cntnr/
+ constructors_destructor_fn_imps.hpp: New.
+ * include/ext/pb_assoc/detail/basic_hash_assoc_cntnr/
+ resize_fn_imps.hpp: New.
+ * include/ext/pb_assoc/detail/basic_tree_assoc_cntnr/
+ constructor_destructor_fn_imps.hpp: New.
+ * include/ext/pb_assoc/detail/basic_tree_assoc_cntnr/
+ constructors_destructor_fn_imps.hpp: New.
+ * include/ext/pb_assoc/detail/basic_tree_assoc_cntnr/
+ erase_fn_imps.hpp: New.
+ * include/ext/pb_assoc/detail/basic_tree_assoc_cntnr/
+ node_iteration_fn_imps.hpp: New.
+ * include/ext/pb_assoc/detail/basic_tree_assoc_cntnr/
+ policy_access_fn_imps.hpp: New.
+ * include/ext/pb_assoc/detail/basic_tree_assoc_cntnr/
+ r_erase_fn_imps.hpp: New.
+ * include/ext/pb_assoc/detail/basic_tree_assoc_cntnr/
+ r_range_iteration_fn_imps.hpp: New.
+ * include/ext/pb_assoc/detail/basic_tree_assoc_cntnr/
+ range_iteration_fn_imps.hpp: New.
+ * include/ext/pb_assoc/detail/basic_tree_assoc_cntnr/
+ split_join_fn_imps.hpp: New.
+ * include/ext/pb_assoc/detail/bin_search_tree_/
+ bin_search_tree_.hpp: New.
+ * include/ext/pb_assoc/detail/bin_search_tree_/
+ cond_dtor_entry_dealtor.hpp: New.
+ * include/ext/pb_assoc/detail/bin_search_tree_/
+ cond_key_dtor_entry_dealtor.hpp: New.
+ * include/ext/pb_assoc/detail/bin_search_tree_/
+ constructors_destructor_fn_imps.hpp: New.
+ * include/ext/pb_assoc/detail/bin_search_tree_/debug_fn_imps.hpp: New.
+ * include/ext/pb_assoc/detail/bin_search_tree_/erase_fn_imps.hpp: New.
+ * include/ext/pb_assoc/detail/bin_search_tree_/find_fn_imps.hpp: New.
+ * include/ext/pb_assoc/detail/bin_search_tree_/find_iterators.hpp: New.
+ * include/ext/pb_assoc/detail/bin_search_tree_/info_fn_imps.hpp: New.
+ * include/ext/pb_assoc/detail/bin_search_tree_/insert_fn_imps.hpp: New.
+ * include/ext/pb_assoc/detail/bin_search_tree_/
+ iterators_fn_imps.hpp: New.
+ * include/ext/pb_assoc/detail/bin_search_tree_/node_iterators.hpp: New.
+ * include/ext/pb_assoc/detail/bin_search_tree_/
+ r_erase_fn_imps.hpp: New.
+ * include/ext/pb_assoc/detail/bin_search_tree_/rotate_fn_imps.hpp: New.
+ * include/ext/pb_assoc/detail/bin_search_tree_/
+ split_join_fn_imps.hpp: New.
+ * include/ext/pb_assoc/detail/cc_hash_assoc_cntnr/
+ constructor_destructor_fn_imps.hpp: New.
+ * include/ext/pb_assoc/detail/cc_ht_map_/cc_ht_map_.hpp: New.
+ * include/ext/pb_assoc/detail/cc_ht_map_/cmp_fn_imps.hpp: New.
+ * include/ext/pb_assoc/detail/cc_ht_map_/
+ cond_key_dtor_entry_dealtor.hpp: New.
+ * include/ext/pb_assoc/detail/cc_ht_map_/
+ constructor_destructor_fn_imps.hpp: New.
+ * include/ext/pb_assoc/detail/cc_ht_map_/
+ constructor_destructor_no_store_hash_fn_imps.hpp: New.
+ * include/ext/pb_assoc/detail/cc_ht_map_/
+ constructor_destructor_store_hash_fn_imps.hpp: New.
+ * include/ext/pb_assoc/detail/cc_ht_map_/debug_fn_imps.hpp: New.
+ * include/ext/pb_assoc/detail/cc_ht_map_/
+ debug_no_store_hash_fn_imps.hpp: New.
+ * include/ext/pb_assoc/detail/cc_ht_map_/
+ debug_store_hash_fn_imps.hpp: New.
+ * include/ext/pb_assoc/detail/cc_ht_map_/entry_list_fn_imps.hpp: New.
+ * include/ext/pb_assoc/detail/cc_ht_map_/erase_fn_imps.hpp: New.
+ * include/ext/pb_assoc/detail/cc_ht_map_/
+ erase_no_store_hash_fn_imps.hpp: New.
+ * include/ext/pb_assoc/detail/cc_ht_map_/
+ erase_store_hash_fn_imps.hpp: New.
+ * include/ext/pb_assoc/detail/cc_ht_map_/
+ find_fn_imps.hpp: New.
+ * include/ext/pb_assoc/detail/cc_ht_map_/
+ find_no_store_hash_fn_imps.hpp: New.
+ * include/ext/pb_assoc/detail/cc_ht_map_/
+ find_store_hash_fn_imps.hpp: New.
+ * include/ext/pb_assoc/detail/cc_ht_map_/info_fn_imps.hpp: New.
+ * include/ext/pb_assoc/detail/cc_ht_map_/insert_fn_imps.hpp: New.
+ * include/ext/pb_assoc/detail/cc_ht_map_/
+ insert_no_store_hash_fn_imps.hpp: New.
+ * include/ext/pb_assoc/detail/cc_ht_map_/
+ insert_store_hash_fn_imps.hpp: New.
+ * include/ext/pb_assoc/detail/cc_ht_map_/iterators_fn_imps.hpp: New.
+ * include/ext/pb_assoc/detail/cc_ht_map_/
+ policy_access_fn_imps.hpp: New.
+ * include/ext/pb_assoc/detail/cc_ht_map_/resize_fn_imps.hpp: New.
+ * include/ext/pb_assoc/detail/cc_ht_map_/
+ resize_no_store_hash_fn_imps.hpp: New.
+ * include/ext/pb_assoc/detail/cc_ht_map_/
+ resize_store_hash_fn_imps.hpp: New.
+ * include/ext/pb_assoc/detail/cc_ht_map_/size_fn_imps.hpp: New.
+ * include/ext/pb_assoc/detail/cc_ht_map_/standard_policies.hpp: New.
+ * include/ext/pb_assoc/detail/eq_fn/eq_by_less.hpp: New.
+ * include/ext/pb_assoc/detail/eq_fn/hash_eq_fn.hpp: New.
+ * include/ext/pb_assoc/detail/gp_hash_assoc_cntnr/
+ constructor_destructor_fn_imps.hpp: New.
+ * include/ext/pb_assoc/detail/gp_ht_map_/
+ constructor_destructor_fn_imps.hpp: New.
+ * include/ext/pb_assoc/detail/gp_ht_map_/
+ constructor_destructor_no_store_hash_fn_imps.hpp: New.
+ * include/ext/pb_assoc/detail/gp_ht_map_/
+ constructor_destructor_store_hash_fn_imps.hpp: New.
+ * include/ext/pb_assoc/detail/gp_ht_map_/debug_fn_imps.hpp: New.
+ * include/ext/pb_assoc/detail/gp_ht_map_/
+ debug_no_store_hash_fn_imps.hpp: New.
+ * include/ext/pb_assoc/detail/gp_ht_map_/
+ debug_store_hash_fn_imps.hpp: New.
+ * include/ext/pb_assoc/detail/gp_ht_map_/erase_fn_imps.hpp: New.
+ * include/ext/pb_assoc/detail/gp_ht_map_/
+ erase_no_store_hash_fn_imps.hpp: New.
+ * include/ext/pb_assoc/detail/gp_ht_map_/
+ erase_store_hash_fn_imps.hpp: New.
+ * include/ext/pb_assoc/detail/gp_ht_map_/find_fn_imps.hpp: New.
+ * include/ext/pb_assoc/detail/gp_ht_map_/
+ find_no_store_hash_fn_imps.hpp: New.
+ * include/ext/pb_assoc/detail/gp_ht_map_/
+ find_store_hash_fn_imps.hpp: New.
+ * include/ext/pb_assoc/detail/gp_ht_map_/gp_ht_map_.hpp: New.
+ * include/ext/pb_assoc/detail/gp_ht_map_/info_fn_imps.hpp: New.
+ * include/ext/pb_assoc/detail/gp_ht_map_/insert_fn_imps.hpp: New.
+ * include/ext/pb_assoc/detail/gp_ht_map_/
+ insert_no_store_hash_fn_imps.hpp: New.
+ * include/ext/pb_assoc/detail/gp_ht_map_/
+ insert_store_hash_fn_imps.hpp: New.
+ * include/ext/pb_assoc/detail/gp_ht_map_/iterator_fn_imps.hpp: New.
+ * include/ext/pb_assoc/detail/gp_ht_map_/
+ policy_access_fn_imps.hpp: New.
+ * include/ext/pb_assoc/detail/gp_ht_map_/resize_fn_imps.hpp: New.
+ * include/ext/pb_assoc/detail/gp_ht_map_/
+ resize_no_store_hash_fn_imps.hpp: New.
+ * include/ext/pb_assoc/detail/gp_ht_map_/
+ resize_store_hash_fn_imps.hpp: New.
+ * include/ext/pb_assoc/detail/hash_fn/
+ direct_mask_range_hashing_imp.hpp: New.
+ * include/ext/pb_assoc/detail/hash_fn/
+ direct_mod_range_hashing_imp.hpp: New.
+ * include/ext/pb_assoc/detail/hash_fn/linear_probe_fn_imp.hpp: New.
+ * include/ext/pb_assoc/detail/hash_fn/
+ mask_based_range_hashing.hpp: New.
+ * include/ext/pb_assoc/detail/hash_fn/mod_based_range_hashing.hpp: New.
+ * include/ext/pb_assoc/detail/hash_fn/probe_fn_base.hpp: New.
+ * include/ext/pb_assoc/detail/hash_fn/quadratic_probe_fn_imp.hpp: New.
+ * include/ext/pb_assoc/detail/hash_fn/ranged_hash_fn.hpp: New.
+ * include/ext/pb_assoc/detail/hash_fn/ranged_probe_fn.hpp: New.
+ * include/ext/pb_assoc/detail/lu_assoc_cntnr/
+ constructor_destructor_fn_imps.hpp: New.
+ * include/ext/pb_assoc/detail/lu_assoc_cntnr/
+ policy_access_fn_imps.hpp: New.
+ * include/ext/pb_assoc/detail/lu_map_/
+ constructor_destructor_fn_imps.hpp: New.
+ * include/ext/pb_assoc/detail/lu_map_/debug_fn_imps.hpp: New.
+ * include/ext/pb_assoc/detail/lu_map_/erase_fn_imps.hpp: New.
+ * include/ext/pb_assoc/detail/lu_map_/find_fn_imps.hpp: New.
+ * include/ext/pb_assoc/detail/lu_map_/info_fn_imps.hpp: New.
+ * include/ext/pb_assoc/detail/lu_map_/insert_fn_imps.hpp: New.
+ * include/ext/pb_assoc/detail/lu_map_/iterators_fn_imps.hpp: New.
+ * include/ext/pb_assoc/detail/lu_map_/lu_map_.hpp: New.
+ * include/ext/pb_assoc/detail/lu_map_/policy_access_fn_imps.hpp: New.
+ * include/ext/pb_assoc/detail/lu_policy/
+ counter_lu_metadata_imp.hpp: New.
+ * include/ext/pb_assoc/detail/lu_policy/counter_lu_policy_imp.hpp: New.
+ * include/ext/pb_assoc/detail/lu_policy/mtf_lu_policy_imp.hpp: New.
+ * include/ext/pb_assoc/detail/ov_tree_map_/cond_dtor.hpp: New.
+ * include/ext/pb_assoc/detail/ov_tree_map_/
+ constructors_destructor_fn_imps.hpp: New.
+ * include/ext/pb_assoc/detail/ov_tree_map_/debug_fn_imps.hpp: New.
+ * include/ext/pb_assoc/detail/ov_tree_map_/erase_fn_imps.hpp: New.
+ * include/ext/pb_assoc/detail/ov_tree_map_/find_fn_imps.hpp: New.
+ * include/ext/pb_assoc/detail/ov_tree_map_/info_fn_imps.hpp: New.
+ * include/ext/pb_assoc/detail/ov_tree_map_/insert_fn_imps.hpp: New.
+ * include/ext/pb_assoc/detail/ov_tree_map_/iterators_fn_imps.hpp: New.
+ * include/ext/pb_assoc/detail/ov_tree_map_/node_iterators.hpp: New.
+ * include/ext/pb_assoc/detail/ov_tree_map_/ov_tree_map_.hpp: New.
+ * include/ext/pb_assoc/detail/ov_tree_map_/split_join_fn_imps.hpp: New.
+ * include/ext/pb_assoc/detail/rb_tree_map_/
+ constructors_destructor_fn_imps.hpp: New.
+ * include/ext/pb_assoc/detail/rb_tree_map_/debug_fn_imps.hpp: New.
+ * include/ext/pb_assoc/detail/rb_tree_map_/erase_fn_imps.hpp: New.
+ * include/ext/pb_assoc/detail/rb_tree_map_/find_fn_imps.hpp: New.
+ * include/ext/pb_assoc/detail/rb_tree_map_/info_fn_imps.hpp: New.
+ * include/ext/pb_assoc/detail/rb_tree_map_/insert_fn_imps.hpp: New.
+ * include/ext/pb_assoc/detail/rb_tree_map_/node.hpp: New.
+ * include/ext/pb_assoc/detail/rb_tree_map_/rb_tree_.hpp: New.
+ * include/ext/pb_assoc/detail/rb_tree_map_/split_join_fn_imps.hpp: New.
+ * include/ext/pb_assoc/detail/resize_policy/
+ cc_hash_max_collision_resize_trigger_imp.hpp: New.
+ * include/ext/pb_assoc/detail/resize_policy/
+ hash_exponential_size_policy_imp.hpp: New.
+ * include/ext/pb_assoc/detail/resize_policy/
+ hash_load_check_resize_trigger_imp.hpp: New.
+ * include/ext/pb_assoc/detail/resize_policy/
+ hash_prime_size_policy_imp.hpp: New.
+ * include/ext/pb_assoc/detail/resize_policy/
+ hash_standard_resize_policy_imp.hpp: New.
+ * include/ext/pb_assoc/detail/resize_policy/
+ ht_prime_size_policy_imp.hpp: New.
+ * include/ext/pb_assoc/detail/resize_policy/size_base.hpp: New.
+ * include/ext/pb_assoc/detail/splay_tree_/
+ constructors_destructor_fn_imps.hpp: New.
+ * include/ext/pb_assoc/detail/splay_tree_/debug_fn_imps.hpp: New.
+ * include/ext/pb_assoc/detail/splay_tree_/erase_fn_imps.hpp: New.
+ * include/ext/pb_assoc/detail/splay_tree_/find_fn_imps.hpp: New.
+ * include/ext/pb_assoc/detail/splay_tree_/info_fn_imps.hpp: New.
+ * include/ext/pb_assoc/detail/splay_tree_/insert_fn_imps.hpp: New.
+ * include/ext/pb_assoc/detail/splay_tree_/node.hpp: New.
+ * include/ext/pb_assoc/detail/splay_tree_/splay_fn_imps.hpp: New.
+ * include/ext/pb_assoc/detail/splay_tree_/splay_tree_.hpp: New.
+ * include/ext/pb_assoc/detail/splay_tree_/split_join_fn_imps.hpp: New.
+ * include/ext/pb_assoc/detail/tree_assoc_cntnr/
+ constructor_destructor_fn_imps.hpp: New.
+ * include/ext/pb_assoc/detail/tree_policy/
+ null_node_updator_imp.hpp: New.
+ * include/ext/pb_assoc/detail/tree_policy/
+ order_statistics_imp.hpp: New.
+ * include/ext/pb_assoc/detail/typelist/typelist_append.hpp: New.
+ * include/ext/pb_assoc/detail/typelist/typelist_apply.hpp: New.
+ * include/ext/pb_assoc/detail/typelist/typelist_at_index.hpp: New.
+ * include/ext/pb_assoc/detail/typelist/typelist_contains.hpp: New.
+ * include/ext/pb_assoc/detail/typelist/typelist_filter.hpp: New.
+ * include/ext/pb_assoc/detail/typelist/typelist_transform.hpp: New.
+ * include/ext/pb_assoc/detail/typelist/
+ typelist_typelist_append.hpp: New.
+ * include/ext/pb_assoc/detail/unordered_iterator/
+ const_find_iterator.hpp: New.
+ * include/ext/pb_assoc/detail/unordered_iterator/
+ const_iterator.hpp: New.
+ * include/ext/pb_assoc/detail/unordered_iterator/
+ find_iterator.hpp: New.
+ * include/ext/pb_assoc/detail/unordered_iterator/iterator.hpp: New.
+ * include/ext/pb_assoc/detail/value_type_adapter/
+ constructor_destructor_and_related.hpp: New.
+ * include/ext/pb_assoc/detail/value_type_adapter/
+ erase_fn_imps.hpp: New.
+ * include/ext/pb_assoc/detail/value_type_adapter/
+ erase_if_pred.hpp: New.
+ * include/ext/pb_assoc/detail/value_type_adapter/find_fn_imps.hpp: New.
+ * include/ext/pb_assoc/detail/value_type_adapter/info_fn_imps.hpp: New.
+ * include/ext/pb_assoc/detail/value_type_adapter/
+ insert_fn_imps.hpp: New.
+ * include/ext/pb_assoc/detail/value_type_adapter/
+ invalidation_guarantee_selector.hpp: New.
+ * include/ext/pb_assoc/detail/value_type_adapter/
+ it_value_type_traits.hpp: New.
+ * include/ext/pb_assoc/detail/value_type_adapter/iterator.hpp: New.
+ * include/ext/pb_assoc/detail/value_type_adapter/
+ iterator_fn_imps.hpp: New.
+ * include/ext/pb_assoc/detail/value_type_adapter/ref_pair.hpp: New.
+ * include/ext/pb_assoc/detail/value_type_adapter/
+ value_type_adapter.hpp: New.
+ * include/ext/pb_assoc/detail/value_type_adapter/
+ value_type_traits.hpp: New.
+ * testsuite/Makefile.am (CLEANFILES): Add .o, .dat, .cc.
+ * testsuite/Makefile.in: Regenerate.
+ * testsuite/testsuite_common_types.h: New.
+ * testsuite/testsuite_visualization.h: New.
+ * testsuite/ext/pb_assoc/example/basic_map.cc: New.
+ * testsuite/ext/pb_assoc/example/basic_multimap.cc: New.
+ * testsuite/ext/pb_assoc/example/basic_set.cc: New.
+ * testsuite/ext/pb_assoc/example/ds_traits.cc: New.
+ * testsuite/ext/pb_assoc/example/erase_if.cc: New.
+ * testsuite/ext/pb_assoc/example/extract_key.cc: New.
+ * testsuite/ext/pb_assoc/example/hash_find_neg.cc: New.
+ * testsuite/ext/pb_assoc/example/hash_illegal_resize.cc: New.
+ * testsuite/ext/pb_assoc/example/hash_initial_size.cc: New.
+ * testsuite/ext/pb_assoc/example/hash_load_set_change.cc: New.
+ * testsuite/ext/pb_assoc/example/hash_mod.cc: New.
+ * testsuite/ext/pb_assoc/example/hash_resize.cc: New.
+ * testsuite/ext/pb_assoc/example/hash_resize_neg.cc: New.
+ * testsuite/ext/pb_assoc/example/hash_shift_mask.cc: New.
+ * testsuite/ext/pb_assoc/example/mapping_level.cc: New.
+ * testsuite/ext/pb_assoc/example/mapping_level_neg.cc: New.
+ * testsuite/ext/pb_assoc/example/ms_traits.cc: New.
+ * testsuite/ext/pb_assoc/example/ranged_hash.cc: New.
+ * testsuite/ext/pb_assoc/example/store_hash.cc: New.
+ * testsuite/ext/pb_assoc/example/tree_intervals.cc: New.
+ * testsuite/ext/pb_assoc/example/tree_join.cc: New.
+ * testsuite/ext/pb_assoc/example/tree_order_statistics.cc: New.
+ * testsuite/ext/pb_assoc/example/tree_order_statistics_join.cc: New.
+ * testsuite/ext/pb_assoc/example/tree_split.cc: New.
+ * testsuite/performance/20_util/allocator/(insert.cc,
+ insert_insert.cc, list_sort_search.cc, map_mt_find.cc, map_thread.cc,
+ producer_consumer.cc): Recast to use typelists and move to...
+ * testsuite/performance/23_containers/find/map.cc: New.
+ * testsuite/performance/23_containers/index/map.cc: New.
+ * testsuite/performance/23_containers/insert/associative.cc: New.
+ * testsuite/performance/23_containers/insert/sequence.cc: New.
+ * testsuite/performance/23_containers/insert_erase/associative.cc: New.
+ * testsuite/performance/23_containers/producer_consumer/
+ (associative.cc, sequence.cc): New.
+ * testsuite/performance/23_containers/sort_search/list.cc: New.
+ * testsuite/performance/23_containers/container_benchmark.cc: Remove.
+ * testsuite/performance/23_containers/map_create_fill.cc: Move...
+ * testsuite/performance/23_containers/create/map.cc: ...here.
+ * testsuite/performance/23_containers/set_create_from_sorted.cc: Move.
+ * testsuite/performance/23_containers/create_from_sorted/set.cc: here.
+ * testsuite/performance/23_containers/list_create_fill_sort.cc: Move...
+ * testsuite/performance/23_containers/create_sort/list.cc: ...here.
+ * testsuite/performance/23_containers/set_insert_from_sorted.cc: Move.
+ * testsuite/performance/23_containers/insert_from_sorted/set.cc: here.
+
2005-06-23 Jakub Jelinek <jakub@redhat.com>
PR libstdc++/22109
diff --git a/libstdc++-v3/docs/html/documentation.html b/libstdc++-v3/docs/html/documentation.html
index 48e12cb0a2e..f45bde8df95 100644
--- a/libstdc++-v3/docs/html/documentation.html
+++ b/libstdc++-v3/docs/html/documentation.html
@@ -224,6 +224,7 @@
<li>Extensions to the Standard Library
<ul>
+ <li><a href="ext/pb_assoc/index.html">Policy Based Associative Containers</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>
diff --git a/libstdc++-v3/docs/html/ext/pb_assoc/Std_hash_set_impl.jpg b/libstdc++-v3/docs/html/ext/pb_assoc/Std_hash_set_impl.jpg
new file mode 100644
index 00000000000..ff7bae0eec3
--- /dev/null
+++ b/libstdc++-v3/docs/html/ext/pb_assoc/Std_hash_set_impl.jpg
Binary files differ
diff --git a/libstdc++-v3/docs/html/ext/pb_assoc/acks.html b/libstdc++-v3/docs/html/ext/pb_assoc/acks.html
new file mode 100644
index 00000000000..a4971d120c3
--- /dev/null
+++ b/libstdc++-v3/docs/html/ext/pb_assoc/acks.html
@@ -0,0 +1,46 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
+<html>
+ <head>
+ <title>Acknowledgements</title>
+ <meta name="GENERATOR" content="Microsoft Visual Studio .NET 7.1">
+ <meta name="vs_targetSchema" content="http://schemas.microsoft.com/intellisense/ie5">
+ </head>
+<body>
+<h1>Acknowledgements</h1>
+
+
+<ol>
+ <li>This library was written at the <a href = "http://www.haifa.il.ibm.com/dept/storage/network.html">Network Storage Technologies</a> Group of
+<a href = "http://www.haifa.il.ibm.com/">IBM's Haifa Research Labs</a>.</li>
+ <li>The library is based heavily on policy-based design and uses many useful
+techniques from [<a href="references.html#knuth98sorting">alexandrescu01modern</a>].
+ </li>
+ <li> Two ideas are borrowed from the SGI-STL implementation [<a href = "references.html#sgi_stl">sgi_stl</a>]:
+ <ol>
+ <li>
+ The prime-based resize policies use a list of primes taken from the SGI-STL implementation.
+ </li>
+ <li> The red-black trees contain both a root node and a header
+ node (containing metadata), connected in a way
+ that forward and reverse iteration can be performed efficiently.
+ </li>
+ </ol>
+ </li>
+ <li> Some test utilities borrow ideas from [<a href = "references.html#boost_timer">boost_timer</a>].
+ </li>
+ <li> We would like to thank Scott Meyers for useful comments (without attributing to him
+ any flaws in the design or implementation of the library).
+ </li>
+ <li> Much of the documentation is
+<a href = "http://www.python.org/">
+<img src="PythonPoweredSmall.gif" align=top width=55
+ height=22 alt="[Python Powered]" border=0>
+</a>.
+ </li>
+</ol>
+
+
+
+</body>
+
+</html>
diff --git a/libstdc++-v3/docs/html/ext/pb_assoc/balls_and_bins.jpg b/libstdc++-v3/docs/html/ext/pb_assoc/balls_and_bins.jpg
new file mode 100644
index 00000000000..d9f7e8bb048
--- /dev/null
+++ b/libstdc++-v3/docs/html/ext/pb_assoc/balls_and_bins.jpg
Binary files differ
diff --git a/libstdc++-v3/docs/html/ext/pb_assoc/basic_assoc_cntnr.html b/libstdc++-v3/docs/html/ext/pb_assoc/basic_assoc_cntnr.html
new file mode 100644
index 00000000000..ca91c332eda
--- /dev/null
+++ b/libstdc++-v3/docs/html/ext/pb_assoc/basic_assoc_cntnr.html
@@ -0,0 +1,1229 @@
+
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
+
+
+<html>
+<head>
+<title>basic_assoc_cntnr Interface
+</title>
+
+</head>
+
+<body>
+<h1>
+<tt>basic_assoc_cntnr
+</tt>
+
+ Interface
+
+
+</h1>
+
+<p>A basic associative container, specialized for the &quot;map&quot; case.
+</p>
+
+<ol>
+<li>
+<a href = "../../../../include/ext/pb_assoc/assoc_cntnr.hpp"><tt>assoc_cntnr.hpp</tt>
+</a>
+
+</li>
+
+<li>
+<a href = "#link1">Template parameters.
+</a>
+
+</li>
+
+<li>
+Public Types and Constants:
+
+
+<ol>
+<li>
+<a href = "#link2">General container definitions.
+</a>
+
+</li>
+
+<li>
+<a href = "#link3">Categories.
+</a>
+
+</li>
+
+<li>
+<a href = "#link4">Policy definitions.
+</a>
+
+</li>
+
+<li>
+<a href = "#link5">Key-type definitions.
+</a>
+
+</li>
+
+<li>
+<a href = "#link6">Data-type definitions.
+</a>
+
+</li>
+
+<li>
+<a href = "#link7">Value-type definitions.
+</a>
+
+</li>
+
+<li>
+<a href = "#link8">Iterator definitions.
+</a>
+
+</li>
+
+</ol>
+
+</li>
+
+<li>
+Public Methods:
+
+
+<ol>
+<li>
+<a href = "#link9">Constructors, destructor, and related.
+</a>
+
+</li>
+
+<li>
+<a href = "#link10">Information methods.
+</a>
+
+</li>
+
+<li>
+<a href = "#link11">Insert methods.
+</a>
+
+</li>
+
+<li>
+<a href = "#link12">Find methods.
+</a>
+
+</li>
+
+<li>
+<a href = "#link13">Erase methods.
+</a>
+
+</li>
+
+<li>
+<a href = "#link14">Iteration methods.
+</a>
+
+</li>
+
+</ol>
+
+</li>
+
+</ol>
+
+
+<h2>
+<a name = "link1">Template parameters.
+</a>
+
+</h2>
+
+<table WIDTH = "100%" BORDER = "1">
+<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 = "Key3735928856">Key</a></pre>
+
+
+</td>
+
+<td>
+<p>Key type.</p>
+
+
+</td>
+
+<td>
+-
+
+
+</td>
+
+</tr>
+
+<tr>
+<td>
+<pre><a name = "Data3735928937">Data</a></pre>
+
+
+</td>
+
+<td>
+<p>Data type.</p>
+
+
+</td>
+
+<td>
+-
+
+
+</td>
+
+</tr>
+
+<tr>
+<td>
+<pre><a name = "DS_Tag3735929089">DS_Tag</a></pre>
+
+
+</td>
+
+<td>
+<p>Data structure tag.</p>
+
+
+</td>
+
+<td>
+-
+
+
+</td>
+
+</tr>
+
+<tr>
+<td>
+<pre><a name = "Policy_Tl3735929470">Policy_Tl</a></pre>
+
+
+</td>
+
+<td>
+<p>Policy typelist.</p>
+
+
+</td>
+
+<td>
+-
+
+
+</td>
+
+</tr>
+
+<tr>
+<td>
+<pre><a name = "Allocator3735929488">Allocator</a></pre>
+
+
+</td>
+
+<td>
+<p>Allocator type.</p>
+
+
+</td>
+
+<td>
+-
+
+
+</td>
+
+</tr>
+
+</table>
+
+<h2>
+<a name = "link2">General container definitions.
+</a>
+
+</h2>
+
+<table WIDTH = "100%" BORDER = "1">
+<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_type3735929547">size_type</a></pre>
+
+
+</td>
+
+<td>
+<pre><b>typename</b> <a href = "#Allocator3735929488">Allocator</a>::size_type</pre>
+
+
+</td>
+
+<td>
+<p>Size type.</p>
+
+
+</td>
+
+</tr>
+
+<tr>
+<td>
+<pre><a name = "difference_type3735930139">difference_type</a></pre>
+
+
+</td>
+
+<td>
+<pre><b>typename</b> <a href = "#Allocator3735929488">Allocator</a>::difference_type</pre>
+
+
+</td>
+
+<td>
+<p>Difference type.</p>
+
+
+</td>
+
+</tr>
+
+</table>
+
+<h2>
+<a name = "link3">Categories.
+</a>
+
+</h2>
+
+<table WIDTH = "100%" BORDER = "1">
+<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 = "ds_category3735929731">ds_category</a></pre>
+
+
+</td>
+
+<td>
+<pre><a href = "#DS_Tag3735929089">DS_Tag</a></pre>
+
+
+</td>
+
+<td>
+<p>The underlying data-structure tag of the container. comment = </p>
+
+
+</td>
+
+</tr>
+
+<tr>
+<td>
+<pre><a name = "ms_category3735929740">ms_category</a></pre>
+
+
+</td>
+
+<td>
+<pre><a href = "data_enabled_ms_tag.html"><tt>data_enabled_ms_tag</tt></a></pre>
+
+
+</td>
+
+<td>
+<p>The mapping-semantics category of the container.</p>
+
+
+</td>
+
+</tr>
+
+</table>
+
+<h2>
+<a name = "link4">Policy definitions.
+</a>
+
+</h2>
+
+<table WIDTH = "100%" BORDER = "1">
+<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 = "allocator3735929520">allocator</a></pre>
+
+
+</td>
+
+<td>
+<pre><a href = "#Allocator3735929488">Allocator</a></pre>
+
+
+</td>
+
+<td>
+<p>Allocator type.</p>
+
+
+</td>
+
+</tr>
+
+</table>
+
+<h2>
+<a name = "link5">Key-type definitions.
+</a>
+
+</h2>
+
+<table WIDTH = "100%" BORDER = "1">
+<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_type3735929433">key_type</a></pre>
+
+
+</td>
+
+<td>
+<pre><b>typename</b> <a href = "#allocator3735929520">allocator</a>::<b>template</b> rebind&lt;
+ <a href = "#Key3735928856">Key</a>&gt;::other::value_type</pre>
+
+
+</td>
+
+<td>
+<p>Key type.</p>
+
+
+</td>
+
+</tr>
+
+<tr>
+<td>
+<pre><a name = "key_reference3735929926">key_reference</a></pre>
+
+
+</td>
+
+<td>
+<pre><b>typename</b> <a href = "#allocator3735929520">allocator</a>::<b>template</b> rebind&lt;
+ <a href = "#Key3735928856">Key</a>&gt;::other::reference</pre>
+
+
+</td>
+
+<td>
+<p>Key reference type.</p>
+
+
+</td>
+
+</tr>
+
+<tr>
+<td>
+<pre><a name = "const_key_reference3735929552">const_key_reference</a></pre>
+
+
+</td>
+
+<td>
+<pre><b>typename</b> <a href = "#allocator3735929520">allocator</a>::<b>template</b> rebind&lt;
+ <a href = "#Key3735928856">Key</a>&gt;::other::const_reference</pre>
+
+
+</td>
+
+<td>
+<p>Const key reference type.</p>
+
+
+</td>
+
+</tr>
+
+<tr>
+<td>
+<pre><a name = "key_pointer3735929752">key_pointer</a></pre>
+
+
+</td>
+
+<td>
+<pre><b>typename</b> <a href = "#allocator3735929520">allocator</a>::<b>template</b> rebind&lt;
+ <a href = "#Key3735928856">Key</a>&gt;::other::pointer</pre>
+
+
+</td>
+
+<td>
+<p>Key pointer type.</p>
+
+
+</td>
+
+</tr>
+
+<tr>
+<td>
+<pre><a name = "const_key_pointer3735929445">const_key_pointer</a></pre>
+
+
+</td>
+
+<td>
+<pre><b>typename</b> <a href = "#allocator3735929520">allocator</a>::<b>template</b> rebind&lt;
+ <a href = "#Key3735928856">Key</a>&gt;::other::const_pointer</pre>
+
+
+</td>
+
+<td>
+<p>Const key pointer type.</p>
+
+
+</td>
+
+</tr>
+
+</table>
+
+<h2>
+<a name = "link6">Data-type definitions.
+</a>
+
+</h2>
+
+<table WIDTH = "100%" BORDER = "1">
+<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 = "data_type3735929514">data_type</a></pre>
+
+
+</td>
+
+<td>
+<pre><b>typename</b> <a href = "#allocator3735929520">allocator</a>::<b>template</b> rebind&lt;
+ <a href = "#Data3735928937">Data</a>&gt;::other::value_type</pre>
+
+
+</td>
+
+<td>
+<p>Data type.</p>
+
+
+</td>
+
+</tr>
+
+<tr>
+<td>
+<pre><a name = "data_reference3735930007">data_reference</a></pre>
+
+
+</td>
+
+<td>
+<pre><b>typename</b> <a href = "#allocator3735929520">allocator</a>::<b>template</b> rebind&lt;
+ <a href = "#Data3735928937">Data</a>&gt;::other::reference</pre>
+
+
+</td>
+
+<td>
+<p>Data reference type.</p>
+
+
+</td>
+
+</tr>
+
+<tr>
+<td>
+<pre><a name = "const_data_reference3735929597">const_data_reference</a></pre>
+
+
+</td>
+
+<td>
+<pre><b>typename</b> <a href = "#allocator3735929520">allocator</a>::<b>template</b> rebind&lt;
+ <a href = "#Data3735928937">Data</a>&gt;::other::const_reference</pre>
+
+
+</td>
+
+<td>
+<p>Const data reference type.</p>
+
+
+</td>
+
+</tr>
+
+<tr>
+<td>
+<pre><a name = "data_pointer3735929833">data_pointer</a></pre>
+
+
+</td>
+
+<td>
+<pre><b>typename</b> <a href = "#allocator3735929520">allocator</a>::<b>template</b> rebind&lt;
+ <a href = "#Data3735928937">Data</a>&gt;::other::pointer</pre>
+
+
+</td>
+
+<td>
+<p>Data pointer type.</p>
+
+
+</td>
+
+</tr>
+
+<tr>
+<td>
+<pre><a name = "const_data_pointer3735929517">const_data_pointer</a></pre>
+
+
+</td>
+
+<td>
+<pre><b>typename</b> <a href = "#allocator3735929520">allocator</a>::<b>template</b> rebind&lt;
+ <a href = "#Data3735928937">Data</a>&gt;::other::const_pointer</pre>
+
+
+</td>
+
+<td>
+<p>Const data pointer type.</p>
+
+
+</td>
+
+</tr>
+
+</table>
+
+<h2>
+<a name = "link7">Value-type definitions.
+</a>
+
+</h2>
+
+<p><p>Types pertaining to the <b>domain</b> of the relationships of the table.</p> <p>This is explained in <a href = "concepts.html#concepts_types">Data Types, Value Types, Mapped Data Types, and Mapped Value Types</a> and <a href = "non_unique_mapping.html#types">Mapped Data Types and Mapped Value Types</a>.</p></p>
+
+
+<table WIDTH = "100%" BORDER = "1">
+<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 = "value_type3735929645">value_type</a></pre>
+
+
+</td>
+
+<td>
+<pre><b>typename</b> <a href = "#allocator3735929520">allocator</a>::rebind&lt;
+ std::pair&lt;<b>const</b> <a href = "#key_type3735929433">key_type</a>, <a href = "#data_type3735929514">data_type</a>&gt; &gt;::other::value_type</pre>
+
+
+</td>
+
+<td>
+<p>Data type.</p>
+
+
+</td>
+
+</tr>
+
+<tr>
+<td>
+<pre><a name = "reference3735929502">reference</a></pre>
+
+
+</td>
+
+<td>
+<pre><b>typename</b> <a href = "#allocator3735929520">allocator</a>::rebind&lt;
+ std::pair&lt;<b>const</b> <a href = "#key_type3735929433">key_type</a>, <a href = "#data_type3735929514">data_type</a>&gt; &gt;::other::reference</pre>
+
+
+</td>
+
+<td>
+<p>Value reference type.</p>
+
+
+</td>
+
+</tr>
+
+<tr>
+<td>
+<pre><a name = "const_reference3735930148">const_reference</a></pre>
+
+
+</td>
+
+<td>
+<pre><b>typename</b> <a href = "#allocator3735929520">allocator</a>::rebind&lt;
+ std::pair&lt;<b>const</b> <a href = "#key_type3735929433">key_type</a>, <a href = "#data_type3735929514">data_type</a>&gt; &gt;::other::const_reference</pre>
+
+
+</td>
+
+<td>
+<p>Const value reference type.</p>
+
+
+</td>
+
+</tr>
+
+<tr>
+<td>
+<pre><a name = "pointer3735929328">pointer</a></pre>
+
+
+</td>
+
+<td>
+<pre><b>typename</b> <a href = "#allocator3735929520">allocator</a>::rebind&lt;
+ std::pair&lt;<b>const</b> <a href = "#key_type3735929433">key_type</a>, <a href = "#data_type3735929514">data_type</a>&gt; &gt;::other::pointer</pre>
+
+
+</td>
+
+<td>
+<p>Value pointer type.</p>
+
+
+</td>
+
+</tr>
+
+<tr>
+<td>
+<pre><a name = "const_pointer3735929974">const_pointer</a></pre>
+
+
+</td>
+
+<td>
+<pre><b>typename</b> <a href = "#allocator3735929520">allocator</a>::rebind&lt;
+ std::pair&lt;<b>const</b> <a href = "#key_type3735929433">key_type</a>, <a href = "#data_type3735929514">data_type</a>&gt; &gt;::other::const_pointer</pre>
+
+
+</td>
+
+<td>
+<p>Const Value pointer type.</p>
+
+
+</td>
+
+</tr>
+
+</table>
+
+<h2>
+<a name = "link8">Iterator definitions.
+</a>
+
+</h2>
+
+<table WIDTH = "100%" BORDER = "1">
+<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_find_iterator3735929537">const_find_iterator</a></pre>
+
+
+</td>
+
+<td>
+<pre>Underlying data-structure's const find-type iterator.</pre>
+
+
+</td>
+
+<td>
+<p>Const find-type iterator.</p>
+
+
+</td>
+
+</tr>
+
+<tr>
+<td>
+<pre><a name = "find_iterator3735929945">find_iterator</a></pre>
+
+
+</td>
+
+<td>
+<pre>Underlying data-structure's find-type iterator.</pre>
+
+
+</td>
+
+<td>
+<p>Find-type iterator.</p>
+
+
+</td>
+
+</tr>
+
+<tr>
+<td>
+<pre><a name = "const_iterator3735930079">const_iterator</a></pre>
+
+
+</td>
+
+<td>
+<pre>Underlying data-structure's const range-type iterator.</pre>
+
+
+</td>
+
+<td>
+<p>Const range-type iterator.</p>
+
+
+</td>
+
+</tr>
+
+<tr>
+<td>
+<pre><a name = "iterator3735929433">iterator</a></pre>
+
+
+</td>
+
+<td>
+<pre>Underlying data-structure's range-type iterator.</pre>
+
+
+</td>
+
+<td>
+<p>Range-type iterator.</p>
+
+
+</td>
+
+</tr>
+
+</table>
+
+<h2>
+<a name = "link9">Constructors, destructor, and related.
+</a>
+
+</h2>
+
+<table WIDTH = "100%" BORDER = "1">
+<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>
+ ~basic_assoc_cntnr
+ ()</pre>
+
+
+</td>
+
+<td>
+<p>Destructor.</p>
+
+
+</td>
+
+</tr>
+
+</table>
+
+<h2>
+<a name = "link10">Information methods.
+</a>
+
+</h2>
+
+<table WIDTH = "100%" BORDER = "1">
+<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> <a href = "#size_type3735929547">size_type</a>
+ size
+ () <b>const</b></pre>
+
+
+</td>
+
+<td>
+<p>Returns the number of distinct <a href = "#value_type3735929645"><tt>value_type</tt></a> objects the container object is storing.</p>
+
+
+</td>
+
+</tr>
+
+<tr>
+<td>
+<pre><b>inline</b> <a href = "#size_type3735929547">size_type</a>
+ max_size
+ () <b>const</b></pre>
+
+
+</td>
+
+<td>
+<p>Returns an upper bound on the number of distinct <a href = "#value_type3735929645"><tt>value_type</tt></a> objects this container can store.</p>
+
+
+</td>
+
+</tr>
+
+<tr>
+<td>
+<pre><b>inline</b> <b>bool</b>
+ empty
+ () <b>const</b></pre>
+
+
+</td>
+
+<td>
+<p>Returns whether the container object is not storing any <a href = "#value_type3735929645"><tt>value_type</tt></a> objects.</p>
+
+
+</td>
+
+</tr>
+
+<tr>
+<td>
+<pre><b>inline</b> static <a href = "#const_key_reference3735929552">const_key_reference</a>
+ extract_key
+ (<a href = "#const_reference3735930148">const_reference</a> r_val)</pre>
+
+
+</td>
+
+<td>
+<p>Extracts a key from a <a href = "#value_type3735929645"><tt>value_type</tt></a>.</p>
+
+
+</td>
+
+</tr>
+
+</table>
+
+<h2>
+<a name = "link11">Insert methods.
+</a>
+
+</h2>
+
+<table WIDTH = "100%" BORDER = "1">
+<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> std::pair&lt;<a href = "#find_iterator3735929945">find_iterator</a>, <b>bool</b>&gt;
+ insert
+ (<a href = "#const_reference3735930148">const_reference</a> r_val)</pre>
+
+
+</td>
+
+<td>
+<p>Inserts a <a href = "#value_type3735929645"><tt>value_type</tt></a> object. If no <a href = "#value_type3735929645"><tt>value_type</tt></a> with <font color = "#666666"><tt>r_val</tt></font>'s key was in the container object, inserts and returns (<a href = "#find_iterator3735929945"><tt>find_iterator</tt></a> object associated with <font color = "#666666"><tt>r_val</tt></font>, <tt><b>true</b></tt>); otherwise just returns (<a href = "#find_iterator3735929945"><tt>find_iterator</tt></a> object associated with <font color = "#666666"><tt>r_val</tt></font>'s key, <tt><b>false</b></tt>).</p>
+
+
+</td>
+
+</tr>
+
+<tr>
+<td>
+<pre><b>inline</b> <a href = "#data_reference3735930007">data_reference</a>
+ <b>operator</b>[]
+ (<a href = "#const_key_reference3735929552">const_key_reference</a> r_key)</pre>
+
+
+</td>
+
+<td>
+<p>Inserts (if necessary) a <a href = "#value_type3735929645"><tt>value_type</tt></a> object associated with <font color = "#666666"><tt>r_key</tt></font>. Returns a <a href = "#data_reference3735930007"><tt>data_reference</tt></a> associated with <font color = "#666666"><tt>r_key</tt></font></p>
+
+
+</td>
+
+</tr>
+
+</table>
+
+<h2>
+<a name = "link12">Find methods.
+</a>
+
+</h2>
+
+<table WIDTH = "100%" BORDER = "1">
+<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> <a href = "#find_iterator3735929945">find_iterator</a>
+ find
+ (<a href = "#const_key_reference3735929552">const_key_reference</a> r_key)</pre>
+
+
+</td>
+
+<td>
+<p>Returns the <a href = "#find_iterator3735929945"><tt>find_iterator</tt></a> corresponding to the <a href = "#value_type3735929645"><tt>value_type</tt></a> with <font color = "#666666"><tt>r_key</tt></font> as its key, or the <a href = "#find_iterator3735929945"><tt>find_iterator</tt></a> corresponding to the just-after-last entry if no such <a href = "#value_type3735929645"><tt>value_type</tt></a>.</p>
+
+
+</td>
+
+</tr>
+
+<tr>
+<td>
+<pre><b>inline</b> <a href = "#const_find_iterator3735929537">const_find_iterator</a>
+ find
+ (<a href = "#const_key_reference3735929552">const_key_reference</a> r_key) <b>const</b></pre>
+
+
+</td>
+
+<td>
+<p>Returns the <a href = "#const_find_iterator3735929537"><tt>const_find_iterator</tt></a> corresponding to the <a href = "#value_type3735929645"><tt>value_type</tt></a> with <font color = "#666666"><tt>r_key</tt></font> as its key, or the <a href = "#const_find_iterator3735929537"><tt>const_find_iterator</tt></a> corresponding to the just-after-last entry if no such <a href = "#value_type3735929645"><tt>value_type</tt></a>.</p>
+
+
+</td>
+
+</tr>
+
+<tr>
+<td>
+<pre><b>inline</b> <a href = "#const_data_reference3735929597">const_data_reference</a>
+ <b>operator</b>[]
+ (<a href = "#const_key_reference3735929552">const_key_reference</a> r_key) <b>const</b></pre>
+
+
+</td>
+
+<td>
+<p>Inserts (if necessary) a <a href = "#value_type3735929645"><tt>value_type</tt></a> object associated with <font color = "#666666"><tt>r_key</tt></font>. Returns a <a href = "#data_reference3735930007"><tt>data_reference</tt></a> associated with <font color = "#666666"><tt>r_key</tt></font></p>
+
+
+</td>
+
+</tr>
+
+</table>
+
+<h2>
+<a name = "link13">Erase methods.
+</a>
+
+</h2>
+
+<table WIDTH = "100%" BORDER = "1">
+<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> <a href = "#size_type3735929547">size_type</a>
+ erase
+ (<a href = "#const_key_reference3735929552">const_key_reference</a> r_key)</pre>
+
+
+</td>
+
+<td>
+<p>Erases the <a href = "#value_type3735929645"><tt>value_type</tt></a> associated with <font color = "#666666"><tt>r_key</tt></font>; returns the number of <a href = "#value_type3735929645"><tt>value_type</tt></a>s erased (0 or 1).</p>
+
+
+</td>
+
+</tr>
+
+<tr>
+<td>
+<pre><b>template</b>&lt;
+ <b>class</b> Pred&gt;
+<b>inline</b> <a href = "#size_type3735929547">size_type</a>
+ erase_if
+ (Pred prd)</pre>
+
+
+</td>
+
+<td>
+<p>Erases any <a href = "#value_type3735929645"><tt>value_type</tt></a> satisfying the predicate <font color = "#666666"><tt>prd</tt></font> (this is transactional, either all matching <a href = "#value_type3735929645"><tt>value_type</tt></a>s are erased, or, if an exception is thrown (for types whose erase can throw an exception) none); returns the number of <a href = "#value_type3735929645"><tt>value_type</tt></a>s erased.</p>
+
+
+</td>
+
+</tr>
+
+<tr>
+<td>
+<pre><b>void</b>
+ clear
+ ()</pre>
+
+
+</td>
+
+<td>
+<p>Clears the container object.</p>
+
+
+</td>
+
+</tr>
+
+</table>
+
+<h2>
+<a name = "link14">Iteration methods.
+</a>
+
+</h2>
+
+<table WIDTH = "100%" BORDER = "1">
+<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> <a href = "#iterator3735929433">iterator</a>
+ begin
+ ()</pre>
+
+
+</td>
+
+<td>
+<p>Returns an <a href = "#iterator3735929433"><tt>iterator</tt></a> corresponding to the first <a href = "#value_type3735929645"><tt>value_type</tt></a> in the container.</p>
+
+
+</td>
+
+</tr>
+
+<tr>
+<td>
+<pre><b>inline</b> <a href = "#const_iterator3735930079">const_iterator</a>
+ begin
+ () <b>const</b></pre>
+
+
+</td>
+
+<td>
+<p>Returns a <a href = "#const_iterator3735930079"><tt>const_iterator</tt></a> corresponding to the first <a href = "#value_type3735929645"><tt>value_type</tt></a> in the container.</p>
+
+
+</td>
+
+</tr>
+
+<tr>
+<td>
+<pre><b>inline</b> <a href = "#iterator3735929433">iterator</a>
+ end
+ ()</pre>
+
+
+</td>
+
+<td>
+<p>Returns an <a href = "#iterator3735929433"><tt>iterator</tt></a> corresponding to the just-after_last <a href = "#value_type3735929645"><tt>value_type</tt></a> in the container.</p>
+
+
+</td>
+
+</tr>
+
+<tr>
+<td>
+<pre><b>inline</b> <a href = "#const_iterator3735930079">const_iterator</a>
+ end
+ () <b>const</b></pre>
+
+
+</td>
+
+<td>
+<p>Returns a <a href = "#const_iterator3735930079"><tt>const_iterator</tt></a> corresponding to the just-after_last <a href = "#value_type3735929645"><tt>value_type</tt></a> in the container.</p>
+
+
+</td>
+
+</tr>
+
+</table>
+
+
+
+</body>
+
+</html>
+
+
diff --git a/libstdc++-v3/docs/html/ext/pb_assoc/basic_assoc_cntnr_compound_data.html b/libstdc++-v3/docs/html/ext/pb_assoc/basic_assoc_cntnr_compound_data.html
new file mode 100644
index 00000000000..4cde4dbb8b1
--- /dev/null
+++ b/libstdc++-v3/docs/html/ext/pb_assoc/basic_assoc_cntnr_compound_data.html
@@ -0,0 +1,1244 @@
+
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
+
+
+<html>
+<head>
+<title>basic_assoc_cntnr Interface
+</title>
+
+</head>
+
+<body>
+<h1>
+<tt>basic_assoc_cntnr
+</tt>
+
+ Interface
+
+
+</h1>
+
+<p>A basic associative container specialized for the &quot;multimap&quot; case.
+</p>
+
+<ol>
+<li>
+<a href = "../../../../include/ext/pb_assoc/assoc_cntnr.hpp"><tt>assoc_cntnr.hpp</tt>
+</a>
+
+</li>
+
+<li>
+<a href = "#link1">Template parameters.
+</a>
+
+</li>
+
+<li>
+Public Types and Constants:
+
+
+<ol>
+<li>
+<a href = "#link2">General container definitions.
+</a>
+
+</li>
+
+<li>
+<a href = "#link3">Categories.
+</a>
+
+</li>
+
+<li>
+<a href = "#link4">Policy definitions.
+</a>
+
+</li>
+
+<li>
+<a href = "#link5">Key-type definitions.
+</a>
+
+</li>
+
+<li>
+<a href = "#link6">Data-type definitions.
+</a>
+
+</li>
+
+<li>
+<a href = "#link7">Value-type definitions.
+</a>
+
+</li>
+
+<li>
+<a href = "#link8">Iterator definitions.
+</a>
+
+</li>
+
+<li>
+<a href = "#link9">Mapping-level definitions.
+</a>
+
+</li>
+
+</ol>
+
+</li>
+
+<li>
+Public Methods:
+
+
+<ol>
+<li>
+<a href = "#link10">Constructors, destructor, and related.
+</a>
+
+</li>
+
+<li>
+<a href = "#link11">Information methods.
+</a>
+
+</li>
+
+<li>
+<a href = "#link12">Insert methods.
+</a>
+
+</li>
+
+<li>
+<a href = "#link13">Find methods.
+</a>
+
+</li>
+
+<li>
+<a href = "#link14">Erase methods.
+</a>
+
+</li>
+
+<li>
+<a href = "#link15">Iteration methods.
+</a>
+
+</li>
+
+</ol>
+
+</li>
+
+</ol>
+
+
+<h2>
+<a name = "link1">Template parameters.
+</a>
+
+</h2>
+
+<table WIDTH = "100%" BORDER = "1">
+<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 = "Key3735928856">Key</a></pre>
+
+
+</td>
+
+<td>
+<p>Key type.</p>
+
+
+</td>
+
+<td>
+-
+
+
+</td>
+
+</tr>
+
+<tr>
+<td>
+<pre><a name = "Cntnr3735929076">Cntnr</a></pre>
+
+
+</td>
+
+<td>
+<p>(Associative) container to which each data is mapped.</p>
+
+
+</td>
+
+<td>
+-
+
+
+</td>
+
+</tr>
+
+<tr>
+<td>
+<pre><a name = "DS_Tag3735929089">DS_Tag</a></pre>
+
+
+</td>
+
+<td>
+<p>Data structure tag.</p>
+
+
+</td>
+
+<td>
+-
+
+
+</td>
+
+</tr>
+
+<tr>
+<td>
+<pre><a name = "Policy_Tl3735929470">Policy_Tl</a></pre>
+
+
+</td>
+
+<td>
+<p>Policy typelist.</p>
+
+
+</td>
+
+<td>
+-
+
+
+</td>
+
+</tr>
+
+<tr>
+<td>
+<pre><a name = "Allocator3735929488">Allocator</a></pre>
+
+
+</td>
+
+<td>
+<p>Allocator type.</p>
+
+
+</td>
+
+<td>
+-
+
+
+</td>
+
+</tr>
+
+</table>
+
+<h2>
+<a name = "link2">General container definitions.
+</a>
+
+</h2>
+
+<table WIDTH = "100%" BORDER = "1">
+<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_type3735929547">size_type</a></pre>
+
+
+</td>
+
+<td>
+<pre><b>typename</b> <a href = "#Allocator3735929488">Allocator</a>::size_type</pre>
+
+
+</td>
+
+<td>
+<p>Size type.</p>
+
+
+</td>
+
+</tr>
+
+<tr>
+<td>
+<pre><a name = "difference_type3735930139">difference_type</a></pre>
+
+
+</td>
+
+<td>
+<pre><b>typename</b> <a href = "#Allocator3735929488">Allocator</a>::difference_type</pre>
+
+
+</td>
+
+<td>
+<p>Difference type.</p>
+
+
+</td>
+
+</tr>
+
+</table>
+
+<h2>
+<a name = "link3">Categories.
+</a>
+
+</h2>
+
+<table WIDTH = "100%" BORDER = "1">
+<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 = "ds_category3735929731">ds_category</a></pre>
+
+
+</td>
+
+<td>
+<pre><a href = "#DS_Tag3735929089">DS_Tag</a></pre>
+
+
+</td>
+
+<td>
+<p>The underlying data-structure tag of the container. comment = </p>
+
+
+</td>
+
+</tr>
+
+<tr>
+<td>
+<pre><a name = "ms_category3735929740">ms_category</a></pre>
+
+
+</td>
+
+<td>
+<pre><a href = "compound_data_enabled_ms_tag.html"><tt>compound_data_enabled_ms_tag</tt></a></pre>
+
+
+</td>
+
+<td>
+<p>The mapping-semantics category of the container. override_from = </p>
+
+
+</td>
+
+</tr>
+
+</table>
+
+<h2>
+<a name = "link4">Policy definitions.
+</a>
+
+</h2>
+
+<table WIDTH = "100%" BORDER = "1">
+<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 = "allocator3735929520">allocator</a></pre>
+
+
+</td>
+
+<td>
+<pre><a href = "#Allocator3735929488">Allocator</a></pre>
+
+
+</td>
+
+<td>
+<p>Allocator type.</p>
+
+
+</td>
+
+</tr>
+
+</table>
+
+<h2>
+<a name = "link5">Key-type definitions.
+</a>
+
+</h2>
+
+<table WIDTH = "100%" BORDER = "1">
+<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_type3735929433">key_type</a></pre>
+
+
+</td>
+
+<td>
+<pre><b>typename</b> <a href = "#allocator3735929520">allocator</a>::<b>template</b> rebind&lt;
+ <a href = "#Key3735928856">Key</a>&gt;::other::value_type</pre>
+
+
+</td>
+
+<td>
+<p>Key type.</p>
+
+
+</td>
+
+</tr>
+
+<tr>
+<td>
+<pre><a name = "key_reference3735929926">key_reference</a></pre>
+
+
+</td>
+
+<td>
+<pre><b>typename</b> <a href = "#allocator3735929520">allocator</a>::<b>template</b> rebind&lt;
+ <a href = "#Key3735928856">Key</a>&gt;::other::reference</pre>
+
+
+</td>
+
+<td>
+<p>Key reference type.</p>
+
+
+</td>
+
+</tr>
+
+<tr>
+<td>
+<pre><a name = "const_key_reference3735929552">const_key_reference</a></pre>
+
+
+</td>
+
+<td>
+<pre><b>typename</b> <a href = "#allocator3735929520">allocator</a>::<b>template</b> rebind&lt;
+ <a href = "#Key3735928856">Key</a>&gt;::other::const_reference</pre>
+
+
+</td>
+
+<td>
+<p>Const key reference type.</p>
+
+
+</td>
+
+</tr>
+
+<tr>
+<td>
+<pre><a name = "key_pointer3735929752">key_pointer</a></pre>
+
+
+</td>
+
+<td>
+<pre><b>typename</b> <a href = "#allocator3735929520">allocator</a>::<b>template</b> rebind&lt;
+ <a href = "#Key3735928856">Key</a>&gt;::other::pointer</pre>
+
+
+</td>
+
+<td>
+<p>Key pointer type.</p>
+
+
+</td>
+
+</tr>
+
+<tr>
+<td>
+<pre><a name = "const_key_pointer3735929445">const_key_pointer</a></pre>
+
+
+</td>
+
+<td>
+<pre><b>typename</b> <a href = "#allocator3735929520">allocator</a>::<b>template</b> rebind&lt;
+ <a href = "#Key3735928856">Key</a>&gt;::other::const_pointer</pre>
+
+
+</td>
+
+<td>
+<p>Const key pointer type.</p>
+
+
+</td>
+
+</tr>
+
+</table>
+
+<h2>
+<a name = "link6">Data-type definitions.
+</a>
+
+</h2>
+
+<table WIDTH = "100%" BORDER = "1">
+<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 = "data_type3735929514">data_type</a></pre>
+
+
+</td>
+
+<td>
+<pre><b>typename</b> <a href = "#allocator3735929520">allocator</a>::<b>template</b> rebind&lt;
+ <a href = "#Cntnr3735929076">Cntnr</a>&gt;::other::value_type</pre>
+
+
+</td>
+
+<td>
+<p>Data type.</p>
+
+
+</td>
+
+</tr>
+
+<tr>
+<td>
+<pre><a name = "data_reference3735930007">data_reference</a></pre>
+
+
+</td>
+
+<td>
+<pre><b>typename</b> <a href = "#allocator3735929520">allocator</a>::<b>template</b> rebind&lt;
+ <a href = "#Cntnr3735929076">Cntnr</a>&gt;::other::reference</pre>
+
+
+</td>
+
+<td>
+<p>Data reference type.</p>
+
+
+</td>
+
+</tr>
+
+<tr>
+<td>
+<pre><a name = "const_data_reference3735929597">const_data_reference</a></pre>
+
+
+</td>
+
+<td>
+<pre><b>typename</b> <a href = "#allocator3735929520">allocator</a>::<b>template</b> rebind&lt;
+ <a href = "#Cntnr3735929076">Cntnr</a>&gt;::other::const_reference</pre>
+
+
+</td>
+
+<td>
+<p>Const data reference type.</p>
+
+
+</td>
+
+</tr>
+
+<tr>
+<td>
+<pre><a name = "data_pointer3735929833">data_pointer</a></pre>
+
+
+</td>
+
+<td>
+<pre><b>typename</b> <a href = "#allocator3735929520">allocator</a>::<b>template</b> rebind&lt;
+ <a href = "#Cntnr3735929076">Cntnr</a>&gt;::other::pointer</pre>
+
+
+</td>
+
+<td>
+<p>Data pointer type.</p>
+
+
+</td>
+
+</tr>
+
+<tr>
+<td>
+<pre><a name = "const_data_pointer3735929517">const_data_pointer</a></pre>
+
+
+</td>
+
+<td>
+<pre><b>typename</b> <a href = "#allocator3735929520">allocator</a>::<b>template</b> rebind&lt;
+ <a href = "#Cntnr3735929076">Cntnr</a>&gt;::other::const_pointer</pre>
+
+
+</td>
+
+<td>
+<p>Const data pointer type.</p>
+
+
+</td>
+
+</tr>
+
+</table>
+
+<h2>
+<a name = "link7">Value-type definitions.
+</a>
+
+</h2>
+
+<p><p>Types pertaining to the <b>domain</b> of the relationships of the table.</p> <p>This is explained in <a href = "concepts.html#concepts_types">Data Types, Value Types, Mapped Data Types, and Mapped Value Types</a> and <a href = "non_unique_mapping.html#types">Mapped Data Types and Mapped Value Types</a>.</p></p>
+
+
+<table WIDTH = "100%" BORDER = "1">
+<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 = "value_type3735929645">value_type</a></pre>
+
+
+</td>
+
+<td>
+<pre><b>typename</b> <a href = "#allocator3735929520">allocator</a>::rebind&lt;
+ std::pair&lt;<b>const</b> <a href = "#key_type3735929433">key_type</a>, <a href = "#Cntnr3735929076">Cntnr</a>&gt;::other::value_type</pre>
+
+
+</td>
+
+<td>
+<p>Data type.</p>
+
+
+</td>
+
+</tr>
+
+<tr>
+<td>
+<pre><a name = "reference3735929502">reference</a></pre>
+
+
+</td>
+
+<td>
+<pre><b>typename</b> <a href = "#allocator3735929520">allocator</a>::rebind&lt;
+ std::pair&lt;<b>const</b> <a href = "#key_type3735929433">key_type</a>, <a href = "#Cntnr3735929076">Cntnr</a>&gt;::other::reference</pre>
+
+
+</td>
+
+<td>
+<p>Value reference type.</p>
+
+
+</td>
+
+</tr>
+
+<tr>
+<td>
+<pre><a name = "const_reference3735930148">const_reference</a></pre>
+
+
+</td>
+
+<td>
+<pre><b>typename</b> <a href = "#allocator3735929520">allocator</a>::rebind&lt;
+ std::pair&lt;<b>const</b> <a href = "#key_type3735929433">key_type</a>, <a href = "#Cntnr3735929076">Cntnr</a>&gt;::other::const_reference</pre>
+
+
+</td>
+
+<td>
+<p>Const value reference type.</p>
+
+
+</td>
+
+</tr>
+
+<tr>
+<td>
+<pre><a name = "pointer3735929328">pointer</a></pre>
+
+
+</td>
+
+<td>
+<pre><b>typename</b> <a href = "#allocator3735929520">allocator</a>::rebind&lt;
+ std::pair&lt;<b>const</b> <a href = "#key_type3735929433">key_type</a>, <a href = "#Cntnr3735929076">Cntnr</a>&gt;::other::pointer</pre>
+
+
+</td>
+
+<td>
+<p>Value pointer type.</p>
+
+
+</td>
+
+</tr>
+
+<tr>
+<td>
+<pre><a name = "const_pointer3735929974">const_pointer</a></pre>
+
+
+</td>
+
+<td>
+<pre><b>typename</b> <a href = "#allocator3735929520">allocator</a>::rebind&lt;
+ std::pair&lt;<b>const</b> <a href = "#key_type3735929433">key_type</a>, <a href = "#Cntnr3735929076">Cntnr</a>&gt;::other::const_pointer</pre>
+
+
+</td>
+
+<td>
+<p>Const Value pointer type.</p>
+
+
+</td>
+
+</tr>
+
+</table>
+
+<h2>
+<a name = "link8">Iterator definitions.
+</a>
+
+</h2>
+
+<table WIDTH = "100%" BORDER = "1">
+<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_find_iterator3735929537">const_find_iterator</a></pre>
+
+
+</td>
+
+<td>
+<pre>Underlying data-structure's const find-type iterator.</pre>
+
+
+</td>
+
+<td>
+<p>Const find-type iterator.</p>
+
+
+</td>
+
+</tr>
+
+<tr>
+<td>
+<pre><a name = "find_iterator3735929945">find_iterator</a></pre>
+
+
+</td>
+
+<td>
+<pre>Underlying data-structure's find-type iterator.</pre>
+
+
+</td>
+
+<td>
+<p>Find-type iterator.</p>
+
+
+</td>
+
+</tr>
+
+<tr>
+<td>
+<pre><a name = "const_iterator3735930079">const_iterator</a></pre>
+
+
+</td>
+
+<td>
+<pre>Underlying data-structure's const range-type iterator.</pre>
+
+
+</td>
+
+<td>
+<p>Const range-type iterator.</p>
+
+
+</td>
+
+</tr>
+
+<tr>
+<td>
+<pre><a name = "iterator3735929433">iterator</a></pre>
+
+
+</td>
+
+<td>
+<pre>Underlying data-structure's range-type iterator.</pre>
+
+
+</td>
+
+<td>
+<p>Range-type iterator.</p>
+
+
+</td>
+
+</tr>
+
+</table>
+
+<h2>
+<a name = "link9">Mapping-level definitions.
+</a>
+
+</h2>
+
+<p>See <a href = "ms_gen.html">Mapping-Semantics</a>.</p>
+
+
+<h2>
+<a name = "link10">Constructors, destructor, and related.
+</a>
+
+</h2>
+
+<table WIDTH = "100%" BORDER = "1">
+<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>
+ ~basic_assoc_cntnr
+ ()</pre>
+
+
+</td>
+
+<td>
+<p>Destructor.</p>
+
+
+</td>
+
+</tr>
+
+</table>
+
+<h2>
+<a name = "link11">Information methods.
+</a>
+
+</h2>
+
+<table WIDTH = "100%" BORDER = "1">
+<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> <a href = "#size_type3735929547">size_type</a>
+ size
+ () <b>const</b></pre>
+
+
+</td>
+
+<td>
+<p>Returns the number of distinct <a href = "#value_type3735929645"><tt>value_type</tt></a> objects the container object is storing.</p>
+
+
+</td>
+
+</tr>
+
+<tr>
+<td>
+<pre><b>inline</b> <a href = "#size_type3735929547">size_type</a>
+ max_size
+ () <b>const</b></pre>
+
+
+</td>
+
+<td>
+<p>Returns an upper bound on the number of distinct <a href = "#value_type3735929645"><tt>value_type</tt></a> objects this container can store.</p>
+
+
+</td>
+
+</tr>
+
+<tr>
+<td>
+<pre><b>inline</b> <b>bool</b>
+ empty
+ () <b>const</b></pre>
+
+
+</td>
+
+<td>
+<p>Returns whether the container object is not storing any <a href = "#value_type3735929645"><tt>value_type</tt></a> objects.</p>
+
+
+</td>
+
+</tr>
+
+<tr>
+<td>
+<pre><b>inline</b> static <a href = "#const_key_reference3735929552">const_key_reference</a>
+ extract_key
+ (<a href = "#const_reference3735930148">const_reference</a> r_val)</pre>
+
+
+</td>
+
+<td>
+<p>Extracts a key from a <a href = "#value_type3735929645"><tt>value_type</tt></a>.</p>
+
+
+</td>
+
+</tr>
+
+</table>
+
+<h2>
+<a name = "link12">Insert methods.
+</a>
+
+</h2>
+
+<table WIDTH = "100%" BORDER = "1">
+<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> std::pair&lt;<a href = "#find_iterator3735929945">find_iterator</a>, <b>bool</b>&gt;
+ insert
+ (<a href = "#const_reference3735930148">const_reference</a> r_val)</pre>
+
+
+</td>
+
+<td>
+<p>Inserts a <a href = "#value_type3735929645"><tt>value_type</tt></a> object. If no <a href = "#value_type3735929645"><tt>value_type</tt></a> with <font color = "#666666"><tt>r_val</tt></font>'s key was in the container object, inserts and returns (<a href = "#find_iterator3735929945"><tt>find_iterator</tt></a> object associated with <font color = "#666666"><tt>r_val</tt></font>, <tt><b>true</b></tt>); otherwise just returns (<a href = "#find_iterator3735929945"><tt>find_iterator</tt></a> object associated with <font color = "#666666"><tt>r_val</tt></font>'s key, <tt><b>false</b></tt>).</p>
+
+
+</td>
+
+</tr>
+
+<tr>
+<td>
+<pre><b>inline</b> <a href = "#data_reference3735930007">data_reference</a>
+ <b>operator</b>[]
+ (<a href = "#const_key_reference3735929552">const_key_reference</a> r_key)</pre>
+
+
+</td>
+
+<td>
+<p>Inserts (if necessary) a <a href = "#value_type3735929645"><tt>value_type</tt></a> object associated with <font color = "#666666"><tt>r_key</tt></font>. Returns a <a href = "#data_reference3735930007"><tt>data_reference</tt></a> associated with <font color = "#666666"><tt>r_key</tt></font></p>
+
+
+</td>
+
+</tr>
+
+</table>
+
+<h2>
+<a name = "link13">Find methods.
+</a>
+
+</h2>
+
+<table WIDTH = "100%" BORDER = "1">
+<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> <a href = "#find_iterator3735929945">find_iterator</a>
+ find
+ (<a href = "#const_key_reference3735929552">const_key_reference</a> r_key)</pre>
+
+
+</td>
+
+<td>
+<p>Returns the <a href = "#find_iterator3735929945"><tt>find_iterator</tt></a> corresponding to the <a href = "#value_type3735929645"><tt>value_type</tt></a> with <font color = "#666666"><tt>r_key</tt></font> as its key, or the <a href = "#find_iterator3735929945"><tt>find_iterator</tt></a> corresponding to the just-after-last entry if no such <a href = "#value_type3735929645"><tt>value_type</tt></a>.</p>
+
+
+</td>
+
+</tr>
+
+<tr>
+<td>
+<pre><b>inline</b> <a href = "#const_find_iterator3735929537">const_find_iterator</a>
+ find
+ (<a href = "#const_key_reference3735929552">const_key_reference</a> r_key) <b>const</b></pre>
+
+
+</td>
+
+<td>
+<p>Returns the <a href = "#const_find_iterator3735929537"><tt>const_find_iterator</tt></a> corresponding to the <a href = "#value_type3735929645"><tt>value_type</tt></a> with <font color = "#666666"><tt>r_key</tt></font> as its key, or the <a href = "#const_find_iterator3735929537"><tt>const_find_iterator</tt></a> corresponding to the just-after-last entry if no such <a href = "#value_type3735929645"><tt>value_type</tt></a>.</p>
+
+
+</td>
+
+</tr>
+
+<tr>
+<td>
+<pre><b>inline</b> <a href = "#const_data_reference3735929597">const_data_reference</a>
+ <b>operator</b>[]
+ (<a href = "#const_key_reference3735929552">const_key_reference</a> r_key) <b>const</b></pre>
+
+
+</td>
+
+<td>
+<p>Inserts (if necessary) a <a href = "#value_type3735929645"><tt>value_type</tt></a> object associated with <font color = "#666666"><tt>r_key</tt></font>. Returns a <a href = "#data_reference3735930007"><tt>data_reference</tt></a> associated with <font color = "#666666"><tt>r_key</tt></font></p>
+
+
+</td>
+
+</tr>
+
+</table>
+
+<h2>
+<a name = "link14">Erase methods.
+</a>
+
+</h2>
+
+<table WIDTH = "100%" BORDER = "1">
+<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> <a href = "#size_type3735929547">size_type</a>
+ erase
+ (<a href = "#const_key_reference3735929552">const_key_reference</a> r_key)</pre>
+
+
+</td>
+
+<td>
+<p>Erases the <a href = "#value_type3735929645"><tt>value_type</tt></a> associated with <font color = "#666666"><tt>r_key</tt></font>; returns the number of <a href = "#value_type3735929645"><tt>value_type</tt></a>s erased (0 or 1).</p>
+
+
+</td>
+
+</tr>
+
+<tr>
+<td>
+<pre><b>template</b>&lt;
+ <b>class</b> Pred&gt;
+<b>inline</b> <a href = "#size_type3735929547">size_type</a>
+ erase_if
+ (Pred prd)</pre>
+
+
+</td>
+
+<td>
+<p>Erases any <a href = "#value_type3735929645"><tt>value_type</tt></a> satisfying the predicate <font color = "#666666"><tt>prd</tt></font> (this is transactional, either all matching <a href = "#value_type3735929645"><tt>value_type</tt></a>s are erased, or, if an exception is thrown (for types whose erase can throw an exception) none); returns the number of <a href = "#value_type3735929645"><tt>value_type</tt></a>s erased.</p>
+
+
+</td>
+
+</tr>
+
+<tr>
+<td>
+<pre><b>void</b>
+ clear
+ ()</pre>
+
+
+</td>
+
+<td>
+<p>Clears the container object.</p>
+
+
+</td>
+
+</tr>
+
+</table>
+
+<h2>
+<a name = "link15">Iteration methods.
+</a>
+
+</h2>
+
+<table WIDTH = "100%" BORDER = "1">
+<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> <a href = "#iterator3735929433">iterator</a>
+ begin
+ ()</pre>
+
+
+</td>
+
+<td>
+<p>Returns an <a href = "#iterator3735929433"><tt>iterator</tt></a> corresponding to the first <a href = "#value_type3735929645"><tt>value_type</tt></a> in the container.</p>
+
+
+</td>
+
+</tr>
+
+<tr>
+<td>
+<pre><b>inline</b> <a href = "#const_iterator3735930079">const_iterator</a>
+ begin
+ () <b>const</b></pre>
+
+
+</td>
+
+<td>
+<p>Returns a <a href = "#const_iterator3735930079"><tt>const_iterator</tt></a> corresponding to the first <a href = "#value_type3735929645"><tt>value_type</tt></a> in the container.</p>
+
+
+</td>
+
+</tr>
+
+<tr>
+<td>
+<pre><b>inline</b> <a href = "#iterator3735929433">iterator</a>
+ end
+ ()</pre>
+
+
+</td>
+
+<td>
+<p>Returns an <a href = "#iterator3735929433"><tt>iterator</tt></a> corresponding to the just-after_last <a href = "#value_type3735929645"><tt>value_type</tt></a> in the container.</p>
+
+
+</td>
+
+</tr>
+
+<tr>
+<td>
+<pre><b>inline</b> <a href = "#const_iterator3735930079">const_iterator</a>
+ end
+ () <b>const</b></pre>
+
+
+</td>
+
+<td>
+<p>Returns a <a href = "#const_iterator3735930079"><tt>const_iterator</tt></a> corresponding to the just-after_last <a href = "#value_type3735929645"><tt>value_type</tt></a> in the container.</p>
+
+
+</td>
+
+</tr>
+
+</table>
+
+
+
+</body>
+
+</html>
+
+
diff --git a/libstdc++-v3/docs/html/ext/pb_assoc/basic_assoc_cntnr_no_data.html b/libstdc++-v3/docs/html/ext/pb_assoc/basic_assoc_cntnr_no_data.html
new file mode 100644
index 00000000000..8dd0a39a51e
--- /dev/null
+++ b/libstdc++-v3/docs/html/ext/pb_assoc/basic_assoc_cntnr_no_data.html
@@ -0,0 +1,1046 @@
+
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
+
+
+<html>
+<head>
+<title>basic_assoc_cntnr Interface
+</title>
+
+</head>
+
+<body>
+<h1>
+<tt>basic_assoc_cntnr
+</tt>
+
+ Interface
+
+
+</h1>
+
+<p>A basic associative container specialized for the &quot;set&quot; case.
+</p>
+
+<ol>
+<li>
+<a href = "../../../../include/ext/pb_assoc/assoc_cntnr.hpp"><tt>assoc_cntnr.hpp</tt>
+</a>
+
+</li>
+
+<li>
+<a href = "#link1">Template parameters.
+</a>
+
+</li>
+
+<li>
+Public Types and Constants:
+
+
+<ol>
+<li>
+<a href = "#link2">General container definitions.
+</a>
+
+</li>
+
+<li>
+<a href = "#link3">Categories.
+</a>
+
+</li>
+
+<li>
+<a href = "#link4">Policy definitions.
+</a>
+
+</li>
+
+<li>
+<a href = "#link5">Key-type definitions.
+</a>
+
+</li>
+
+<li>
+<a href = "#link6">Value-type definitions.
+</a>
+
+</li>
+
+<li>
+<a href = "#link7">Iterator definitions.
+</a>
+
+</li>
+
+</ol>
+
+</li>
+
+<li>
+Public Methods:
+
+
+<ol>
+<li>
+<a href = "#link8">Constructors, destructor, and related.
+</a>
+
+</li>
+
+<li>
+<a href = "#link9">Information methods.
+</a>
+
+</li>
+
+<li>
+<a href = "#link10">Insert methods.
+</a>
+
+</li>
+
+<li>
+<a href = "#link11">Find methods.
+</a>
+
+</li>
+
+<li>
+<a href = "#link12">Erase methods.
+</a>
+
+</li>
+
+<li>
+<a href = "#link13">Iteration methods.
+</a>
+
+</li>
+
+</ol>
+
+</li>
+
+</ol>
+
+
+<h2>
+<a name = "link1">Template parameters.
+</a>
+
+</h2>
+
+<table WIDTH = "100%" BORDER = "1">
+<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 = "Key3735928856">Key</a></pre>
+
+
+</td>
+
+<td>
+<p>Key type.</p>
+
+
+</td>
+
+<td>
+-
+
+
+</td>
+
+</tr>
+
+<tr>
+<td>
+<pre><a name = "DS_Tag3735929089">DS_Tag</a></pre>
+
+
+</td>
+
+<td>
+<p>Data structure tag.</p>
+
+
+</td>
+
+<td>
+-
+
+
+</td>
+
+</tr>
+
+<tr>
+<td>
+<pre><a name = "Policy_Tl3735929470">Policy_Tl</a></pre>
+
+
+</td>
+
+<td>
+<p>Policy typelist.</p>
+
+
+</td>
+
+<td>
+-
+
+
+</td>
+
+</tr>
+
+<tr>
+<td>
+<pre><a name = "Allocator3735929488">Allocator</a></pre>
+
+
+</td>
+
+<td>
+<p>Allocator type.</p>
+
+
+</td>
+
+<td>
+-
+
+
+</td>
+
+</tr>
+
+</table>
+
+<h2>
+<a name = "link2">General container definitions.
+</a>
+
+</h2>
+
+<table WIDTH = "100%" BORDER = "1">
+<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_type3735929547">size_type</a></pre>
+
+
+</td>
+
+<td>
+<pre><b>typename</b> <a href = "#Allocator3735929488">Allocator</a>::size_type</pre>
+
+
+</td>
+
+<td>
+<p>Size type.</p>
+
+
+</td>
+
+</tr>
+
+<tr>
+<td>
+<pre><a name = "difference_type3735930139">difference_type</a></pre>
+
+
+</td>
+
+<td>
+<pre><b>typename</b> <a href = "#Allocator3735929488">Allocator</a>::difference_type</pre>
+
+
+</td>
+
+<td>
+<p>Difference type.</p>
+
+
+</td>
+
+</tr>
+
+</table>
+
+<h2>
+<a name = "link3">Categories.
+</a>
+
+</h2>
+
+<table WIDTH = "100%" BORDER = "1">
+<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 = "ds_category3735929731">ds_category</a></pre>
+
+
+</td>
+
+<td>
+<pre><a href = "#DS_Tag3735929089">DS_Tag</a></pre>
+
+
+</td>
+
+<td>
+<p>The underlying data-structure tag of the container. comment = </p>
+
+
+</td>
+
+</tr>
+
+<tr>
+<td>
+<pre><a name = "ms_category3735929740">ms_category</a></pre>
+
+
+</td>
+
+<td>
+<pre><a href = "basic_ms_tag.html"><tt>basic_ms_tag</tt></a></pre>
+
+
+</td>
+
+<td>
+<p>The mapping-semantics category of the container.</p>
+
+
+</td>
+
+</tr>
+
+</table>
+
+<h2>
+<a name = "link4">Policy definitions.
+</a>
+
+</h2>
+
+<table WIDTH = "100%" BORDER = "1">
+<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 = "allocator3735929520">allocator</a></pre>
+
+
+</td>
+
+<td>
+<pre><a href = "#Allocator3735929488">Allocator</a></pre>
+
+
+</td>
+
+<td>
+<p>Allocator type.</p>
+
+
+</td>
+
+</tr>
+
+</table>
+
+<h2>
+<a name = "link5">Key-type definitions.
+</a>
+
+</h2>
+
+<table WIDTH = "100%" BORDER = "1">
+<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_type3735929433">key_type</a></pre>
+
+
+</td>
+
+<td>
+<pre><b>typename</b> <a href = "#allocator3735929520">allocator</a>::<b>template</b> rebind&lt;
+ <a href = "#Key3735928856">Key</a>&gt;::other::value_type</pre>
+
+
+</td>
+
+<td>
+<p>Key type.</p>
+
+
+</td>
+
+</tr>
+
+<tr>
+<td>
+<pre><a name = "key_reference3735929926">key_reference</a></pre>
+
+
+</td>
+
+<td>
+<pre><b>typename</b> <a href = "#allocator3735929520">allocator</a>::<b>template</b> rebind&lt;
+ <a href = "#Key3735928856">Key</a>&gt;::other::reference</pre>
+
+
+</td>
+
+<td>
+<p>Key reference type.</p>
+
+
+</td>
+
+</tr>
+
+<tr>
+<td>
+<pre><a name = "const_key_reference3735929552">const_key_reference</a></pre>
+
+
+</td>
+
+<td>
+<pre><b>typename</b> <a href = "#allocator3735929520">allocator</a>::<b>template</b> rebind&lt;
+ <a href = "#Key3735928856">Key</a>&gt;::other::const_reference</pre>
+
+
+</td>
+
+<td>
+<p>Const key reference type.</p>
+
+
+</td>
+
+</tr>
+
+<tr>
+<td>
+<pre><a name = "key_pointer3735929752">key_pointer</a></pre>
+
+
+</td>
+
+<td>
+<pre><b>typename</b> <a href = "#allocator3735929520">allocator</a>::<b>template</b> rebind&lt;
+ <a href = "#Key3735928856">Key</a>&gt;::other::pointer</pre>
+
+
+</td>
+
+<td>
+<p>Key pointer type.</p>
+
+
+</td>
+
+</tr>
+
+<tr>
+<td>
+<pre><a name = "const_key_pointer3735929445">const_key_pointer</a></pre>
+
+
+</td>
+
+<td>
+<pre><b>typename</b> <a href = "#allocator3735929520">allocator</a>::<b>template</b> rebind&lt;
+ <a href = "#Key3735928856">Key</a>&gt;::other::const_pointer</pre>
+
+
+</td>
+
+<td>
+<p>Const key pointer type.</p>
+
+
+</td>
+
+</tr>
+
+</table>
+
+<h2>
+<a name = "link6">Value-type definitions.
+</a>
+
+</h2>
+
+<p><p>Types pertaining to the <b>domain</b> of the relationships of the table.</p> <p>This is explained in <a href = "concepts.html#concepts_types">Data Types, Value Types, Mapped Data Types, and Mapped Value Types</a> and <a href = "non_unique_mapping.html#types">Mapped Data Types and Mapped Value Types</a>.</p></p>
+
+
+<table WIDTH = "100%" BORDER = "1">
+<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 = "value_type3735929645">value_type</a></pre>
+
+
+</td>
+
+<td>
+<pre><b>typename</b> <a href = "#allocator3735929520">allocator</a>::rebind&lt;
+ <a href = "#key_type3735929433">key_type</a>&gt;::other::value_type</pre>
+
+
+</td>
+
+<td>
+<p>Data type.</p>
+
+
+</td>
+
+</tr>
+
+<tr>
+<td>
+<pre><a name = "reference3735929502">reference</a></pre>
+
+
+</td>
+
+<td>
+<pre><b>typename</b> <a href = "#allocator3735929520">allocator</a>::rebind&lt;
+ <a href = "#key_type3735929433">key_type</a>&gt;::other::const_reference</pre>
+
+
+</td>
+
+<td>
+<p>Value reference type.</p>
+
+
+</td>
+
+</tr>
+
+<tr>
+<td>
+<pre><a name = "const_reference3735930148">const_reference</a></pre>
+
+
+</td>
+
+<td>
+<pre><b>typename</b> <a href = "#allocator3735929520">allocator</a>::rebind&lt;
+ <a href = "#key_type3735929433">key_type</a>&gt;::other::const_reference</pre>
+
+
+</td>
+
+<td>
+<p>Const value reference type.</p>
+
+
+</td>
+
+</tr>
+
+<tr>
+<td>
+<pre><a name = "pointer3735929328">pointer</a></pre>
+
+
+</td>
+
+<td>
+<pre><b>typename</b> <a href = "#allocator3735929520">allocator</a>::rebind&lt;
+ <a href = "#key_type3735929433">key_type</a>&gt; &gt;::other::const_pointer</pre>
+
+
+</td>
+
+<td>
+<p>Value pointer type.</p>
+
+
+</td>
+
+</tr>
+
+<tr>
+<td>
+<pre><a name = "const_pointer3735929974">const_pointer</a></pre>
+
+
+</td>
+
+<td>
+<pre><b>typename</b> <a href = "#allocator3735929520">allocator</a>::rebind&lt;
+ <a href = "#key_type3735929433">key_type</a>&gt; &gt;::other::const_pointer</pre>
+
+
+</td>
+
+<td>
+<p>Const Value pointer type.</p>
+
+
+</td>
+
+</tr>
+
+</table>
+
+<h2>
+<a name = "link7">Iterator definitions.
+</a>
+
+</h2>
+
+<table WIDTH = "100%" BORDER = "1">
+<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_find_iterator3735929537">const_find_iterator</a></pre>
+
+
+</td>
+
+<td>
+<pre>Underlying data-structure's const find-type iterator.</pre>
+
+
+</td>
+
+<td>
+<p>Const find-type iterator.</p>
+
+
+</td>
+
+</tr>
+
+<tr>
+<td>
+<pre><a name = "find_iterator3735929945">find_iterator</a></pre>
+
+
+</td>
+
+<td>
+<pre>Underlying data-structure's find-type iterator.</pre>
+
+
+</td>
+
+<td>
+<p>Find-type iterator.</p>
+
+
+</td>
+
+</tr>
+
+<tr>
+<td>
+<pre><a name = "const_iterator3735930079">const_iterator</a></pre>
+
+
+</td>
+
+<td>
+<pre>Underlying data-structure's const range-type iterator.</pre>
+
+
+</td>
+
+<td>
+<p>Const range-type iterator.</p>
+
+
+</td>
+
+</tr>
+
+<tr>
+<td>
+<pre><a name = "iterator3735929433">iterator</a></pre>
+
+
+</td>
+
+<td>
+<pre>Underlying data-structure's range-type iterator.</pre>
+
+
+</td>
+
+<td>
+<p>Range-type iterator.</p>
+
+
+</td>
+
+</tr>
+
+</table>
+
+<h2>
+<a name = "link8">Constructors, destructor, and related.
+</a>
+
+</h2>
+
+<table WIDTH = "100%" BORDER = "1">
+<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>
+ ~basic_assoc_cntnr
+ ()</pre>
+
+
+</td>
+
+<td>
+<p>Destructor.</p>
+
+
+</td>
+
+</tr>
+
+</table>
+
+<h2>
+<a name = "link9">Information methods.
+</a>
+
+</h2>
+
+<table WIDTH = "100%" BORDER = "1">
+<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> <a href = "#size_type3735929547">size_type</a>
+ size
+ () <b>const</b></pre>
+
+
+</td>
+
+<td>
+<p>Returns the number of distinct <a href = "#value_type3735929645"><tt>value_type</tt></a> objects the container object is storing.</p>
+
+
+</td>
+
+</tr>
+
+<tr>
+<td>
+<pre><b>inline</b> <a href = "#size_type3735929547">size_type</a>
+ max_size
+ () <b>const</b></pre>
+
+
+</td>
+
+<td>
+<p>Returns an upper bound on the number of distinct <a href = "#value_type3735929645"><tt>value_type</tt></a> objects this container can store.</p>
+
+
+</td>
+
+</tr>
+
+<tr>
+<td>
+<pre><b>inline</b> <b>bool</b>
+ empty
+ () <b>const</b></pre>
+
+
+</td>
+
+<td>
+<p>Returns whether the container object is not storing any <a href = "#value_type3735929645"><tt>value_type</tt></a> objects.</p>
+
+
+</td>
+
+</tr>
+
+<tr>
+<td>
+<pre><b>inline</b> static <a href = "#const_key_reference3735929552">const_key_reference</a>
+ extract_key
+ (<a href = "#const_reference3735930148">const_reference</a> r_val)</pre>
+
+
+</td>
+
+<td>
+<p>Extracts a key from a <a href = "#value_type3735929645"><tt>value_type</tt></a>.</p>
+
+
+</td>
+
+</tr>
+
+</table>
+
+<h2>
+<a name = "link10">Insert methods.
+</a>
+
+</h2>
+
+<table WIDTH = "100%" BORDER = "1">
+<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> std::pair&lt;<a href = "#find_iterator3735929945">find_iterator</a>, <b>bool</b>&gt;
+ insert
+ (<a href = "#const_reference3735930148">const_reference</a> r_val)</pre>
+
+
+</td>
+
+<td>
+<p>Inserts a <a href = "#value_type3735929645"><tt>value_type</tt></a> object. If no <a href = "#value_type3735929645"><tt>value_type</tt></a> with <font color = "#666666"><tt>r_val</tt></font>'s key was in the container object, inserts and returns (<a href = "#find_iterator3735929945"><tt>find_iterator</tt></a> object associated with <font color = "#666666"><tt>r_val</tt></font>, <tt><b>true</b></tt>); otherwise just returns (<a href = "#find_iterator3735929945"><tt>find_iterator</tt></a> object associated with <font color = "#666666"><tt>r_val</tt></font>'s key, <tt><b>false</b></tt>).</p>
+
+
+</td>
+
+</tr>
+
+</table>
+
+<h2>
+<a name = "link11">Find methods.
+</a>
+
+</h2>
+
+<table WIDTH = "100%" BORDER = "1">
+<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> <a href = "#find_iterator3735929945">find_iterator</a>
+ find
+ (<a href = "#const_key_reference3735929552">const_key_reference</a> r_key)</pre>
+
+
+</td>
+
+<td>
+<p>Returns the <a href = "#find_iterator3735929945"><tt>find_iterator</tt></a> corresponding to the <a href = "#value_type3735929645"><tt>value_type</tt></a> with <font color = "#666666"><tt>r_key</tt></font> as its key, or the <a href = "#find_iterator3735929945"><tt>find_iterator</tt></a> corresponding to the just-after-last entry if no such <a href = "#value_type3735929645"><tt>value_type</tt></a>.</p>
+
+
+</td>
+
+</tr>
+
+<tr>
+<td>
+<pre><b>inline</b> <a href = "#const_find_iterator3735929537">const_find_iterator</a>
+ find
+ (<a href = "#const_key_reference3735929552">const_key_reference</a> r_key) <b>const</b></pre>
+
+
+</td>
+
+<td>
+<p>Returns the <a href = "#const_find_iterator3735929537"><tt>const_find_iterator</tt></a> corresponding to the <a href = "#value_type3735929645"><tt>value_type</tt></a> with <font color = "#666666"><tt>r_key</tt></font> as its key, or the <a href = "#const_find_iterator3735929537"><tt>const_find_iterator</tt></a> corresponding to the just-after-last entry if no such <a href = "#value_type3735929645"><tt>value_type</tt></a>.</p>
+
+
+</td>
+
+</tr>
+
+</table>
+
+<h2>
+<a name = "link12">Erase methods.
+</a>
+
+</h2>
+
+<table WIDTH = "100%" BORDER = "1">
+<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> <a href = "#size_type3735929547">size_type</a>
+ erase
+ (<a href = "#const_key_reference3735929552">const_key_reference</a> r_key)</pre>
+
+
+</td>
+
+<td>
+<p>Erases the <a href = "#value_type3735929645"><tt>value_type</tt></a> associated with <font color = "#666666"><tt>r_key</tt></font>; returns the number of <a href = "#value_type3735929645"><tt>value_type</tt></a>s erased (0 or 1).</p>
+
+
+</td>
+
+</tr>
+
+<tr>
+<td>
+<pre><b>template</b>&lt;
+ <b>class</b> Pred&gt;
+<b>inline</b> <a href = "#size_type3735929547">size_type</a>
+ erase_if
+ (Pred prd)</pre>
+
+
+</td>
+
+<td>
+<p>Erases any <a href = "#value_type3735929645"><tt>value_type</tt></a> satisfying the predicate <font color = "#666666"><tt>prd</tt></font> (this is transactional, either all matching <a href = "#value_type3735929645"><tt>value_type</tt></a>s are erased, or, if an exception is thrown (for types whose erase can throw an exception) none); returns the number of <a href = "#value_type3735929645"><tt>value_type</tt></a>s erased.</p>
+
+
+</td>
+
+</tr>
+
+<tr>
+<td>
+<pre><b>void</b>
+ clear
+ ()</pre>
+
+
+</td>
+
+<td>
+<p>Clears the container object.</p>
+
+
+</td>
+
+</tr>
+
+</table>
+
+<h2>
+<a name = "link13">Iteration methods.
+</a>
+
+</h2>
+
+<table WIDTH = "100%" BORDER = "1">
+<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> <a href = "#iterator3735929433">iterator</a>
+ begin
+ ()</pre>
+
+
+</td>
+
+<td>
+<p>Returns an <a href = "#iterator3735929433"><tt>iterator</tt></a> corresponding to the first <a href = "#value_type3735929645"><tt>value_type</tt></a> in the container.</p>
+
+
+</td>
+
+</tr>
+
+<tr>
+<td>
+<pre><b>inline</b> <a href = "#const_iterator3735930079">const_iterator</a>
+ begin
+ () <b>const</b></pre>
+
+
+</td>
+
+<td>
+<p>Returns a <a href = "#const_iterator3735930079"><tt>const_iterator</tt></a> corresponding to the first <a href = "#value_type3735929645"><tt>value_type</tt></a> in the container.</p>
+
+
+</td>
+
+</tr>
+
+<tr>
+<td>
+<pre><b>inline</b> <a href = "#iterator3735929433">iterator</a>
+ end
+ ()</pre>
+
+
+</td>
+
+<td>
+<p>Returns an <a href = "#iterator3735929433"><tt>iterator</tt></a> corresponding to the just-after_last <a href = "#value_type3735929645"><tt>value_type</tt></a> in the container.</p>
+
+
+</td>
+
+</tr>
+
+<tr>
+<td>
+<pre><b>inline</b> <a href = "#const_iterator3735930079">const_iterator</a>
+ end
+ () <b>const</b></pre>
+
+
+</td>
+
+<td>
+<p>Returns a <a href = "#const_iterator3735930079"><tt>const_iterator</tt></a> corresponding to the just-after_last <a href = "#value_type3735929645"><tt>value_type</tt></a> in the container.</p>
+
+
+</td>
+
+</tr>
+
+</table>
+
+
+
+</body>
+
+</html>
+
+
diff --git a/libstdc++-v3/docs/html/ext/pb_assoc/basic_ds_tag.html b/libstdc++-v3/docs/html/ext/pb_assoc/basic_ds_tag.html
new file mode 100644
index 00000000000..ca10f35de56
--- /dev/null
+++ b/libstdc++-v3/docs/html/ext/pb_assoc/basic_ds_tag.html
@@ -0,0 +1,41 @@
+
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
+
+
+<html>
+<head>
+<title>basic_ds_tag Interface
+</title>
+
+</head>
+
+<body>
+<h1>
+<tt>basic_ds_tag
+</tt>
+
+ Interface
+
+
+</h1>
+
+<p>Basic data-structure tag.
+</p>
+
+<ol>
+<li>
+<a href = "../../../../include/ext/pb_assoc/ds_trait.hpp"><tt>ds_trait.hpp</tt>
+</a>
+
+</li>
+
+</ol>
+
+
+
+
+</body>
+
+</html>
+
+
diff --git a/libstdc++-v3/docs/html/ext/pb_assoc/basic_hash_assoc_cntnr.html b/libstdc++-v3/docs/html/ext/pb_assoc/basic_hash_assoc_cntnr.html
new file mode 100644
index 00000000000..94939ab30d8
--- /dev/null
+++ b/libstdc++-v3/docs/html/ext/pb_assoc/basic_hash_assoc_cntnr.html
@@ -0,0 +1,609 @@
+
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
+
+
+<html>
+<head>
+<title>basic_hash_assoc_cntnr Interface
+</title>
+
+</head>
+
+<body>
+<h1>
+<tt>basic_hash_assoc_cntnr
+</tt>
+
+ Interface
+
+
+</h1>
+
+<p>A basic hash-based associative container.
+</p>
+
+<ol>
+<li>
+<a href = "../../../../include/ext/pb_assoc/assoc_cntnr.hpp"><tt>assoc_cntnr.hpp</tt>
+</a>
+
+</li>
+
+<li>
+<a href = "#link1">Template parameters.
+</a>
+
+</li>
+
+<li>
+<a href = "#link2">Base classes.
+</a>
+
+</li>
+
+<li>
+Public Types and Constants:
+
+
+<ol>
+<li>
+<a href = "#link3">Policy definitions.
+</a>
+
+</li>
+
+</ol>
+
+</li>
+
+<li>
+Public Methods:
+
+
+<ol>
+<li>
+<a href = "#link4">Constructors, destructor, and related.
+</a>
+
+</li>
+
+<li>
+<a href = "#link5">Policy access methods.
+</a>
+
+</li>
+
+</ol>
+
+</li>
+
+<li>
+Protected Methods:
+
+
+<ol>
+<li>
+<a href = "#link6">Resize methods.
+</a>
+
+</li>
+
+</ol>
+
+</li>
+
+</ol>
+
+
+<h2>
+<a name = "link1">Template parameters.
+</a>
+
+</h2>
+
+<table WIDTH = "100%" BORDER = "1">
+<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 = "Key3735928856">Key</a></pre>
+
+
+</td>
+
+<td>
+<p>Key type.</p>
+
+
+</td>
+
+<td>
+-
+
+
+</td>
+
+</tr>
+
+<tr>
+<td>
+<pre><a name = "Data3735928937">Data</a></pre>
+
+
+</td>
+
+<td>
+<p>Data type.</p>
+
+
+</td>
+
+<td>
+-
+
+
+</td>
+
+</tr>
+
+<tr>
+<td>
+<pre><a name = "Hash_Fn3735929222">Hash_Fn</a></pre>
+
+
+</td>
+
+<td>
+<p>Hash functor.</p>
+
+
+</td>
+
+<td>
+-
+
+
+</td>
+
+</tr>
+
+<tr>
+<td>
+<pre><a name = "Eq_Fn3735929016">Eq_Fn</a></pre>
+
+
+</td>
+
+<td>
+<p>Equivalence functor.</p>
+
+
+</td>
+
+<td>
+-
+
+
+</td>
+
+</tr>
+
+<tr>
+<td>
+<pre><a name = "Resize_Policy3735929904">Resize_Policy</a></pre>
+
+
+</td>
+
+<td>
+<p>Resize policy.</p>
+
+
+</td>
+
+<td>
+-
+
+
+</td>
+
+</tr>
+
+<tr>
+<td>
+<pre><a name = "Store_Hash3735929567">Store_Hash</a></pre>
+
+
+</td>
+
+<td>
+<p>Indicates whether the hash value will be stored along with each key.</p>
+
+
+</td>
+
+<td>
+-
+
+
+</td>
+
+</tr>
+
+<tr>
+<td>
+<pre><a name = "DS_Tag,3735929133">DS_Tag,</a></pre>
+
+
+</td>
+
+<td>
+<p>Data-structure tag.</p>
+
+
+</td>
+
+<td>
+-
+
+
+</td>
+
+</tr>
+
+<tr>
+<td>
+<pre><a name = "Allocator3735929488">Allocator</a></pre>
+
+
+</td>
+
+<td>
+<p>Allocator type.</p>
+
+
+</td>
+
+<td>
+-
+
+
+</td>
+
+</tr>
+
+</table>
+
+<h2>
+<a name = "link2">Base classes.
+</a>
+
+</h2>
+
+<table WIDTH = "100%" BORDER = "1">
+<TR><TD Width = "80%" ALIGN = "left"><b>Class</b></TD><TD Width = "20%" ALIGN = "left"><b>Derivation Type</b></TD></TR>
+
+
+<tr>
+<td>
+<pre><a href = "#Resize_Policy3735929904">Resize_Policy</a></pre>
+
+
+</td>
+
+<td>
+<p>public</p>
+
+
+</td>
+
+</tr>
+
+<tr>
+<td>
+<pre><a href = "#Hash_Fn3735929222">Hash_Fn</a></pre>
+
+
+</td>
+
+<td>
+<p>public</p>
+
+
+</td>
+
+</tr>
+
+<tr>
+<td>
+<pre>Depending on <a href = "#Data3735928937">Data</a>:<ol> <li> <a href = "null_data_type.html"><tt>null_data_type</tt></a> - <a href = "basic_assoc_cntnr_no_data.html"><tt>basic_assoc_cntnr</tt></a> &quot;set&quot; specialization </li> <li> <a href = "compound_data_type.html"><tt>compound_data_type</tt></a><tt>&lt;Container&gt;</tt> - <a href = "basic_assoc_cntnr_compound_data.html"><tt>basic_assoc_cntnr</tt></a> &quot;multimap&quot; specialization </li> <li> Other - <a href = "basic_assoc_cntnr.html"><tt>basic_assoc_cntnr</tt></a> &quot;map&quot; specialization </li></ol></pre>
+
+
+</td>
+
+<td>
+<p>public</p>
+
+
+</td>
+
+</tr>
+
+</table>
+
+<h2>
+<a name = "link3">Policy definitions.
+</a>
+
+</h2>
+
+<table WIDTH = "100%" BORDER = "1">
+<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 = "hash_fn3735929286">hash_fn</a></pre>
+
+
+</td>
+
+<td>
+<pre><a href = "#Hash_Fn3735929222">Hash_Fn</a></pre>
+
+
+</td>
+
+<td>
+<p>Hash functor type.</p>
+
+
+</td>
+
+</tr>
+
+<tr>
+<td>
+<pre><a name = "eq_fn3735929080">eq_fn</a></pre>
+
+
+</td>
+
+<td>
+<pre><a href = "#Eq_Fn3735929016">Eq_Fn</a></pre>
+
+
+</td>
+
+<td>
+<p>Equivalence functor type.</p>
+
+
+</td>
+
+</tr>
+
+<tr>
+<td>
+<pre><a name = "resize_policy3735929968">resize_policy</a></pre>
+
+
+</td>
+
+<td>
+<pre><a href = "#Resize_Policy3735929904">Resize_Policy</a></pre>
+
+
+</td>
+
+<td>
+<p>Resize policy type.</p>
+
+
+</td>
+
+</tr>
+
+<tr>
+<td>
+<pre><a name = "store_hash3735929631">store_hash</a></pre>
+
+
+</td>
+
+<td>
+<pre><a href = "#Store_Hash3735929567">Store_Hash</a></pre>
+
+
+</td>
+
+<td>
+<p>Indicates whether a hash value is stored with each entry.</p>
+
+
+</td>
+
+</tr>
+
+</table>
+
+<h2>
+<a name = "link4">Constructors, destructor, and related.
+</a>
+
+</h2>
+
+<table WIDTH = "100%" BORDER = "1">
+<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>
+ ~basic_hash_assoc_cntnr
+ ()</pre>
+
+
+</td>
+
+<td>
+<p>Destructor.</p>
+
+
+</td>
+
+</tr>
+
+</table>
+
+<h2>
+<a name = "link5">Policy access methods.
+</a>
+
+</h2>
+
+<table WIDTH = "100%" BORDER = "1">
+<TR><TD Width = "45%" ALIGN = "left"><b>Method</b></TD><TD Width = "55%" ALIGN = "left"><b>Description</b></TD></TR>
+
+
+<tr>
+<td>
+<pre><a href = "#hash_fn3735929286">hash_fn</a> &amp;
+ get_hash_fn
+ ()</pre>
+
+
+</td>
+
+<td>
+<p>Access to the <a href = "#hash_fn3735929286"><tt>hash_fn</tt></a> object.</p>
+
+
+</td>
+
+</tr>
+
+<tr>
+<td>
+<pre><b>const</b> <a href = "#hash_fn3735929286">hash_fn</a> &amp;
+ get_hash_fn
+ () <b>const</b></pre>
+
+
+</td>
+
+<td>
+<p>Const access to the <a href = "#hash_fn3735929286"><tt>hash_fn</tt></a> object.</p>
+
+
+</td>
+
+</tr>
+
+<tr>
+<td>
+<pre><a href = "#eq_fn3735929080">eq_fn</a> &amp;
+ get_eq_fn
+ ()</pre>
+
+
+</td>
+
+<td>
+<p>Access to the <a href = "#eq_fn3735929080"><tt>eq_fn</tt></a> object.</p>
+
+
+</td>
+
+</tr>
+
+<tr>
+<td>
+<pre><b>const</b> <a href = "#eq_fn3735929080">eq_fn</a> &amp;
+ get_eq_fn
+ () <b>const</b></pre>
+
+
+</td>
+
+<td>
+<p>Const access to the <a href = "#eq_fn3735929080"><tt>eq_fn</tt></a> object.</p>
+
+
+</td>
+
+</tr>
+
+<tr>
+<td>
+<pre><a href = "#Resize_Policy3735929904">Resize_Policy</a> &amp;
+ get_resize_policy
+ ()</pre>
+
+
+</td>
+
+<td>
+<p>Access to the <a href = "#resize_policy3735929968"><tt>resize_policy</tt></a> object.</p>
+
+
+</td>
+
+</tr>
+
+<tr>
+<td>
+<pre><b>const</b> <a href = "#resize_policy3735929968">resize_policy</a> &amp;
+ get_resize_policy
+ () <b>const</b></pre>
+
+
+</td>
+
+<td>
+<p>Const access to the <a href = "#resize_policy3735929968"><tt>resize_policy</tt></a> object.</p>
+
+
+</td>
+
+</tr>
+
+</table>
+
+<h2>
+<a name = "link6">Resize methods.
+</a>
+
+</h2>
+
+<table WIDTH = "100%" BORDER = "1">
+<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> <b>void</b>
+ do_resize
+ (size_type new_size)</pre>
+
+
+</td>
+
+<td>
+<p>Resizes the container object to <font color = "#666666"><tt>new_size</tt></font>.</p>
+
+
+</td>
+
+</tr>
+
+</table>
+
+
+
+</body>
+
+</html>
+
+
diff --git a/libstdc++-v3/docs/html/ext/pb_assoc/basic_hash_ds_tag.html b/libstdc++-v3/docs/html/ext/pb_assoc/basic_hash_ds_tag.html
new file mode 100644
index 00000000000..af421d813a4
--- /dev/null
+++ b/libstdc++-v3/docs/html/ext/pb_assoc/basic_hash_ds_tag.html
@@ -0,0 +1,74 @@
+
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
+
+
+<html>
+<head>
+<title>basic_hash_ds_tag Interface
+</title>
+
+</head>
+
+<body>
+<h1>
+<tt>basic_hash_ds_tag
+</tt>
+
+ Interface
+
+
+</h1>
+
+<p>Basic hash data-structure tag.
+</p>
+
+<ol>
+<li>
+<a href = "../../../../include/ext/pb_assoc/ds_trait.hpp"><tt>ds_trait.hpp</tt>
+</a>
+
+</li>
+
+<li>
+<a href = "#link1">Base classes.
+</a>
+
+</li>
+
+</ol>
+
+
+<h2>
+<a name = "link1">Base classes.
+</a>
+
+</h2>
+
+<table WIDTH = "100%" BORDER = "1">
+<TR><TD Width = "80%" ALIGN = "left"><b>Class</b></TD><TD Width = "20%" ALIGN = "left"><b>Derivation Type</b></TD></TR>
+
+
+<tr>
+<td>
+<pre><a href = "basic_ds_tag.html"><tt>basic_ds_tag</tt></a></pre>
+
+
+</td>
+
+<td>
+<p>public</p>
+
+
+</td>
+
+</tr>
+
+</table>
+
+
+
+</body>
+
+</html>
+
+
diff --git a/libstdc++-v3/docs/html/ext/pb_assoc/basic_invalidation_guarantee.html b/libstdc++-v3/docs/html/ext/pb_assoc/basic_invalidation_guarantee.html
new file mode 100644
index 00000000000..8bba96c22a8
--- /dev/null
+++ b/libstdc++-v3/docs/html/ext/pb_assoc/basic_invalidation_guarantee.html
@@ -0,0 +1,41 @@
+
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
+
+
+<html>
+<head>
+<title>basic_invalidation_guarantee Interface
+</title>
+
+</head>
+
+<body>
+<h1>
+<tt>basic_invalidation_guarantee
+</tt>
+
+ Interface
+
+
+</h1>
+
+<p>Signifies a basic invalidation guarantee that any iterator, pointer, or reference to a container object's mapped value type is valid as long as the container is not modified.
+</p>
+
+<ol>
+<li>
+<a href = "../../../../include/ext/pb_assoc/ds_trait.hpp"><tt>ds_trait.hpp</tt>
+</a>
+
+</li>
+
+</ol>
+
+
+
+
+</body>
+
+</html>
+
+
diff --git a/libstdc++-v3/docs/html/ext/pb_assoc/basic_ms_tag.html b/libstdc++-v3/docs/html/ext/pb_assoc/basic_ms_tag.html
new file mode 100644
index 00000000000..a4e7dd078bd
--- /dev/null
+++ b/libstdc++-v3/docs/html/ext/pb_assoc/basic_ms_tag.html
@@ -0,0 +1,41 @@
+
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
+
+
+<html>
+<head>
+<title>basic_ms_tag Interface
+</title>
+
+</head>
+
+<body>
+<h1>
+<tt>basic_ms_tag
+</tt>
+
+ Interface
+
+
+</h1>
+
+<p>Basic mapping-semantics tag.
+</p>
+
+<ol>
+<li>
+<a href = "../../../../include/ext/pb_assoc/ms_trait.hpp"><tt>ms_trait.hpp</tt>
+</a>
+
+</li>
+
+</ol>
+
+
+
+
+</body>
+
+</html>
+
+
diff --git a/libstdc++-v3/docs/html/ext/pb_assoc/basic_tree_assoc_cntnr.html b/libstdc++-v3/docs/html/ext/pb_assoc/basic_tree_assoc_cntnr.html
new file mode 100644
index 00000000000..73595b788ab
--- /dev/null
+++ b/libstdc++-v3/docs/html/ext/pb_assoc/basic_tree_assoc_cntnr.html
@@ -0,0 +1,940 @@
+
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
+
+
+<html>
+<head>
+<title>basic_tree_assoc_cntnr Interface
+</title>
+
+</head>
+
+<body>
+<h1>
+<tt>basic_tree_assoc_cntnr
+</tt>
+
+ Interface
+
+
+</h1>
+
+<p>A basic tree-based associative container.
+</p>
+
+<ol>
+<li>
+<a href = "../../../../include/ext/pb_assoc/assoc_cntnr.hpp"><tt>assoc_cntnr.hpp</tt>
+</a>
+
+</li>
+
+<li>
+<a href = "#link1">Template parameters.
+</a>
+
+</li>
+
+<li>
+<a href = "#link2">Base classes.
+</a>
+
+</li>
+
+<li>
+Public Types and Constants:
+
+
+<ol>
+<li>
+<a href = "#link3">General container definitions.
+</a>
+
+</li>
+
+<li>
+<a href = "#link4">Key-type definitions.
+</a>
+
+</li>
+
+<li>
+<a href = "#link5">Policy definitions.
+</a>
+
+</li>
+
+<li>
+<a href = "#link6">Iterator definitions.
+</a>
+
+</li>
+
+</ol>
+
+</li>
+
+<li>
+Public Methods:
+
+
+<ol>
+<li>
+<a href = "#link7">Constructors, destructor, and related.
+</a>
+
+</li>
+
+<li>
+<a href = "#link8">Policy access methods.
+</a>
+
+</li>
+
+<li>
+<a href = "#link9">Erase methods.
+</a>
+
+</li>
+
+<li>
+<a href = "#link10">Iteration methods.
+</a>
+
+</li>
+
+<li>
+<a href = "#link11">Node-Iteration methods.
+</a>
+
+</li>
+
+<li>
+<a href = "#link12">Split and join methods.
+</a>
+
+</li>
+
+</ol>
+
+</li>
+
+</ol>
+
+
+<h2>
+<a name = "link1">Template parameters.
+</a>
+
+</h2>
+
+<table WIDTH = "100%" BORDER = "1">
+<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 = "Key3735928856">Key</a></pre>
+
+
+</td>
+
+<td>
+<p>Key type.</p>
+
+
+</td>
+
+<td>
+-
+
+
+</td>
+
+</tr>
+
+<tr>
+<td>
+<pre><a name = "Data3735928937">Data</a></pre>
+
+
+</td>
+
+<td>
+<p>Data type.</p>
+
+
+</td>
+
+<td>
+-
+
+
+</td>
+
+</tr>
+
+<tr>
+<td>
+<pre><a name = "Cmp_Fn3735929122">Cmp_Fn</a></pre>
+
+
+</td>
+
+<td>
+<p>Comparison functor.</p>
+
+
+</td>
+
+<td>
+-
+
+
+</td>
+
+</tr>
+
+<tr>
+<td>
+<pre><a name = "DS_Tag,3735929133">DS_Tag,</a></pre>
+
+
+</td>
+
+<td>
+<p>Data-structure tag.</p>
+
+
+</td>
+
+<td>
+-
+
+
+</td>
+
+</tr>
+
+<tr>
+<td>
+<pre><a name = "Node_Updator3735929779">Node_Updator</a></pre>
+
+
+</td>
+
+<td>
+<p>Node updator type.</p>
+
+
+<p><a href = "concepts.html#concepts_node_invariants">Node Invariants</a> explains this concept.</p>
+
+
+</td>
+
+<td>
+-
+
+
+</td>
+
+</tr>
+
+<tr>
+<td>
+<pre><a name = "Allocator3735929488">Allocator</a></pre>
+
+
+</td>
+
+<td>
+<p>Allocator type.</p>
+
+
+</td>
+
+<td>
+-
+
+
+</td>
+
+</tr>
+
+</table>
+
+<h2>
+<a name = "link2">Base classes.
+</a>
+
+</h2>
+
+<table WIDTH = "100%" BORDER = "1">
+<TR><TD Width = "80%" ALIGN = "left"><b>Class</b></TD><TD Width = "20%" ALIGN = "left"><b>Derivation Type</b></TD></TR>
+
+
+<tr>
+<td>
+<pre><a href = "#Node_Updator3735929779">Node_Updator</a></pre>
+
+
+</td>
+
+<td>
+<p>public</p>
+
+
+</td>
+
+</tr>
+
+</table>
+
+<h2>
+<a name = "link3">General container definitions.
+</a>
+
+</h2>
+
+<table WIDTH = "100%" BORDER = "1">
+<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_type3735929547">size_type</a></pre>
+
+
+</td>
+
+<td>
+<pre><b>typename</b> <a href = "#Allocator3735929488">Allocator</a>::size_type</pre>
+
+
+</td>
+
+<td>
+<p>Size type.</p>
+
+
+</td>
+
+</tr>
+
+</table>
+
+<h2>
+<a name = "link4">Key-type definitions.
+</a>
+
+</h2>
+
+<table WIDTH = "100%" BORDER = "1">
+<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_key_reference3735929552">const_key_reference</a></pre>
+
+
+</td>
+
+<td>
+<pre><b>typename</b> <a href = "#Allocator3735929488">Allocator</a>::<b>template</b> rebind&lt;
+ <a href = "#Key3735928856">Key</a>&gt;::other::const_reference</pre>
+
+
+</td>
+
+<td>
+<p>Const key reference type.</p>
+
+
+</td>
+
+</tr>
+
+</table>
+
+<h2>
+<a name = "link5">Policy definitions.
+</a>
+
+</h2>
+
+<table WIDTH = "100%" BORDER = "1">
+<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 = "cmp_fn3735929186">cmp_fn</a></pre>
+
+
+</td>
+
+<td>
+<pre><a href = "#Cmp_Fn3735929122">Cmp_Fn</a></pre>
+
+
+</td>
+
+<td>
+<p>Comparison functor type.</p>
+
+
+</td>
+
+</tr>
+
+<tr>
+<td>
+<pre><a name = "node_updator3735929843">node_updator</a></pre>
+
+
+</td>
+
+<td>
+<pre><a href = "#Node_Updator3735929779">Node_Updator</a></pre>
+
+
+</td>
+
+<td>
+<p>Node updator type.</p>
+
+
+</td>
+
+</tr>
+
+</table>
+
+<h2>
+<a name = "link6">Iterator definitions.
+</a>
+
+</h2>
+
+<table WIDTH = "100%" BORDER = "1">
+<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_iterator3735930079">const_iterator</a></pre>
+
+
+</td>
+
+<td>
+<pre>Underlying data-structure's const range-type iterator.</pre>
+
+
+</td>
+
+<td>
+<p>Const range-type iterator.</p>
+
+
+</td>
+
+</tr>
+
+<tr>
+<td>
+<pre><a name = "iterator3735929433">iterator</a></pre>
+
+
+</td>
+
+<td>
+<pre>Underlying data-structure's range-type iterator.</pre>
+
+
+</td>
+
+<td>
+<p>Range-type iterator.</p>
+
+
+</td>
+
+</tr>
+
+<tr>
+<td>
+<pre><a name = "const_reverse_iterator3735929745">const_reverse_iterator</a></pre>
+
+
+</td>
+
+<td>
+<pre>Underlying data-structure's const reverse range-type iterator.</pre>
+
+
+</td>
+
+<td>
+<p>Const reverse range-type iterator.</p>
+
+
+</td>
+
+</tr>
+
+<tr>
+<td>
+<pre><a name = "reverse_iterator3735929420">reverse_iterator</a></pre>
+
+
+</td>
+
+<td>
+<pre>Underlying data-structure's reverse range-type iterator.</pre>
+
+
+</td>
+
+<td>
+<p>Reverse range-type iterator.</p>
+
+
+</td>
+
+</tr>
+
+<tr>
+<td>
+<pre><a name = "const_node_iterator3735929535">const_node_iterator</a></pre>
+
+
+</td>
+
+<td>
+<pre><a href = "basic_tree_assoc_cntnr_const_node_iterator.html"><tt><font color = "olive">basic_tree_assoc_cntnr</font>::const_node_iterator</tt></a></pre>
+
+
+</td>
+
+<td>
+<p>Const node iterator.</p>
+
+
+</td>
+
+</tr>
+
+<tr>
+<td>
+<pre><a name = "node_iterator3735929950">node_iterator</a></pre>
+
+
+</td>
+
+<td>
+<pre><a href = "basic_tree_assoc_cntnr_node_iterator.html"><tt><font color = "olive">basic_tree_assoc_cntnr</font>::node_iterator</tt></a></pre>
+
+
+</td>
+
+<td>
+<p>Node iterator.</p>
+
+
+</td>
+
+</tr>
+
+</table>
+
+<h2>
+<a name = "link7">Constructors, destructor, and related.
+</a>
+
+</h2>
+
+<table WIDTH = "100%" BORDER = "1">
+<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>
+ ~basic_tree_assoc_cntnr
+ ()</pre>
+
+
+</td>
+
+<td>
+<p>Destructor.</p>
+
+
+</td>
+
+</tr>
+
+</table>
+
+<h2>
+<a name = "link8">Policy access methods.
+</a>
+
+</h2>
+
+<table WIDTH = "100%" BORDER = "1">
+<TR><TD Width = "45%" ALIGN = "left"><b>Method</b></TD><TD Width = "55%" ALIGN = "left"><b>Description</b></TD></TR>
+
+
+<tr>
+<td>
+<pre><a href = "#cmp_fn3735929186">cmp_fn</a> &amp;
+ get_cmp_fn
+ ()</pre>
+
+
+</td>
+
+<td>
+<p>Access to the <a href = "#cmp_fn3735929186"><tt>cmp_fn</tt></a> object.</p>
+
+
+</td>
+
+</tr>
+
+<tr>
+<td>
+<pre><b>const</b> <a href = "#cmp_fn3735929186">cmp_fn</a> &amp;
+ get_cmp_fn
+ () <b>const</b></pre>
+
+
+</td>
+
+<td>
+<p>Const access to the <a href = "#cmp_fn3735929186"><tt>cmp_fn</tt></a> object.</p>
+
+
+</td>
+
+</tr>
+
+<tr>
+<td>
+<pre><a href = "#node_updator3735929843">node_updator</a> &amp;
+ get_node_updator
+ ()</pre>
+
+
+</td>
+
+<td>
+<p>Access to the <a href = "#node_updator3735929843"><tt>node_updator</tt></a> object.</p>
+
+
+</td>
+
+</tr>
+
+<tr>
+<td>
+<pre><b>const</b> <a href = "#node_updator3735929843">node_updator</a> &amp;
+ get_node_updator
+ () <b>const</b></pre>
+
+
+</td>
+
+<td>
+<p>Const access to the <a href = "#node_updator3735929843"><tt>node_updator</tt></a> object.</p>
+
+
+</td>
+
+</tr>
+
+</table>
+
+<h2>
+<a name = "link9">Erase methods.
+</a>
+
+</h2>
+
+<table WIDTH = "100%" BORDER = "1">
+<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> <a href = "#size_type3735929547">size_type</a>
+ erase
+ (<a href = "#const_key_reference3735929552">const_key_reference</a> r_key)</pre>
+
+
+</td>
+
+<td>
+<p>Erases the value_type associated with <font color = "#666666"><tt>r_key</tt></font>; returns the number of value_types erased (0 or 1).</p>
+
+
+</td>
+
+</tr>
+
+<tr>
+<td>
+<pre><b>inline</b> <a href = "#iterator3735929433">iterator</a>
+ erase
+ (<a href = "#iterator3735929433">iterator</a> it)</pre>
+
+
+</td>
+
+<td>
+<p>Erases the value_type corresponding to the <a href = "#iterator3735929433"><tt>iterator</tt></a> <font color = "#666666"><tt>it</tt></font>. Returns the <a href = "#iterator3735929433"><tt>iterator</tt></a> corresponding to the next value_type.</p>
+
+
+</td>
+
+</tr>
+
+<tr>
+<td>
+<pre><b>inline</b> <a href = "#reverse_iterator3735929420">reverse_iterator</a>
+ erase
+ (<a href = "#reverse_iterator3735929420">reverse_iterator</a> it)</pre>
+
+
+</td>
+
+<td>
+<p>Erases the value_type corresponding to the <a href = "#reverse_iterator3735929420"><tt>reverse_iterator</tt></a> <font color = "#666666"><tt>it</tt></font>. Returns the <a href = "#reverse_iterator3735929420"><tt>reverse_iterator</tt></a> corresponding to the previous value_type.</p>
+
+
+</td>
+
+</tr>
+
+</table>
+
+<h2>
+<a name = "link10">Iteration methods.
+</a>
+
+</h2>
+
+<table WIDTH = "100%" BORDER = "1">
+<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> <a href = "#reverse_iterator3735929420">reverse_iterator</a>
+ rbegin
+ ()</pre>
+
+
+</td>
+
+<td>
+<p>Returns a <a href = "#reverse_iterator3735929420"><tt>reverse_iterator</tt></a> corresponding to the last value_type in the container.</p>
+
+
+</td>
+
+</tr>
+
+<tr>
+<td>
+<pre><b>inline</b> <a href = "#const_reverse_iterator3735929745">const_reverse_iterator</a>
+ rbegin
+ () <b>const</b></pre>
+
+
+</td>
+
+<td>
+<p>Returns a <a href = "#const_reverse_iterator3735929745"><tt>const_reverse_iterator</tt></a> corresponding to the last value_type in the container.</p>
+
+
+</td>
+
+</tr>
+
+<tr>
+<td>
+<pre><b>inline</b> <a href = "#reverse_iterator3735929420">reverse_iterator</a>
+ rend
+ ()</pre>
+
+
+</td>
+
+<td>
+<p>Returns a <a href = "#reverse_iterator3735929420"><tt>reverse_iterator</tt></a> corresponding to the just-before-first value_type in the container.</p>
+
+
+</td>
+
+</tr>
+
+<tr>
+<td>
+<pre><b>inline</b> <a href = "#const_reverse_iterator3735929745">const_reverse_iterator</a>
+ rend
+ () <b>const</b></pre>
+
+
+</td>
+
+<td>
+<p>Returns a <a href = "#const_reverse_iterator3735929745"><tt>const_reverse_iterator</tt></a> corresponding to the just-before-first value_type in the container.</p>
+
+
+</td>
+
+</tr>
+
+</table>
+
+<h2>
+<a name = "link11">Node-Iteration methods.
+</a>
+
+</h2>
+
+<table WIDTH = "100%" BORDER = "1">
+<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> <a href = "#node_iterator3735929950">node_iterator</a>
+ node_begin
+ ()</pre>
+
+
+</td>
+
+<td>
+<p>Returns a <a href = "#node_iterator3735929950"><tt>node_iterator</tt></a> corresponding to the value_type at the root of the tree.</p>
+
+
+</td>
+
+</tr>
+
+<tr>
+<td>
+<pre><b>inline</b> <a href = "#const_node_iterator3735929535">const_node_iterator</a>
+ node_begin
+ () <b>const</b></pre>
+
+
+</td>
+
+<td>
+<p>Returns a <a href = "#const_node_iterator3735929535"><tt>const_node_iterator</tt></a> corresponding to the value_type at the root of the tree.</p>
+
+
+</td>
+
+</tr>
+
+<tr>
+<td>
+<pre><b>inline</b> <a href = "#node_iterator3735929950">node_iterator</a>
+ node_end
+ ()</pre>
+
+
+</td>
+
+<td>
+<p>Returns a <a href = "#node_iterator3735929950"><tt>node_iterator</tt></a> corresponding to a value_type just after a leaf of the tree.</p>
+
+
+</td>
+
+</tr>
+
+<tr>
+<td>
+<pre><b>inline</b> <a href = "#const_node_iterator3735929535">const_node_iterator</a>
+ node_end
+ () <b>const</b></pre>
+
+
+</td>
+
+<td>
+<p>Returns a <a href = "#const_node_iterator3735929535"><tt>const_node_iterator</tt></a> corresponding to a value_type just after a leaf of the tree.</p>
+
+
+</td>
+
+</tr>
+
+</table>
+
+<h2>
+<a name = "link12">Split and join methods.
+</a>
+
+</h2>
+
+<table WIDTH = "100%" BORDER = "1">
+<TR><TD Width = "45%" ALIGN = "left"><b>Method</b></TD><TD Width = "55%" ALIGN = "left"><b>Description</b></TD></TR>
+
+
+<tr>
+<td>
+<pre><b>void</b>
+ join
+ (<font color = "olive">basic_tree_assoc_cntnr</font> &amp;r_other)</pre>
+
+
+</td>
+
+<td>
+<p>Joins two trees. When this function returns, <font color = "#666666"><tt>r_other</tt></font> will be empty.</p>
+
+
+<p>When calling this function, <font color = "#666666"><tt>r_other</tt></font>'s keys must be all larger or all smaller than this object's keys. </p>
+
+
+</td>
+
+</tr>
+
+<tr>
+<td>
+<pre><b>inline</b> <b>void</b>
+ split
+ (<a href = "#const_key_reference3735929552">const_key_reference</a> r_key,
+ <font color = "olive">basic_tree_assoc_cntnr</font> &amp;r_other)</pre>
+
+
+</td>
+
+<td>
+<p>Joins two trees. When this function returns, <font color = "#666666"><tt>r_other</tt></font> will be empty.</p>
+
+
+</td>
+
+</tr>
+
+</table>
+
+
+
+</body>
+
+</html>
+
+
diff --git a/libstdc++-v3/docs/html/ext/pb_assoc/basic_tree_assoc_cntnr_const_node_iterator.html b/libstdc++-v3/docs/html/ext/pb_assoc/basic_tree_assoc_cntnr_const_node_iterator.html
new file mode 100644
index 00000000000..2262fe4de27
--- /dev/null
+++ b/libstdc++-v3/docs/html/ext/pb_assoc/basic_tree_assoc_cntnr_const_node_iterator.html
@@ -0,0 +1,488 @@
+
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
+
+
+<html>
+<head>
+<title>basic_tree_assoc_cntnr::const_node_iterator Interface
+</title>
+
+</head>
+
+<body>
+<h1>
+<tt><font color = "olive">basic_tree_assoc_cntnr</font>::const_node_iterator
+</tt>
+
+ Interface
+
+
+</h1>
+
+<p>Const node iterator.
+</p>
+
+<p>This is an
+</p>
+
+<ol>
+<li>
+Public Types and Constants:
+
+
+<ol>
+<li>
+<a href = "#link1">Iterator definitions.
+</a>
+
+</li>
+
+<li>
+<a href = "#link2">Value-type definitions.
+</a>
+
+</li>
+
+</ol>
+
+</li>
+
+<li>
+Public Methods:
+
+
+<ol>
+<li>
+<a href = "#link3">Constructors, destructor, and related.
+</a>
+
+</li>
+
+<li>
+<a href = "#link4">Access methods.
+</a>
+
+</li>
+
+<li>
+<a href = "#link5">Movement methods.
+</a>
+
+</li>
+
+<li>
+<a href = "#link6">Comparison methods.
+</a>
+
+</li>
+
+</ol>
+
+</li>
+
+</ol>
+
+
+<h2>
+<a name = "link1">Iterator definitions.
+</a>
+
+</h2>
+
+<table WIDTH = "100%" BORDER = "1">
+<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 = "iterator_category3735929377">iterator_category</a></pre>
+
+
+</td>
+
+<td>
+<pre>trivial_iterator_tag</pre>
+
+
+</td>
+
+<td>
+<p>Category. comment = </p>
+
+
+</td>
+
+</tr>
+
+<tr>
+<td>
+<pre><a name = "difference_type3735930139">difference_type</a></pre>
+
+
+</td>
+
+<td>
+<pre><b>void</b></pre>
+
+
+</td>
+
+<td>
+<p>Difference type.</p>
+
+
+</td>
+
+</tr>
+
+</table>
+
+<h2>
+<a name = "link2">Value-type definitions.
+</a>
+
+</h2>
+
+<p>Note that a node iterator's value type is actually a tree iterator.</p>
+
+
+<table WIDTH = "100%" BORDER = "1">
+<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 = "value_type3735929645">value_type</a></pre>
+
+
+</td>
+
+<td>
+<pre><a href = "../../pb_assoc/doc/basic_tree_assoc_cntnr.html#const_iterator3735930079">const_iterator</a></pre>
+
+
+</td>
+
+<td>
+<p>Iterator's value type.</p>
+
+
+</td>
+
+</tr>
+
+<tr>
+<td>
+<pre><a name = "pointer3735929328">pointer</a></pre>
+
+
+</td>
+
+<td>
+<pre><a href = "../../pb_assoc/doc/basic_tree_assoc_cntnr.html#const_iterator3735930079">const_iterator</a> *</pre>
+
+
+</td>
+
+<td>
+<p>Iterator's pointer type.</p>
+
+
+</td>
+
+</tr>
+
+<tr>
+<td>
+<pre><a name = "const_pointer3735929974">const_pointer</a></pre>
+
+
+</td>
+
+<td>
+<pre><a href = "../../pb_assoc/doc/basic_tree_assoc_cntnr.html#const_iterator3735930079">const_iterator</a> *</pre>
+
+
+</td>
+
+<td>
+<p>Iterator's const pointer type.</p>
+
+
+</td>
+
+</tr>
+
+<tr>
+<td>
+<pre><a name = "reference3735929502">reference</a></pre>
+
+
+</td>
+
+<td>
+<pre><a href = "../../pb_assoc/doc/basic_tree_assoc_cntnr.html#const_iterator3735930079">const_iterator</a> &amp;</pre>
+
+
+</td>
+
+<td>
+<p>Iterator's reference type.</p>
+
+
+</td>
+
+</tr>
+
+<tr>
+<td>
+<pre><a name = "const_reference3735930148">const_reference</a></pre>
+
+
+</td>
+
+<td>
+<pre><b>const</b> <a href = "../../pb_assoc/doc/basic_tree_assoc_cntnr.html#iterator3735929433">iterator</a> &amp;</pre>
+
+
+</td>
+
+<td>
+<p>Iterator's const reference type.</p>
+
+
+</td>
+
+</tr>
+
+</table>
+
+<h2>
+<a name = "link3">Constructors, destructor, and related.
+</a>
+
+</h2>
+
+<table WIDTH = "100%" BORDER = "1">
+<TR><TD Width = "45%" ALIGN = "left"><b>Method</b></TD><TD Width = "40%" ALIGN = "left"><b>Description</b></TD><TD Width = "10%" ALIGN = "left"><b>Complexity Guarantee</b></TD><TD Width = "5%" ALIGN = "left"><b>Exception Guarantee</b></TD></TR>
+
+
+<tr>
+<td>
+<pre><b>inline</b>
+ const_node_iterator
+ (<b>const</b> node_pointer p_nd = NULL)</pre>
+
+
+</td>
+
+<td>
+<p>Default constructor.</p>
+
+
+</td>
+
+<td>
+<p> <i>O(1)</i> worst.</p>
+
+
+</td>
+
+<td>
+<a href = "exception_guarantees_specifics.html#cannot_throw_guarantee">3</a>
+
+
+</td>
+
+</tr>
+
+</table>
+
+<h2>
+<a name = "link4">Access methods.
+</a>
+
+</h2>
+
+<table WIDTH = "100%" BORDER = "1">
+<TR><TD Width = "45%" ALIGN = "left"><b>Method</b></TD><TD Width = "40%" ALIGN = "left"><b>Description</b></TD><TD Width = "10%" ALIGN = "left"><b>Complexity Guarantee</b></TD><TD Width = "5%" ALIGN = "left"><b>Exception Guarantee</b></TD></TR>
+
+
+<tr>
+<td>
+<pre><b>inline</b> <a href = "../../pb_assoc/doc/basic_tree_assoc_cntnr.html#const_iterator3735930079">const_iterator</a>
+ <b>operator</b>*
+ () <b>const</b></pre>
+
+
+</td>
+
+<td>
+<p>Access.</p>
+
+
+</td>
+
+<td>
+<p> <i>O(1)</i> worst.</p>
+
+
+</td>
+
+<td>
+<a href = "exception_guarantees_specifics.html#cannot_throw_guarantee">3</a>
+
+
+</td>
+
+</tr>
+
+</table>
+
+<h2>
+<a name = "link5">Movement methods.
+</a>
+
+</h2>
+
+<table WIDTH = "100%" BORDER = "1">
+<TR><TD Width = "45%" ALIGN = "left"><b>Method</b></TD><TD Width = "40%" ALIGN = "left"><b>Description</b></TD><TD Width = "10%" ALIGN = "left"><b>Complexity Guarantee</b></TD><TD Width = "5%" ALIGN = "left"><b>Exception Guarantee</b></TD></TR>
+
+
+<tr>
+<td>
+<pre><b>inline</b> const_node_iterator
+ l_child
+ () <b>const</b></pre>
+
+
+</td>
+
+<td>
+<p>Returns the <tt><b>const</b></tt> node <a href = "../../pb_assoc/doc/basic_tree_assoc_cntnr.html#iterator3735929433">iterator</a> associated with the left node.</p>
+
+
+</td>
+
+<td>
+<p> <i>O(1)</i> worst.</p>
+
+
+</td>
+
+<td>
+<a href = "exception_guarantees_specifics.html#cannot_throw_guarantee">3</a>
+
+
+</td>
+
+</tr>
+
+<tr>
+<td>
+<pre><b>inline</b> const_node_iterator
+ r_child
+ () <b>const</b></pre>
+
+
+</td>
+
+<td>
+<p>Returns the <tt><b>const</b></tt> node <a href = "../../pb_assoc/doc/basic_tree_assoc_cntnr.html#iterator3735929433">iterator</a> associated with the right node.</p>
+
+
+</td>
+
+<td>
+<p> <i>O(1)</i> worst.</p>
+
+
+</td>
+
+<td>
+<a href = "exception_guarantees_specifics.html#cannot_throw_guarantee">3</a>
+
+
+</td>
+
+</tr>
+
+</table>
+
+<h2>
+<a name = "link6">Comparison methods.
+</a>
+
+</h2>
+
+<table WIDTH = "100%" BORDER = "1">
+<TR><TD Width = "45%" ALIGN = "left"><b>Method</b></TD><TD Width = "40%" ALIGN = "left"><b>Description</b></TD><TD Width = "10%" ALIGN = "left"><b>Complexity Guarantee</b></TD><TD Width = "5%" ALIGN = "left"><b>Exception Guarantee</b></TD></TR>
+
+
+<tr>
+<td>
+<pre><b>inline</b> <b>bool</b>
+ <b>operator</b>==
+ (<b>const</b> const_node_iterator &amp;r_other) <b>const</b></pre>
+
+
+</td>
+
+<td>
+<p>Compares content to a different <a href = "../../pb_assoc/doc/basic_tree_assoc_cntnr.html#iterator3735929433">iterator</a> object.</p>
+
+
+</td>
+
+<td>
+<p> <i>O(1)</i> worst.</p>
+
+
+</td>
+
+<td>
+<a href = "exception_guarantees_specifics.html#cannot_throw_guarantee">3</a>
+
+
+</td>
+
+</tr>
+
+<tr>
+<td>
+<pre><b>inline</b> <b>bool</b>
+ <b>operator</b>!=
+ (<b>const</b> const_node_iterator &amp;r_other) <b>const</b></pre>
+
+
+</td>
+
+<td>
+<p>Compares content (negatively) to a different <a href = "../../pb_assoc/doc/basic_tree_assoc_cntnr.html#iterator3735929433">iterator</a> object.</p>
+
+
+</td>
+
+<td>
+<p> <i>O(1)</i> worst.</p>
+
+
+</td>
+
+<td>
+<a href = "exception_guarantees_specifics.html#cannot_throw_guarantee">3</a>
+
+
+</td>
+
+</tr>
+
+</table>
+
+
+
+</body>
+
+</html>
+
+
diff --git a/libstdc++-v3/docs/html/ext/pb_assoc/basic_tree_assoc_cntnr_node_iterator.html b/libstdc++-v3/docs/html/ext/pb_assoc/basic_tree_assoc_cntnr_node_iterator.html
new file mode 100644
index 00000000000..e17e3ebac00
--- /dev/null
+++ b/libstdc++-v3/docs/html/ext/pb_assoc/basic_tree_assoc_cntnr_node_iterator.html
@@ -0,0 +1,250 @@
+
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
+
+
+<html>
+<head>
+<title>basic_tree_assoc_cntnr::node_iterator Interface
+</title>
+
+</head>
+
+<body>
+<h1>
+<tt><font color = "olive">basic_tree_assoc_cntnr</font>::node_iterator
+</tt>
+
+ Interface
+
+
+</h1>
+
+<p>Node iterator.
+</p>
+
+<p>This is an
+</p>
+
+<ol>
+<li>
+<a href = "#link1">Base classes.
+</a>
+
+</li>
+
+<li>
+Public Methods:
+
+
+<ol>
+<li>
+<a href = "#link2">Constructors, destructor, and related.
+</a>
+
+</li>
+
+<li>
+<a href = "#link3">Access methods.
+</a>
+
+</li>
+
+<li>
+<a href = "#link4">Movement methods.
+</a>
+
+</li>
+
+</ol>
+
+</li>
+
+</ol>
+
+
+<h2>
+<a name = "link1">Base classes.
+</a>
+
+</h2>
+
+<table WIDTH = "100%" BORDER = "1">
+<TR><TD Width = "80%" ALIGN = "left"><b>Class</b></TD><TD Width = "20%" ALIGN = "left"><b>Derivation Type</b></TD></TR>
+
+
+<tr>
+<td>
+<pre><a href = "../../pb_assoc/doc/basic_tree_assoc_cntnr.html#const_node_iterator3735929535">const_node_iterator</a></pre>
+
+
+</td>
+
+<td>
+<p>public</p>
+
+
+</td>
+
+</tr>
+
+</table>
+
+<h2>
+<a name = "link2">Constructors, destructor, and related.
+</a>
+
+</h2>
+
+<table WIDTH = "100%" BORDER = "1">
+<TR><TD Width = "45%" ALIGN = "left"><b>Method</b></TD><TD Width = "40%" ALIGN = "left"><b>Description</b></TD><TD Width = "10%" ALIGN = "left"><b>Complexity Guarantee</b></TD><TD Width = "5%" ALIGN = "left"><b>Exception Guarantee</b></TD></TR>
+
+
+<tr>
+<td>
+<pre><b>inline</b>
+ node_iterator
+ (<b>const</b> node_pointer p_nd = NULL)</pre>
+
+
+</td>
+
+<td>
+<p>Default constructor.</p>
+
+
+</td>
+
+<td>
+<p> <i>O(1)</i> worst.</p>
+
+
+</td>
+
+<td>
+<a href = "exception_guarantees_specifics.html#cannot_throw_guarantee">3</a>
+
+
+</td>
+
+</tr>
+
+</table>
+
+<h2>
+<a name = "link3">Access methods.
+</a>
+
+</h2>
+
+<table WIDTH = "100%" BORDER = "1">
+<TR><TD Width = "45%" ALIGN = "left"><b>Method</b></TD><TD Width = "40%" ALIGN = "left"><b>Description</b></TD><TD Width = "10%" ALIGN = "left"><b>Complexity Guarantee</b></TD><TD Width = "5%" ALIGN = "left"><b>Exception Guarantee</b></TD></TR>
+
+
+<tr>
+<td>
+<pre><b>inline</b> <a href = "../../pb_assoc/doc/basic_tree_assoc_cntnr.html#iterator3735929433">iterator</a>
+ <b>operator</b>*
+ () <b>const</b></pre>
+
+
+</td>
+
+<td>
+<p>Access.</p>
+
+
+</td>
+
+<td>
+<p> <i>O(1)</i> worst.</p>
+
+
+</td>
+
+<td>
+<a href = "exception_guarantees_specifics.html#cannot_throw_guarantee">3</a>
+
+
+</td>
+
+</tr>
+
+</table>
+
+<h2>
+<a name = "link4">Movement methods.
+</a>
+
+</h2>
+
+<table WIDTH = "100%" BORDER = "1">
+<TR><TD Width = "45%" ALIGN = "left"><b>Method</b></TD><TD Width = "40%" ALIGN = "left"><b>Description</b></TD><TD Width = "10%" ALIGN = "left"><b>Complexity Guarantee</b></TD><TD Width = "5%" ALIGN = "left"><b>Exception Guarantee</b></TD></TR>
+
+
+<tr>
+<td>
+<pre><b>inline</b> node_iterator
+ l_child
+ ()</pre>
+
+
+</td>
+
+<td>
+<p>Returns the node <a href = "../../pb_assoc/doc/basic_tree_assoc_cntnr.html#iterator3735929433">iterator</a> associated with the left node.</p>
+
+
+</td>
+
+<td>
+<p> <i>O(1)</i> worst.</p>
+
+
+</td>
+
+<td>
+<a href = "exception_guarantees_specifics.html#cannot_throw_guarantee">3</a>
+
+
+</td>
+
+</tr>
+
+<tr>
+<td>
+<pre><b>inline</b> node_iterator
+ r_child
+ ()</pre>
+
+
+</td>
+
+<td>
+<p>Returns the node <a href = "../../pb_assoc/doc/basic_tree_assoc_cntnr.html#iterator3735929433">iterator</a> associated with the right node.</p>
+
+
+</td>
+
+<td>
+<p> <i>O(1)</i> worst.</p>
+
+
+</td>
+
+<td>
+<a href = "exception_guarantees_specifics.html#cannot_throw_guarantee">3</a>
+
+
+</td>
+
+</tr>
+
+</table>
+
+
+
+</body>
+
+</html>
+
+
diff --git a/libstdc++-v3/docs/html/ext/pb_assoc/basic_tree_assoc_cntnr_rev.html b/libstdc++-v3/docs/html/ext/pb_assoc/basic_tree_assoc_cntnr_rev.html
new file mode 100644
index 00000000000..b9596f388dc
--- /dev/null
+++ b/libstdc++-v3/docs/html/ext/pb_assoc/basic_tree_assoc_cntnr_rev.html
@@ -0,0 +1,771 @@
+
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
+
+
+<html>
+<head>
+<title>basic_tree_assoc_cntnr Interface
+</title>
+
+</head>
+
+<body>
+<h1>
+<tt>basic_tree_assoc_cntnr
+</tt>
+
+ Interface
+
+
+</h1>
+
+<p>A basic tree-based associative container specialized for underlying data-structure which do not support reverse iteration.
+</p>
+
+<ol>
+<li>
+<a href = "../../../../include/ext/pb_assoc/assoc_cntnr.hpp"><tt>assoc_cntnr.hpp</tt>
+</a>
+
+</li>
+
+<li>
+<a href = "#link1">Template parameters.
+</a>
+
+</li>
+
+<li>
+<a href = "#link2">Base classes.
+</a>
+
+</li>
+
+<li>
+Public Types and Constants:
+
+
+<ol>
+<li>
+<a href = "#link3">General container definitions.
+</a>
+
+</li>
+
+<li>
+<a href = "#link4">Key-type definitions.
+</a>
+
+</li>
+
+<li>
+<a href = "#link5">Policy definitions.
+</a>
+
+</li>
+
+<li>
+<a href = "#link6">Iterator definitions.
+</a>
+
+</li>
+
+</ol>
+
+</li>
+
+<li>
+Public Methods:
+
+
+<ol>
+<li>
+<a href = "#link7">Constructors, destructor, and related.
+</a>
+
+</li>
+
+<li>
+<a href = "#link8">Policy access methods.
+</a>
+
+</li>
+
+<li>
+<a href = "#link9">Erase methods.
+</a>
+
+</li>
+
+<li>
+<a href = "#link10">Node-Iteration methods.
+</a>
+
+</li>
+
+<li>
+<a href = "#link11">Split and join methods.
+</a>
+
+</li>
+
+</ol>
+
+</li>
+
+</ol>
+
+
+<h2>
+<a name = "link1">Template parameters.
+</a>
+
+</h2>
+
+<table WIDTH = "100%" BORDER = "1">
+<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 = "Key3735928856">Key</a></pre>
+
+
+</td>
+
+<td>
+<p>Key type.</p>
+
+
+</td>
+
+<td>
+-
+
+
+</td>
+
+</tr>
+
+<tr>
+<td>
+<pre><a name = "Data3735928937">Data</a></pre>
+
+
+</td>
+
+<td>
+<p>Data type.</p>
+
+
+</td>
+
+<td>
+-
+
+
+</td>
+
+</tr>
+
+<tr>
+<td>
+<pre><a name = "Cmp_Fn3735929122">Cmp_Fn</a></pre>
+
+
+</td>
+
+<td>
+<p>Comparison functor.</p>
+
+
+</td>
+
+<td>
+-
+
+
+</td>
+
+</tr>
+
+<tr>
+<td>
+<pre><a name = "Node_Updator3735929779">Node_Updator</a></pre>
+
+
+</td>
+
+<td>
+<p>Node updator type.</p>
+
+
+<p><a href = "concepts.html#concepts_node_invariants">Node Invariants</a> explains this concept.</p>
+
+
+</td>
+
+<td>
+-
+
+
+</td>
+
+</tr>
+
+<tr>
+<td>
+<pre><a name = "Allocator3735929488">Allocator</a></pre>
+
+
+</td>
+
+<td>
+<p>Allocator type.</p>
+
+
+</td>
+
+<td>
+-
+
+
+</td>
+
+</tr>
+
+</table>
+
+<h2>
+<a name = "link2">Base classes.
+</a>
+
+</h2>
+
+<table WIDTH = "100%" BORDER = "1">
+<TR><TD Width = "80%" ALIGN = "left"><b>Class</b></TD><TD Width = "20%" ALIGN = "left"><b>Derivation Type</b></TD></TR>
+
+
+<tr>
+<td>
+<pre><a href = "#Node_Updator3735929779">Node_Updator</a></pre>
+
+
+</td>
+
+<td>
+<p>public</p>
+
+
+</td>
+
+</tr>
+
+</table>
+
+<h2>
+<a name = "link3">General container definitions.
+</a>
+
+</h2>
+
+<table WIDTH = "100%" BORDER = "1">
+<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_type3735929547">size_type</a></pre>
+
+
+</td>
+
+<td>
+<pre><b>typename</b> <a href = "#Allocator3735929488">Allocator</a>::size_type</pre>
+
+
+</td>
+
+<td>
+<p>Size type.</p>
+
+
+</td>
+
+</tr>
+
+</table>
+
+<h2>
+<a name = "link4">Key-type definitions.
+</a>
+
+</h2>
+
+<table WIDTH = "100%" BORDER = "1">
+<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_key_reference3735929552">const_key_reference</a></pre>
+
+
+</td>
+
+<td>
+<pre><b>typename</b> <a href = "#Allocator3735929488">Allocator</a>::<b>template</b> rebind&lt;
+ <a href = "#Key3735928856">Key</a>&gt;::other::const_reference</pre>
+
+
+</td>
+
+<td>
+<p>Const key reference type.</p>
+
+
+</td>
+
+</tr>
+
+</table>
+
+<h2>
+<a name = "link5">Policy definitions.
+</a>
+
+</h2>
+
+<table WIDTH = "100%" BORDER = "1">
+<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 = "cmp_fn3735929186">cmp_fn</a></pre>
+
+
+</td>
+
+<td>
+<pre><a href = "#Cmp_Fn3735929122">Cmp_Fn</a></pre>
+
+
+</td>
+
+<td>
+<p>Comparison functor type.</p>
+
+
+</td>
+
+</tr>
+
+<tr>
+<td>
+<pre><a name = "node_updator3735929843">node_updator</a></pre>
+
+
+</td>
+
+<td>
+<pre><a href = "#Node_Updator3735929779">Node_Updator</a></pre>
+
+
+</td>
+
+<td>
+<p>Node updator type.</p>
+
+
+</td>
+
+</tr>
+
+</table>
+
+<h2>
+<a name = "link6">Iterator definitions.
+</a>
+
+</h2>
+
+<table WIDTH = "100%" BORDER = "1">
+<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_iterator3735930079">const_iterator</a></pre>
+
+
+</td>
+
+<td>
+<pre>Underlying data-structure's const range-type iterator.</pre>
+
+
+</td>
+
+<td>
+<p>Const range-type iterator.</p>
+
+
+</td>
+
+</tr>
+
+<tr>
+<td>
+<pre><a name = "iterator3735929433">iterator</a></pre>
+
+
+</td>
+
+<td>
+<pre>Underlying data-structure's range-type iterator.</pre>
+
+
+</td>
+
+<td>
+<p>Range-type iterator.</p>
+
+
+</td>
+
+</tr>
+
+<tr>
+<td>
+<pre><a name = "const_node_iterator3735929535">const_node_iterator</a></pre>
+
+
+</td>
+
+<td>
+<pre><a href = "basic_tree_assoc_cntnr_const_node_iterator.html"><tt><font color = "olive">basic_tree_assoc_cntnr</font>::const_node_iterator</tt></a></pre>
+
+
+</td>
+
+<td>
+<p>Const node iterator.</p>
+
+
+</td>
+
+</tr>
+
+<tr>
+<td>
+<pre><a name = "node_iterator3735929950">node_iterator</a></pre>
+
+
+</td>
+
+<td>
+<pre><a href = "basic_tree_assoc_cntnr_node_iterator.html"><tt><font color = "olive">basic_tree_assoc_cntnr</font>::node_iterator</tt></a></pre>
+
+
+</td>
+
+<td>
+<p>Node iterator.</p>
+
+
+</td>
+
+</tr>
+
+</table>
+
+<h2>
+<a name = "link7">Constructors, destructor, and related.
+</a>
+
+</h2>
+
+<table WIDTH = "100%" BORDER = "1">
+<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>
+ ~basic_tree_assoc_cntnr
+ ()</pre>
+
+
+</td>
+
+<td>
+<p>Destructor.</p>
+
+
+</td>
+
+</tr>
+
+</table>
+
+<h2>
+<a name = "link8">Policy access methods.
+</a>
+
+</h2>
+
+<table WIDTH = "100%" BORDER = "1">
+<TR><TD Width = "45%" ALIGN = "left"><b>Method</b></TD><TD Width = "55%" ALIGN = "left"><b>Description</b></TD></TR>
+
+
+<tr>
+<td>
+<pre><a href = "#cmp_fn3735929186">cmp_fn</a> &amp;
+ get_cmp_fn
+ ()</pre>
+
+
+</td>
+
+<td>
+<p>Access to the <a href = "#cmp_fn3735929186"><tt>cmp_fn</tt></a> object.</p>
+
+
+</td>
+
+</tr>
+
+<tr>
+<td>
+<pre><b>const</b> <a href = "#cmp_fn3735929186">cmp_fn</a> &amp;
+ get_cmp_fn
+ () <b>const</b></pre>
+
+
+</td>
+
+<td>
+<p>Const access to the <a href = "#cmp_fn3735929186"><tt>cmp_fn</tt></a> object.</p>
+
+
+</td>
+
+</tr>
+
+<tr>
+<td>
+<pre><a href = "#node_updator3735929843">node_updator</a> &amp;
+ get_node_updator
+ ()</pre>
+
+
+</td>
+
+<td>
+<p>Access to the <a href = "#node_updator3735929843"><tt>node_updator</tt></a> object.</p>
+
+
+</td>
+
+</tr>
+
+<tr>
+<td>
+<pre><b>const</b> <a href = "#node_updator3735929843">node_updator</a> &amp;
+ get_node_updator
+ () <b>const</b></pre>
+
+
+</td>
+
+<td>
+<p>Const access to the <a href = "#node_updator3735929843"><tt>node_updator</tt></a> object.</p>
+
+
+</td>
+
+</tr>
+
+</table>
+
+<h2>
+<a name = "link9">Erase methods.
+</a>
+
+</h2>
+
+<table WIDTH = "100%" BORDER = "1">
+<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> <a href = "#size_type3735929547">size_type</a>
+ erase
+ (<a href = "#const_key_reference3735929552">const_key_reference</a> r_key)</pre>
+
+
+</td>
+
+<td>
+<p>Erases the value_type associated with <font color = "#666666"><tt>r_key</tt></font>; returns the number of value_types erased (0 or 1).</p>
+
+
+</td>
+
+</tr>
+
+<tr>
+<td>
+<pre><b>inline</b> <a href = "#iterator3735929433">iterator</a>
+ erase
+ (<a href = "#iterator3735929433">iterator</a> it)</pre>
+
+
+</td>
+
+<td>
+<p>Erases the value_type corresponding to the <a href = "#iterator3735929433"><tt>iterator</tt></a> <font color = "#666666"><tt>it</tt></font>. Returns the <a href = "#iterator3735929433"><tt>iterator</tt></a> corresponding to the next value_type.</p>
+
+
+</td>
+
+</tr>
+
+</table>
+
+<h2>
+<a name = "link10">Node-Iteration methods.
+</a>
+
+</h2>
+
+<table WIDTH = "100%" BORDER = "1">
+<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> <a href = "#node_iterator3735929950">node_iterator</a>
+ node_begin
+ ()</pre>
+
+
+</td>
+
+<td>
+<p>Returns a <a href = "#node_iterator3735929950"><tt>node_iterator</tt></a> corresponding to the value_type at the root of the tree.</p>
+
+
+</td>
+
+</tr>
+
+<tr>
+<td>
+<pre><b>inline</b> <a href = "#const_node_iterator3735929535">const_node_iterator</a>
+ node_begin
+ () <b>const</b></pre>
+
+
+</td>
+
+<td>
+<p>Returns a <a href = "#const_node_iterator3735929535"><tt>const_node_iterator</tt></a> corresponding to the value_type at the root of the tree.</p>
+
+
+</td>
+
+</tr>
+
+<tr>
+<td>
+<pre><b>inline</b> <a href = "#node_iterator3735929950">node_iterator</a>
+ node_end
+ ()</pre>
+
+
+</td>
+
+<td>
+<p>Returns a <a href = "#node_iterator3735929950"><tt>node_iterator</tt></a> corresponding to a value_type just after a leaf of the tree.</p>
+
+
+</td>
+
+</tr>
+
+<tr>
+<td>
+<pre><b>inline</b> <a href = "#const_node_iterator3735929535">const_node_iterator</a>
+ node_end
+ () <b>const</b></pre>
+
+
+</td>
+
+<td>
+<p>Returns a <a href = "#const_node_iterator3735929535"><tt>const_node_iterator</tt></a> corresponding to a value_type just after a leaf of the tree.</p>
+
+
+</td>
+
+</tr>
+
+</table>
+
+<h2>
+<a name = "link11">Split and join methods.
+</a>
+
+</h2>
+
+<table WIDTH = "100%" BORDER = "1">
+<TR><TD Width = "45%" ALIGN = "left"><b>Method</b></TD><TD Width = "55%" ALIGN = "left"><b>Description</b></TD></TR>
+
+
+<tr>
+<td>
+<pre><b>void</b>
+ join
+ (<font color = "olive">basic_tree_assoc_cntnr</font> &amp;r_other)</pre>
+
+
+</td>
+
+<td>
+<p>Joins two trees. When this function returns, <font color = "#666666"><tt>r_other</tt></font> will be empty.</p>
+
+
+</td>
+
+</tr>
+
+<tr>
+<td>
+<pre><b>inline</b> <b>void</b>
+ split
+ (<a href = "#const_key_reference3735929552">const_key_reference</a> r_key,
+ <font color = "olive">basic_tree_assoc_cntnr</font> &amp;r_other)</pre>
+
+
+</td>
+
+<td>
+<p>Joins two trees. When this function returns, <font color = "#666666"><tt>r_other</tt></font> will be empty.</p>
+
+
+</td>
+
+</tr>
+
+</table>
+
+
+
+</body>
+
+</html>
+
+
diff --git a/libstdc++-v3/docs/html/ext/pb_assoc/basic_tree_assoc_cntnr_rev_it.html b/libstdc++-v3/docs/html/ext/pb_assoc/basic_tree_assoc_cntnr_rev_it.html
new file mode 100644
index 00000000000..b9596f388dc
--- /dev/null
+++ b/libstdc++-v3/docs/html/ext/pb_assoc/basic_tree_assoc_cntnr_rev_it.html
@@ -0,0 +1,771 @@
+
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
+
+
+<html>
+<head>
+<title>basic_tree_assoc_cntnr Interface
+</title>
+
+</head>
+
+<body>
+<h1>
+<tt>basic_tree_assoc_cntnr
+</tt>
+
+ Interface
+
+
+</h1>
+
+<p>A basic tree-based associative container specialized for underlying data-structure which do not support reverse iteration.
+</p>
+
+<ol>
+<li>
+<a href = "../../../../include/ext/pb_assoc/assoc_cntnr.hpp"><tt>assoc_cntnr.hpp</tt>
+</a>
+
+</li>
+
+<li>
+<a href = "#link1">Template parameters.
+</a>
+
+</li>
+
+<li>
+<a href = "#link2">Base classes.
+</a>
+
+</li>
+
+<li>
+Public Types and Constants:
+
+
+<ol>
+<li>
+<a href = "#link3">General container definitions.
+</a>
+
+</li>
+
+<li>
+<a href = "#link4">Key-type definitions.
+</a>
+
+</li>
+
+<li>
+<a href = "#link5">Policy definitions.
+</a>
+
+</li>
+
+<li>
+<a href = "#link6">Iterator definitions.
+</a>
+
+</li>
+
+</ol>
+
+</li>
+
+<li>
+Public Methods:
+
+
+<ol>
+<li>
+<a href = "#link7">Constructors, destructor, and related.
+</a>
+
+</li>
+
+<li>
+<a href = "#link8">Policy access methods.
+</a>
+
+</li>
+
+<li>
+<a href = "#link9">Erase methods.
+</a>
+
+</li>
+
+<li>
+<a href = "#link10">Node-Iteration methods.
+</a>
+
+</li>
+
+<li>
+<a href = "#link11">Split and join methods.
+</a>
+
+</li>
+
+</ol>
+
+</li>
+
+</ol>
+
+
+<h2>
+<a name = "link1">Template parameters.
+</a>
+
+</h2>
+
+<table WIDTH = "100%" BORDER = "1">
+<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 = "Key3735928856">Key</a></pre>
+
+
+</td>
+
+<td>
+<p>Key type.</p>
+
+
+</td>
+
+<td>
+-
+
+
+</td>
+
+</tr>
+
+<tr>
+<td>
+<pre><a name = "Data3735928937">Data</a></pre>
+
+
+</td>
+
+<td>
+<p>Data type.</p>
+
+
+</td>
+
+<td>
+-
+
+
+</td>
+
+</tr>
+
+<tr>
+<td>
+<pre><a name = "Cmp_Fn3735929122">Cmp_Fn</a></pre>
+
+
+</td>
+
+<td>
+<p>Comparison functor.</p>
+
+
+</td>
+
+<td>
+-
+
+
+</td>
+
+</tr>
+
+<tr>
+<td>
+<pre><a name = "Node_Updator3735929779">Node_Updator</a></pre>
+
+
+</td>
+
+<td>
+<p>Node updator type.</p>
+
+
+<p><a href = "concepts.html#concepts_node_invariants">Node Invariants</a> explains this concept.</p>
+
+
+</td>
+
+<td>
+-
+
+
+</td>
+
+</tr>
+
+<tr>
+<td>
+<pre><a name = "Allocator3735929488">Allocator</a></pre>
+
+
+</td>
+
+<td>
+<p>Allocator type.</p>
+
+
+</td>
+
+<td>
+-
+
+
+</td>
+
+</tr>
+
+</table>
+
+<h2>
+<a name = "link2">Base classes.
+</a>
+
+</h2>
+
+<table WIDTH = "100%" BORDER = "1">
+<TR><TD Width = "80%" ALIGN = "left"><b>Class</b></TD><TD Width = "20%" ALIGN = "left"><b>Derivation Type</b></TD></TR>
+
+
+<tr>
+<td>
+<pre><a href = "#Node_Updator3735929779">Node_Updator</a></pre>
+
+
+</td>
+
+<td>
+<p>public</p>
+
+
+</td>
+
+</tr>
+
+</table>
+
+<h2>
+<a name = "link3">General container definitions.
+</a>
+
+</h2>
+
+<table WIDTH = "100%" BORDER = "1">
+<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_type3735929547">size_type</a></pre>
+
+
+</td>
+
+<td>
+<pre><b>typename</b> <a href = "#Allocator3735929488">Allocator</a>::size_type</pre>
+
+
+</td>
+
+<td>
+<p>Size type.</p>
+
+
+</td>
+
+</tr>
+
+</table>
+
+<h2>
+<a name = "link4">Key-type definitions.
+</a>
+
+</h2>
+
+<table WIDTH = "100%" BORDER = "1">
+<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_key_reference3735929552">const_key_reference</a></pre>
+
+
+</td>
+
+<td>
+<pre><b>typename</b> <a href = "#Allocator3735929488">Allocator</a>::<b>template</b> rebind&lt;
+ <a href = "#Key3735928856">Key</a>&gt;::other::const_reference</pre>
+
+
+</td>
+
+<td>
+<p>Const key reference type.</p>
+
+
+</td>
+
+</tr>
+
+</table>
+
+<h2>
+<a name = "link5">Policy definitions.
+</a>
+
+</h2>
+
+<table WIDTH = "100%" BORDER = "1">
+<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 = "cmp_fn3735929186">cmp_fn</a></pre>
+
+
+</td>
+
+<td>
+<pre><a href = "#Cmp_Fn3735929122">Cmp_Fn</a></pre>
+
+
+</td>
+
+<td>
+<p>Comparison functor type.</p>
+
+
+</td>
+
+</tr>
+
+<tr>
+<td>
+<pre><a name = "node_updator3735929843">node_updator</a></pre>
+
+
+</td>
+
+<td>
+<pre><a href = "#Node_Updator3735929779">Node_Updator</a></pre>
+
+
+</td>
+
+<td>
+<p>Node updator type.</p>
+
+
+</td>
+
+</tr>
+
+</table>
+
+<h2>
+<a name = "link6">Iterator definitions.
+</a>
+
+</h2>
+
+<table WIDTH = "100%" BORDER = "1">
+<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_iterator3735930079">const_iterator</a></pre>
+
+
+</td>
+
+<td>
+<pre>Underlying data-structure's const range-type iterator.</pre>
+
+
+</td>
+
+<td>
+<p>Const range-type iterator.</p>
+
+
+</td>
+
+</tr>
+
+<tr>
+<td>
+<pre><a name = "iterator3735929433">iterator</a></pre>
+
+
+</td>
+
+<td>
+<pre>Underlying data-structure's range-type iterator.</pre>
+
+
+</td>
+
+<td>
+<p>Range-type iterator.</p>
+
+
+</td>
+
+</tr>
+
+<tr>
+<td>
+<pre><a name = "const_node_iterator3735929535">const_node_iterator</a></pre>
+
+
+</td>
+
+<td>
+<pre><a href = "basic_tree_assoc_cntnr_const_node_iterator.html"><tt><font color = "olive">basic_tree_assoc_cntnr</font>::const_node_iterator</tt></a></pre>
+
+
+</td>
+
+<td>
+<p>Const node iterator.</p>
+
+
+</td>
+
+</tr>
+
+<tr>
+<td>
+<pre><a name = "node_iterator3735929950">node_iterator</a></pre>
+
+
+</td>
+
+<td>
+<pre><a href = "basic_tree_assoc_cntnr_node_iterator.html"><tt><font color = "olive">basic_tree_assoc_cntnr</font>::node_iterator</tt></a></pre>
+
+
+</td>
+
+<td>
+<p>Node iterator.</p>
+
+
+</td>
+
+</tr>
+
+</table>
+
+<h2>
+<a name = "link7">Constructors, destructor, and related.
+</a>
+
+</h2>
+
+<table WIDTH = "100%" BORDER = "1">
+<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>
+ ~basic_tree_assoc_cntnr
+ ()</pre>
+
+
+</td>
+
+<td>
+<p>Destructor.</p>
+
+
+</td>
+
+</tr>
+
+</table>
+
+<h2>
+<a name = "link8">Policy access methods.
+</a>
+
+</h2>
+
+<table WIDTH = "100%" BORDER = "1">
+<TR><TD Width = "45%" ALIGN = "left"><b>Method</b></TD><TD Width = "55%" ALIGN = "left"><b>Description</b></TD></TR>
+
+
+<tr>
+<td>
+<pre><a href = "#cmp_fn3735929186">cmp_fn</a> &amp;
+ get_cmp_fn
+ ()</pre>
+
+
+</td>
+
+<td>
+<p>Access to the <a href = "#cmp_fn3735929186"><tt>cmp_fn</tt></a> object.</p>
+
+
+</td>
+
+</tr>
+
+<tr>
+<td>
+<pre><b>const</b> <a href = "#cmp_fn3735929186">cmp_fn</a> &amp;
+ get_cmp_fn
+ () <b>const</b></pre>
+
+
+</td>
+
+<td>
+<p>Const access to the <a href = "#cmp_fn3735929186"><tt>cmp_fn</tt></a> object.</p>
+
+
+</td>
+
+</tr>
+
+<tr>
+<td>
+<pre><a href = "#node_updator3735929843">node_updator</a> &amp;
+ get_node_updator
+ ()</pre>
+
+
+</td>
+
+<td>
+<p>Access to the <a href = "#node_updator3735929843"><tt>node_updator</tt></a> object.</p>
+
+
+</td>
+
+</tr>
+
+<tr>
+<td>
+<pre><b>const</b> <a href = "#node_updator3735929843">node_updator</a> &amp;
+ get_node_updator
+ () <b>const</b></pre>
+
+
+</td>
+
+<td>
+<p>Const access to the <a href = "#node_updator3735929843"><tt>node_updator</tt></a> object.</p>
+
+
+</td>
+
+</tr>
+
+</table>
+
+<h2>
+<a name = "link9">Erase methods.
+</a>
+
+</h2>
+
+<table WIDTH = "100%" BORDER = "1">
+<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> <a href = "#size_type3735929547">size_type</a>
+ erase
+ (<a href = "#const_key_reference3735929552">const_key_reference</a> r_key)</pre>
+
+
+</td>
+
+<td>
+<p>Erases the value_type associated with <font color = "#666666"><tt>r_key</tt></font>; returns the number of value_types erased (0 or 1).</p>
+
+
+</td>
+
+</tr>
+
+<tr>
+<td>
+<pre><b>inline</b> <a href = "#iterator3735929433">iterator</a>
+ erase
+ (<a href = "#iterator3735929433">iterator</a> it)</pre>
+
+
+</td>
+
+<td>
+<p>Erases the value_type corresponding to the <a href = "#iterator3735929433"><tt>iterator</tt></a> <font color = "#666666"><tt>it</tt></font>. Returns the <a href = "#iterator3735929433"><tt>iterator</tt></a> corresponding to the next value_type.</p>
+
+
+</td>
+
+</tr>
+
+</table>
+
+<h2>
+<a name = "link10">Node-Iteration methods.
+</a>
+
+</h2>
+
+<table WIDTH = "100%" BORDER = "1">
+<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> <a href = "#node_iterator3735929950">node_iterator</a>
+ node_begin
+ ()</pre>
+
+
+</td>
+
+<td>
+<p>Returns a <a href = "#node_iterator3735929950"><tt>node_iterator</tt></a> corresponding to the value_type at the root of the tree.</p>
+
+
+</td>
+
+</tr>
+
+<tr>
+<td>
+<pre><b>inline</b> <a href = "#const_node_iterator3735929535">const_node_iterator</a>
+ node_begin
+ () <b>const</b></pre>
+
+
+</td>
+
+<td>
+<p>Returns a <a href = "#const_node_iterator3735929535"><tt>const_node_iterator</tt></a> corresponding to the value_type at the root of the tree.</p>
+
+
+</td>
+
+</tr>
+
+<tr>
+<td>
+<pre><b>inline</b> <a href = "#node_iterator3735929950">node_iterator</a>
+ node_end
+ ()</pre>
+
+
+</td>
+
+<td>
+<p>Returns a <a href = "#node_iterator3735929950"><tt>node_iterator</tt></a> corresponding to a value_type just after a leaf of the tree.</p>
+
+
+</td>
+
+</tr>
+
+<tr>
+<td>
+<pre><b>inline</b> <a href = "#const_node_iterator3735929535">const_node_iterator</a>
+ node_end
+ () <b>const</b></pre>
+
+
+</td>
+
+<td>
+<p>Returns a <a href = "#const_node_iterator3735929535"><tt>const_node_iterator</tt></a> corresponding to a value_type just after a leaf of the tree.</p>
+
+
+</td>
+
+</tr>
+
+</table>
+
+<h2>
+<a name = "link11">Split and join methods.
+</a>
+
+</h2>
+
+<table WIDTH = "100%" BORDER = "1">
+<TR><TD Width = "45%" ALIGN = "left"><b>Method</b></TD><TD Width = "55%" ALIGN = "left"><b>Description</b></TD></TR>
+
+
+<tr>
+<td>
+<pre><b>void</b>
+ join
+ (<font color = "olive">basic_tree_assoc_cntnr</font> &amp;r_other)</pre>
+
+
+</td>
+
+<td>
+<p>Joins two trees. When this function returns, <font color = "#666666"><tt>r_other</tt></font> will be empty.</p>
+
+
+</td>
+
+</tr>
+
+<tr>
+<td>
+<pre><b>inline</b> <b>void</b>
+ split
+ (<a href = "#const_key_reference3735929552">const_key_reference</a> r_key,
+ <font color = "olive">basic_tree_assoc_cntnr</font> &amp;r_other)</pre>
+
+
+</td>
+
+<td>
+<p>Joins two trees. When this function returns, <font color = "#666666"><tt>r_other</tt></font> will be empty.</p>
+
+
+</td>
+
+</tr>
+
+</table>
+
+
+
+</body>
+
+</html>
+
+
diff --git a/libstdc++-v3/docs/html/ext/pb_assoc/basic_tree_ds_tag.html b/libstdc++-v3/docs/html/ext/pb_assoc/basic_tree_ds_tag.html
new file mode 100644
index 00000000000..e28c0b35c17
--- /dev/null
+++ b/libstdc++-v3/docs/html/ext/pb_assoc/basic_tree_ds_tag.html
@@ -0,0 +1,74 @@
+
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
+
+
+<html>
+<head>
+<title>basic_tree_ds_tag Interface
+</title>
+
+</head>
+
+<body>
+<h1>
+<tt>basic_tree_ds_tag
+</tt>
+
+ Interface
+
+
+</h1>
+
+<p>Basic tree data-structure tag.
+</p>
+
+<ol>
+<li>
+<a href = "../../../../include/ext/pb_assoc/ds_trait.hpp"><tt>ds_trait.hpp</tt>
+</a>
+
+</li>
+
+<li>
+<a href = "#link1">Base classes.
+</a>
+
+</li>
+
+</ol>
+
+
+<h2>
+<a name = "link1">Base classes.
+</a>
+
+</h2>
+
+<table WIDTH = "100%" BORDER = "1">
+<TR><TD Width = "80%" ALIGN = "left"><b>Class</b></TD><TD Width = "20%" ALIGN = "left"><b>Derivation Type</b></TD></TR>
+
+
+<tr>
+<td>
+<pre><a href = "basic_ds_tag.html"><tt>basic_ds_tag</tt></a></pre>
+
+
+</td>
+
+<td>
+<p>public</p>
+
+
+</td>
+
+</tr>
+
+</table>
+
+
+
+</body>
+
+</html>
+
+
diff --git a/libstdc++-v3/docs/html/ext/pb_assoc/cc_hash_assoc_cntnr.html b/libstdc++-v3/docs/html/ext/pb_assoc/cc_hash_assoc_cntnr.html
new file mode 100644
index 00000000000..8124e4bcb20
--- /dev/null
+++ b/libstdc++-v3/docs/html/ext/pb_assoc/cc_hash_assoc_cntnr.html
@@ -0,0 +1,679 @@
+
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
+
+
+<html>
+<head>
+<title>cc_hash_assoc_cntnr Interface
+</title>
+
+</head>
+
+<body>
+<h1>
+<tt>cc_hash_assoc_cntnr
+</tt>
+
+ Interface
+
+
+</h1>
+
+<p>A collision-chaining hash-based associative container.
+</p>
+
+<ol>
+<li>
+<a href = "../../../../include/ext/pb_assoc/assoc_cntnr.hpp"><tt>assoc_cntnr.hpp</tt>
+</a>
+
+</li>
+
+<li>
+<a href = "#link1">Template parameters.
+</a>
+
+</li>
+
+<li>
+<a href = "#link2">Base classes.
+</a>
+
+</li>
+
+<li>
+Public Types and Constants:
+
+
+<ol>
+<li>
+<a href = "#link3">Policy definitions.
+</a>
+
+</li>
+
+</ol>
+
+</li>
+
+<li>
+Public Methods:
+
+
+<ol>
+<li>
+<a href = "#link4">Constructors, destructor, and related.
+</a>
+
+</li>
+
+<li>
+<a href = "#link5">Policy access methods.
+</a>
+
+</li>
+
+</ol>
+
+</li>
+
+</ol>
+
+
+<h2>
+<a name = "link1">Template parameters.
+</a>
+
+</h2>
+
+<table WIDTH = "100%" BORDER = "1">
+<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 = "Key3735928856">Key</a></pre>
+
+
+</td>
+
+<td>
+<p>Key type.</p>
+
+
+</td>
+
+<td>
+-
+
+
+</td>
+
+</tr>
+
+<tr>
+<td>
+<pre><a name = "Data3735928937">Data</a></pre>
+
+
+</td>
+
+<td>
+<p>Data type.</p>
+
+
+</td>
+
+<td>
+-
+
+
+</td>
+
+</tr>
+
+<tr>
+<td>
+<pre><a name = "Hash_Fn3735929222">Hash_Fn</a></pre>
+
+
+</td>
+
+<td>
+<p>Hash functor.</p>
+
+
+</td>
+
+<td>
+<pre>__gnu_cxx::hash&lt;<a href = "#Key3735928856">Key</a>&gt;</pre>if using gcc;<pre>stdext::hash_value&lt;<a href = "#Key3735928856">Key</a>&gt;</pre>if using Visual C++ .net
+
+
+</td>
+
+</tr>
+
+<tr>
+<td>
+<pre><a name = "Eq_Fn3735929016">Eq_Fn</a></pre>
+
+
+</td>
+
+<td>
+<p>Equivalence functor.</p>
+
+
+</td>
+
+<td>
+<pre>std::equal_to&lt;<a href = "#Key3735928856">Key</a>&gt;</pre>
+
+
+</td>
+
+</tr>
+
+<tr>
+<td>
+<pre><a name = "Comb_Hash_Fn3735929702">Comb_Hash_Fn</a></pre>
+
+
+</td>
+
+<td>
+<p>Combining hash functor.</p>
+
+
+<p>If <a href = "#Hash_Fn3735929222">Hash_Fn</a> is not <a href = "null_hash_fn.html"><tt>null_hash_fn</tt></a>, then this is the <a href = "concepts.html#concepts_hash_fns">range_hashing function</a> functor; otherwise, this is the <a href = "concepts.html#concepts_hash_fns">ranged_hash function</a> functor.</p>
+
+
+</td>
+
+<td>
+<pre><a href = "direct_mask_range_hashing.html">direct_mask_range_hashing</a>&lt;
+ <a href = "#Allocator3735929488">Allocator</a>&gt;</pre>
+
+
+</td>
+
+</tr>
+
+<tr>
+<td>
+<pre><a name = "Resize_Policy3735929904">Resize_Policy</a></pre>
+
+
+</td>
+
+<td>
+<p>Resize policy.</p>
+
+
+</td>
+
+<td>
+If <tt><a href = "#comb_hash_fn3735929798">comb_hash_fn</a></tt> is <tt><a href = "direct_mask_range_hashing.html">direct_mask_range_hashing&lt;&gt;</a></tt>, then <pre><a href = "hash_standard_resize_policy.html">hash_standard_resize_policy</a>&lt;
+ <a href = "hash_exponential_size_policy.html">hash_exponential_size_policy</a>&lt;
+ <b>typename</b> <a href = "#comb_hash_fn3735929798">comb_hash_fn</a>::size_type&gt;,
+ <a href = "hash_load_check_resize_trigger.html">hash_load_check_resize_trigger</a>&lt;
+ <b>typename</b> <a href = "#comb_hash_fn3735929798">comb_hash_fn</a>::size_type&gt;,
+ <b>false</b>,
+ <b>typename</b> <a href = "#comb_hash_fn3735929798">comb_hash_fn</a>::size_type&gt;</pre>otherwise, <pre><a href = "hash_standard_resize_policy.html">hash_standard_resize_policy</a>&lt;
+ <a href = "hash_exponential_size_policy.html"><tt>hash_prime_size_policy</tt></a>&lt;
+ <b>typename</b> <a href = "#comb_hash_fn3735929798">comb_hash_fn</a>::size_type&gt;,
+ <a href = "hash_load_check_resize_trigger.html"><tt>hash_load_check_resize_trigger</tt></a>&lt;
+ <b>typename</b> <a href = "#comb_hash_fn3735929798">comb_hash_fn</a>::size_type&gt;,
+ <b>false</b>,
+ <b>typename</b> <a href = "#comb_hash_fn3735929798">comb_hash_fn</a>::size_type&gt;</pre>
+
+
+</td>
+
+</tr>
+
+<tr>
+<td>
+<pre><a name = "Store_Hash3735929567">Store_Hash</a></pre>
+
+
+</td>
+
+<td>
+<p>Indicates whether the hash value will be stored along with each key.</p>
+
+
+<p>If <tt><a href = "#hash_fn3735929286">hash_fn</a></tt> is <tt><a href = "null_hash_fn.html">null_hash_fn</a></tt>, then the container will not compile if this value is <tt><b>true</b></tt></p>
+
+
+</td>
+
+<td>
+<pre><tt><b>false</b></tt></pre>
+
+
+</td>
+
+</tr>
+
+<tr>
+<td>
+<pre><a name = "Allocator3735929488">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">Base classes.
+</a>
+
+</h2>
+
+<table WIDTH = "100%" BORDER = "1">
+<TR><TD Width = "80%" ALIGN = "left"><b>Class</b></TD><TD Width = "20%" ALIGN = "left"><b>Derivation Type</b></TD></TR>
+
+
+<tr>
+<td>
+<pre><a href = "#Comb_Hash_Fn3735929702">Comb_Hash_Fn</a></pre>
+
+
+</td>
+
+<td>
+<p>public</p>
+
+
+</td>
+
+</tr>
+
+<tr>
+<td>
+<pre><a href = "basic_hash_assoc_cntnr.html"<tt>basic_hash_assoc_cntnr</tt></a></pre>
+
+
+</td>
+
+<td>
+<p>public</p>
+
+
+</td>
+
+</tr>
+
+</table>
+
+<h2>
+<a name = "link3">Policy definitions.
+</a>
+
+</h2>
+
+<table WIDTH = "100%" BORDER = "1">
+<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 = "comb_hash_fn3735929798">comb_hash_fn</a></pre>
+
+
+</td>
+
+<td>
+<pre><a href = "#Comb_Hash_Fn3735929702">Comb_Hash_Fn</a></pre>
+
+
+</td>
+
+<td>
+<p>Combining hash functor type.</p>
+
+
+</td>
+
+</tr>
+
+</table>
+
+<h2>
+<a name = "link4">Constructors, destructor, and related.
+</a>
+
+</h2>
+
+<table WIDTH = "100%" BORDER = "1">
+<TR><TD Width = "45%" ALIGN = "left"><b>Method</b></TD><TD Width = "55%" ALIGN = "left"><b>Description</b></TD></TR>
+
+
+<tr>
+<td>
+<pre> cc_hash_assoc_cntnr
+ ()</pre>
+
+
+</td>
+
+<td>
+<p>Default constructor.</p>
+
+
+</td>
+
+</tr>
+
+<tr>
+<td>
+<pre> cc_hash_assoc_cntnr
+ (<b>const</b> <a href = "#Hash_Fn3735929222">Hash_Fn</a> &amp;r_hash_fn)</pre>
+
+
+</td>
+
+<td>
+<p>Constructor taking some policy objects. <font color = "#666666"><tt>r_hash_fn</tt></font> will be copied by the <a href = "#Hash_Fn3735929222"><tt>Hash_Fn</tt></a> object of the container object.</p>
+
+
+</td>
+
+</tr>
+
+<tr>
+<td>
+<pre> cc_hash_assoc_cntnr
+ (<b>const</b> <a href = "#Hash_Fn3735929222">Hash_Fn</a> &amp;r_hash_fn,
+ <b>const</b> <a href = "#Eq_Fn3735929016">Eq_Fn</a> &amp;r_eq_fn)</pre>
+
+
+</td>
+
+<td>
+<p>Constructor taking some policy objects. <font color = "#666666"><tt>r_hash_fn</tt></font> will be copied by the <a href = "#Hash_Fn3735929222"><tt>Hash_Fn</tt></a> object of the container object, and <font color = "#666666"><tt>r_eq_fn</tt></font> will be copied by the <a href = "#Eq_Fn3735929016"><tt>Eq_Fn</tt></a> object of the container object.</p>
+
+
+</td>
+
+</tr>
+
+<tr>
+<td>
+<pre> cc_hash_assoc_cntnr
+ (<b>const</b> <a href = "#Hash_Fn3735929222">Hash_Fn</a> &amp;r_hash_fn,
+ <b>const</b> <a href = "#Eq_Fn3735929016">Eq_Fn</a> &amp;r_eq_fn,
+ <b>const</b> <a href = "#Comb_Hash_Fn3735929702">Comb_Hash_Fn</a> &amp;r_comb_hash_fn)</pre>
+
+
+</td>
+
+<td>
+<p>Constructor taking some policy objects. <font color = "#666666"><tt>r_hash_fn</tt></font> will be copied by the <a href = "#Hash_Fn3735929222"><tt>Hash_Fn</tt></a> object of the container object, <font color = "#666666"><tt>r_eq_fn</tt></font> will be copied by the <a href = "#Eq_Fn3735929016"><tt>Eq_Fn</tt></a> object of the container object, and <font color = "#666666"><tt>r_comb_hash_fn</tt></font> will be copied by the <a href = "#Comb_Hash_Fn3735929702"><tt>Comb_Hash_Fn</tt></a> object of the container object.</p>
+
+
+</td>
+
+</tr>
+
+<tr>
+<td>
+<pre> cc_hash_assoc_cntnr
+ (<b>const</b> <a href = "#Hash_Fn3735929222">Hash_Fn</a> &amp;r_hash_fn,
+ <b>const</b> <a href = "#Eq_Fn3735929016">Eq_Fn</a> &amp;r_eq_fn,
+ <b>const</b> <a href = "#Comb_Hash_Fn3735929702">Comb_Hash_Fn</a> &amp;r_comb_hash_fn,
+ <b>const</b> <a href = "#Resize_Policy3735929904">Resize_Policy</a> &amp;r_resize_policy)</pre>
+
+
+</td>
+
+<td>
+<p>Constructor taking some policy objects. <font color = "#666666"><tt>r_hash_fn</tt></font> will be copied by the <a href = "#Hash_Fn3735929222"><tt>Hash_Fn</tt></a> object of the container object, <font color = "#666666"><tt>r_eq_fn</tt></font> will be copied by the <a href = "#Eq_Fn3735929016"><tt>Eq_Fn</tt></a> object of the container object, <font color = "#666666"><tt>r_comb_hash_fn</tt></font> will be copied by the <a href = "#Comb_Hash_Fn3735929702"><tt>Comb_Hash_Fn</tt></a> object of the container object, and <font color = "#666666"><tt>r_resize_policy</tt></font> will be copied by the <a href = "#Resize_Policy3735929904"><tt>Resize_Policy</tt></a> object of the container object.</p>
+
+
+</td>
+
+</tr>
+
+<tr>
+<td>
+<pre><b>template</b>&lt;
+ <b>class</b> It&gt;
+ cc_hash_assoc_cntnr
+ (It first_it,
+ It last_it)</pre>
+
+
+</td>
+
+<td>
+<p>Constructor taking iterators to a range of value_types. The value_types between <font color = "#666666"><tt>first_it</tt></font> and <font color = "#666666"><tt>last_it</tt></font> will be inserted into the container object.</p>
+
+
+</td>
+
+</tr>
+
+<tr>
+<td>
+<pre><b>template</b>&lt;
+ <b>class</b> It&gt;
+ cc_hash_assoc_cntnr
+ (It first_it,
+ It last_it,
+ <b>const</b> <a href = "#Hash_Fn3735929222">Hash_Fn</a> &amp;r_hash_fn)</pre>
+
+
+</td>
+
+<td>
+<p>Constructor taking iterators to a range of value_types and some policy objects. The value_types between <font color = "#666666"><tt>first_it</tt></font> and <font color = "#666666"><tt>last_it</tt></font> will be inserted into the container object.</p>
+
+
+</td>
+
+</tr>
+
+<tr>
+<td>
+<pre><b>template</b>&lt;
+ <b>class</b> It&gt;
+ cc_hash_assoc_cntnr
+ (It first_it,
+ It last_it,
+ <b>const</b> <a href = "#Hash_Fn3735929222">Hash_Fn</a> &amp;r_hash_fn,
+ <b>const</b> <a href = "#Eq_Fn3735929016">Eq_Fn</a> &amp;r_eq_fn)</pre>
+
+
+</td>
+
+<td>
+<p>Constructor taking iterators to a range of value_types and some policy objects The value_types between <font color = "#666666"><tt>first_it</tt></font> and <font color = "#666666"><tt>last_it</tt></font> will be inserted into the container object. <font color = "#666666"><tt>r_hash_fn</tt></font> will be copied by the <a href = "#Hash_Fn3735929222"><tt>Hash_Fn</tt></a> object of the container object, and <font color = "#666666"><tt>r_eq_fn</tt></font> will be copied by the <a href = "#Eq_Fn3735929016"><tt>Eq_Fn</tt></a> object of the container object.</p>
+
+
+</td>
+
+</tr>
+
+<tr>
+<td>
+<pre><b>template</b>&lt;
+ <b>class</b> It&gt;
+ cc_hash_assoc_cntnr
+ (It first_it,
+ It last_it,
+ <b>const</b> <a href = "#Hash_Fn3735929222">Hash_Fn</a> &amp;r_hash_fn,
+ <b>const</b> <a href = "#Eq_Fn3735929016">Eq_Fn</a> &amp;r_eq_fn,
+ <b>const</b> <a href = "#Comb_Hash_Fn3735929702">Comb_Hash_Fn</a> &amp;r_comb_hash_fn)</pre>
+
+
+</td>
+
+<td>
+<p>Constructor taking iterators to a range of value_types and some policy objects The value_types between <font color = "#666666"><tt>first_it</tt></font> and <font color = "#666666"><tt>last_it</tt></font> will be inserted into the container object. <font color = "#666666"><tt>r_hash_fn</tt></font> will be copied by the <a href = "#Hash_Fn3735929222"><tt>Hash_Fn</tt></a> object of the container object, <font color = "#666666"><tt>r_eq_fn</tt></font> will be copied by the <a href = "#Eq_Fn3735929016"><tt>Eq_Fn</tt></a> object of the container object, and <font color = "#666666"><tt>r_comb_hash_fn</tt></font> will be copied by the <a href = "#Comb_Hash_Fn3735929702"><tt>Comb_Hash_Fn</tt></a> object of the container object.</p>
+
+
+</td>
+
+</tr>
+
+<tr>
+<td>
+<pre><b>template</b>&lt;
+ <b>class</b> It&gt;
+ cc_hash_assoc_cntnr
+ (It first_it,
+ It last_it,
+ <b>const</b> <a href = "#Hash_Fn3735929222">Hash_Fn</a> &amp;r_hash_fn,
+ <b>const</b> <a href = "#Eq_Fn3735929016">Eq_Fn</a> &amp;r_eq_fn,
+ <b>const</b> <a href = "#Comb_Hash_Fn3735929702">Comb_Hash_Fn</a> &amp;r_comb_hash_fn,
+ <b>const</b> <a href = "#Resize_Policy3735929904">Resize_Policy</a> &amp;r_resize_policy)</pre>
+
+
+</td>
+
+<td>
+<p>Constructor taking iterators to a range of value_types and some policy objects The value_types between <font color = "#666666"><tt>first_it</tt></font> and <font color = "#666666"><tt>last_it</tt></font> will be inserted into the container object. <font color = "#666666"><tt>r_hash_fn</tt></font> will be copied by the <a href = "#Hash_Fn3735929222"><tt>Hash_Fn</tt></a> object of the container object, <font color = "#666666"><tt>r_eq_fn</tt></font> will be copied by the <a href = "#Eq_Fn3735929016"><tt>Eq_Fn</tt></a> object of the container object, <font color = "#666666"><tt>r_comb_hash_fn</tt></font> will be copied by the <a href = "#Comb_Hash_Fn3735929702"><tt>Comb_Hash_Fn</tt></a> object of the container object, and <font color = "#666666"><tt>r_resize_policy</tt></font> will be copied by the <a href = "#Resize_Policy3735929904"><tt>Resize_Policy</tt></a> object of the container object.</p>
+
+
+</td>
+
+</tr>
+
+<tr>
+<td>
+<pre> cc_hash_assoc_cntnr
+ (<b>const</b> <font color = "olive">cc_hash_assoc_cntnr</font> &amp;r_other)</pre>
+
+
+</td>
+
+<td>
+<p>Copy constructor.</p>
+
+
+</td>
+
+</tr>
+
+<tr>
+<td>
+<pre><b>virtual</b>
+ ~cc_hash_assoc_cntnr
+ ()</pre>
+
+
+</td>
+
+<td>
+<p>Destructor.</p>
+
+
+</td>
+
+</tr>
+
+<tr>
+<td>
+<pre><font color = "olive">cc_hash_assoc_cntnr</font> &amp;
+ <b>operator</b>=
+ (<b>const</b> <font color = "olive">cc_hash_assoc_cntnr</font> &amp;r_other)</pre>
+
+
+</td>
+
+<td>
+<p>Assignment operator.</p>
+
+
+</td>
+
+</tr>
+
+<tr>
+<td>
+<pre><b>void</b>
+ swap
+ (<font color = "olive">cc_hash_assoc_cntnr</font> &amp;r_other)</pre>
+
+
+</td>
+
+<td>
+<p>Swaps content.</p>
+
+
+</td>
+
+</tr>
+
+</table>
+
+<h2>
+<a name = "link5">Policy access methods.
+</a>
+
+</h2>
+
+<table WIDTH = "100%" BORDER = "1">
+<TR><TD Width = "45%" ALIGN = "left"><b>Method</b></TD><TD Width = "55%" ALIGN = "left"><b>Description</b></TD></TR>
+
+
+<tr>
+<td>
+<pre><a href = "#comb_hash_fn3735929798">comb_hash_fn</a> &amp;
+ get_comb_hash_fn
+ ()</pre>
+
+
+</td>
+
+<td>
+<p>Access to the <a href = "#comb_hash_fn3735929798"><tt>comb_hash_fn</tt></a> object.</p>
+
+
+</td>
+
+</tr>
+
+<tr>
+<td>
+<pre><b>const</b> <a href = "#comb_hash_fn3735929798">comb_hash_fn</a> &amp;
+ get_comb_hash_fn
+ () <b>const</b></pre>
+
+
+</td>
+
+<td>
+<p>Const access to the <a href = "#comb_hash_fn3735929798"><tt>comb_hash_fn</tt></a> object.</p>
+
+
+</td>
+
+</tr>
+
+</table>
+
+
+
+</body>
+
+</html>
+
+
diff --git a/libstdc++-v3/docs/html/ext/pb_assoc/cc_hash_ds_tag.html b/libstdc++-v3/docs/html/ext/pb_assoc/cc_hash_ds_tag.html
new file mode 100644
index 00000000000..87b724ef056
--- /dev/null
+++ b/libstdc++-v3/docs/html/ext/pb_assoc/cc_hash_ds_tag.html
@@ -0,0 +1,74 @@
+
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
+
+
+<html>
+<head>
+<title>cc_hash_ds_tag Interface
+</title>
+
+</head>
+
+<body>
+<h1>
+<tt>cc_hash_ds_tag
+</tt>
+
+ Interface
+
+
+</h1>
+
+<p>Collision-chaining hash data-structure tag.
+</p>
+
+<ol>
+<li>
+<a href = "../../../../include/ext/pb_assoc/ds_trait.hpp"><tt>ds_trait.hpp</tt>
+</a>
+
+</li>
+
+<li>
+<a href = "#link1">Base classes.
+</a>
+
+</li>
+
+</ol>
+
+
+<h2>
+<a name = "link1">Base classes.
+</a>
+
+</h2>
+
+<table WIDTH = "100%" BORDER = "1">
+<TR><TD Width = "80%" ALIGN = "left"><b>Class</b></TD><TD Width = "20%" ALIGN = "left"><b>Derivation Type</b></TD></TR>
+
+
+<tr>
+<td>
+<pre><a href = "basic_hash_ds_tag.html"><tt>basic_hash_ds_tag</tt></a></pre>
+
+
+</td>
+
+<td>
+<p>public</p>
+
+
+</td>
+
+</tr>
+
+</table>
+
+
+
+</body>
+
+</html>
+
+
diff --git a/libstdc++-v3/docs/html/ext/pb_assoc/cc_hash_max_collision_check_resize_trigger.html b/libstdc++-v3/docs/html/ext/pb_assoc/cc_hash_max_collision_check_resize_trigger.html
new file mode 100644
index 00000000000..0b19045d274
--- /dev/null
+++ b/libstdc++-v3/docs/html/ext/pb_assoc/cc_hash_max_collision_check_resize_trigger.html
@@ -0,0 +1,701 @@
+
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
+
+
+<html>
+<head>
+<title>cc_hash_max_collision_check_resize_trigger Interface
+</title>
+
+</head>
+
+<body>
+<h1>
+<tt>cc_hash_max_collision_check_resize_trigger
+</tt>
+
+ Interface
+
+
+</h1>
+
+<p>A resize trigger policy based on collision checks. It keeps the simulated load factor lower than some given load factor.
+</p>
+
+<ol>
+<li>
+<a href = "../../../../include/ext/pb_assoc/hash_policy.hpp"><tt>hash_policy.hpp</tt>
+</a>
+
+</li>
+
+<li>
+<a href = "#link1">Template parameters.
+</a>
+
+</li>
+
+<li>
+Public Types and Constants:
+
+
+<ol>
+<li>
+<a href = "#link2">General definitions.
+</a>
+
+</li>
+
+</ol>
+
+</li>
+
+<li>
+Public Methods:
+
+
+<ol>
+<li>
+<a href = "#link3">Constructors, destructor, and related.
+</a>
+
+</li>
+
+<li>
+<a href = "#link4">Load access methods.
+</a>
+
+</li>
+
+</ol>
+
+</li>
+
+<li>
+Protected Methods:
+
+
+<ol>
+<li>
+<a href = "#link5">Insert search notifications.
+</a>
+
+</li>
+
+<li>
+<a href = "#link6">Find search notifications.
+</a>
+
+</li>
+
+<li>
+<a href = "#link7">Erase search notifications.
+</a>
+
+</li>
+
+<li>
+<a href = "#link8">Content change notifications.
+</a>
+
+</li>
+
+<li>
+<a href = "#link9">Size change notifications.
+</a>
+
+</li>
+
+<li>
+<a href = "#link10">Queries.
+</a>
+
+</li>
+
+</ol>
+
+</li>
+
+</ol>
+
+
+<h2>
+<a name = "link1">Template parameters.
+</a>
+
+</h2>
+
+<table WIDTH = "100%" BORDER = "1">
+<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 = "External_Load_Access3735929540">External_Load_Access</a></pre>
+
+
+</td>
+
+<td>
+<p>Specifies whether the load factor can be accessed externally. The two options have different tradeoffs in terms of flexibility, genericity, and encapsulation.</p>
+
+
+</td>
+
+<td>
+<tt><b>false</b></tt>
+
+
+</td>
+
+</tr>
+
+<tr>
+<td>
+<pre><a name = "Size_Type3735929483">Size_Type</a></pre>
+
+
+</td>
+
+<td>
+<p>Size type.</p>
+
+
+</td>
+
+<td>
+size_t
+
+
+</td>
+
+</tr>
+
+</table>
+
+<h2>
+<a name = "link2">General definitions.
+</a>
+
+</h2>
+
+<table WIDTH = "100%" BORDER = "1">
+<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_type3735929547">size_type</a></pre>
+
+
+</td>
+
+<td>
+<pre><a href = "#Size_Type3735929483">Size_Type</a></pre>
+
+
+</td>
+
+<td>
+<p>Size type.</p>
+
+
+</td>
+
+</tr>
+
+<tr>
+<td>
+<pre><a name = "external_load_access3735929604">external_load_access</a></pre>
+
+
+</td>
+
+<td>
+<pre><a href = "#External_Load_Access3735929540">External_Load_Access</a></pre>
+
+
+</td>
+
+<td>
+<p>Indicates whether loads can be accessed externally</p>
+
+
+</td>
+
+</tr>
+
+</table>
+
+<h2>
+<a name = "link3">Constructors, destructor, and related.
+</a>
+
+</h2>
+
+<table WIDTH = "100%" BORDER = "1">
+<TR><TD Width = "45%" ALIGN = "left"><b>Method</b></TD><TD Width = "55%" ALIGN = "left"><b>Description</b></TD></TR>
+
+
+<tr>
+<td>
+<pre> cc_hash_max_collision_check_resize_trigger
+ (float load = 0.5)</pre>
+
+
+</td>
+
+<td>
+<p>Default constructor, or constructor taking <font color = "#666666"><tt>load</tt></font>, a load factor which it will attempt to maintain.</p>
+
+
+</td>
+
+</tr>
+
+<tr>
+<td>
+<pre><b>void</b>
+ swap
+ (<font color = "olive">cc_hash_max_collision_check_resize_trigger</font> &amp;r_other)</pre>
+
+
+</td>
+
+<td>
+<p>Swaps content.</p>
+
+
+</td>
+
+</tr>
+
+</table>
+
+<h2>
+<a name = "link4">Load access methods.
+</a>
+
+</h2>
+
+<p> These methods are only available if the external access parameter is set.</p>
+
+
+<table WIDTH = "100%" BORDER = "1">
+<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> float
+ get_load
+ () <b>const</b></pre>
+
+
+</td>
+
+<td>
+<p>Returns a pair of the minimal and maximal loads, respectively.</p>
+
+
+<p>Calling this method will not compile when <a href = "#External_Load_Access3735929540"><tt>External_Load_Access</tt></a> == <tt><b>false</b></tt>.</p>
+
+
+</td>
+
+</tr>
+
+</table>
+
+<h2>
+<a name = "link5">Insert search notifications.
+</a>
+
+</h2>
+
+<p>Notifications called during an insert operation.</p>
+
+
+<table WIDTH = "100%" BORDER = "1">
+<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>
+ notify_insert_search_start
+ ()</pre>
+
+
+</td>
+
+<td>
+<p>Notifies a search started.</p>
+
+
+</td>
+
+</tr>
+
+<tr>
+<td>
+<pre><b>inline</b> <b>void</b>
+ notify_insert_search_collision
+ ()</pre>
+
+
+</td>
+
+<td>
+<p>Notifies a search encountered a collision.</p>
+
+
+</td>
+
+</tr>
+
+<tr>
+<td>
+<pre><b>inline</b> <b>void</b>
+ notify_insert_search_end
+ ()</pre>
+
+
+</td>
+
+<td>
+<p>Notifies a search ended.</p>
+
+
+</td>
+
+</tr>
+
+</table>
+
+<h2>
+<a name = "link6">Find search notifications.
+</a>
+
+</h2>
+
+<p>Notifications called during a find operation.</p>
+
+
+<table WIDTH = "100%" BORDER = "1">
+<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>
+ notify_find_search_start
+ ()</pre>
+
+
+</td>
+
+<td>
+<p>Notifies a search started.</p>
+
+
+</td>
+
+</tr>
+
+<tr>
+<td>
+<pre><b>inline</b> <b>void</b>
+ notify_find_search_collision
+ ()</pre>
+
+
+</td>
+
+<td>
+<p>Notifies a search encountered a collision.</p>
+
+
+</td>
+
+</tr>
+
+<tr>
+<td>
+<pre><b>inline</b> <b>void</b>
+ notify_find_search_end
+ ()</pre>
+
+
+</td>
+
+<td>
+<p>Notifies a search ended.</p>
+
+
+</td>
+
+</tr>
+
+</table>
+
+<h2>
+<a name = "link7">Erase search notifications.
+</a>
+
+</h2>
+
+<p>Notifications called during an insert operation.</p>
+
+
+<table WIDTH = "100%" BORDER = "1">
+<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>
+ notify_erase_search_start
+ ()</pre>
+
+
+</td>
+
+<td>
+<p>Notifies a search started.</p>
+
+
+</td>
+
+</tr>
+
+<tr>
+<td>
+<pre><b>inline</b> <b>void</b>
+ notify_erase_search_collision
+ ()</pre>
+
+
+</td>
+
+<td>
+<p>Notifies a search encountered a collision.</p>
+
+
+</td>
+
+</tr>
+
+<tr>
+<td>
+<pre><b>inline</b> <b>void</b>
+ notify_erase_search_end
+ ()</pre>
+
+
+</td>
+
+<td>
+<p>Notifies a search ended.</p>
+
+
+</td>
+
+</tr>
+
+</table>
+
+<h2>
+<a name = "link8">Content change notifications.
+</a>
+
+</h2>
+
+<p>Notifications called when the content of the table changes in a way that can affect the resize policy.</p>
+
+
+<table WIDTH = "100%" BORDER = "1">
+<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>
+ notify_inserted
+ (<a href = "#size_type3735929547">size_type</a> num_entries)</pre>
+
+
+</td>
+
+<td>
+<p>Notifies an element was inserted.</p>
+
+
+</td>
+
+</tr>
+
+<tr>
+<td>
+<pre><b>inline</b> <b>void</b>
+ notify_erased
+ (<a href = "#size_type3735929547">size_type</a> num_entries)</pre>
+
+
+</td>
+
+<td>
+<p>Notifies an element was erased.</p>
+
+
+</td>
+
+</tr>
+
+<tr>
+<td>
+<pre><b>void</b>
+ notify_cleared
+ ()</pre>
+
+
+</td>
+
+<td>
+<p>Notifies the table was cleared.</p>
+
+
+</td>
+
+</tr>
+
+</table>
+
+<h2>
+<a name = "link9">Size change notifications.
+</a>
+
+</h2>
+
+<p>Notifications called when the table changes size.</p>
+
+
+<table WIDTH = "100%" BORDER = "1">
+<TR><TD Width = "45%" ALIGN = "left"><b>Method</b></TD><TD Width = "55%" ALIGN = "left"><b>Description</b></TD></TR>
+
+
+<tr>
+<td>
+<pre><b>void</b>
+ notify_resized
+ (<a href = "#size_type3735929547">size_type</a> new_size)</pre>
+
+
+</td>
+
+<td>
+<p>Notifies the table was resized as a result of this object's signifying that a resize is needed.</p>
+
+
+</td>
+
+</tr>
+
+<tr>
+<td>
+<pre><b>void</b>
+ notify_externally_resized
+ (<a href = "#size_type3735929547">size_type</a> new_size)</pre>
+
+
+</td>
+
+<td>
+<p>Notifies the table was resized externally.</p>
+
+
+</td>
+
+</tr>
+
+</table>
+
+<h2>
+<a name = "link10">Queries.
+</a>
+
+</h2>
+
+<p>Called to query whether/how to resize.</p>
+
+
+<table WIDTH = "100%" BORDER = "1">
+<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>bool</b>
+ is_resize_needed
+ () <b>const</b></pre>
+
+
+</td>
+
+<td>
+<p>Queries whether a resize is needed.</p>
+
+
+</td>
+
+</tr>
+
+<tr>
+<td>
+<pre><b>inline</b> <b>bool</b>
+ is_grow_needed
+ (<a href = "#size_type3735929547">size_type</a> size, <a href = "#size_type3735929547">size_type</a> num_entries) <b>const</b></pre>
+
+
+</td>
+
+<td>
+<p>Queries whether a grow is needed.</p>
+
+
+<p>This method is called only if this object indicated is needed.</p>
+
+
+</td>
+
+</tr>
+
+<tr>
+<td>
+<pre><b>inline</b> <b>bool</b>
+ is_shrink_needed
+ (<a href = "#size_type3735929547">size_type</a> size, <a href = "#size_type3735929547">size_type</a> num_entries) <b>const</b></pre>
+
+
+</td>
+
+<td>
+<p>Queries whether a shrink is needed.</p>
+
+
+<p>This method is called only if this object indicated is needed.</p>
+
+
+</td>
+
+</tr>
+
+</table>
+
+
+
+</body>
+
+</html>
+
+
diff --git a/libstdc++-v3/docs/html/ext/pb_assoc/cc_hash_policy_cd.jpg b/libstdc++-v3/docs/html/ext/pb_assoc/cc_hash_policy_cd.jpg
new file mode 100644
index 00000000000..63891a851b3
--- /dev/null
+++ b/libstdc++-v3/docs/html/ext/pb_assoc/cc_hash_policy_cd.jpg
Binary files differ
diff --git a/libstdc++-v3/docs/html/ext/pb_assoc/cd.jpg b/libstdc++-v3/docs/html/ext/pb_assoc/cd.jpg
new file mode 100644
index 00000000000..1b5554484e3
--- /dev/null
+++ b/libstdc++-v3/docs/html/ext/pb_assoc/cd.jpg
Binary files differ
diff --git a/libstdc++-v3/docs/html/ext/pb_assoc/component_requirements.html b/libstdc++-v3/docs/html/ext/pb_assoc/component_requirements.html
new file mode 100644
index 00000000000..703e4e0f6d4
--- /dev/null
+++ b/libstdc++-v3/docs/html/ext/pb_assoc/component_requirements.html
@@ -0,0 +1,51 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
+<html>
+ <head>
+ <title>Component Requirements</title>
+ </head>
+ <body bgcolor = "white">
+ <h1>Component Requirements</h1>
+ <h2>Functional Requirements</h2>
+ <ol>
+ <li>
+ Keys:
+ <ol>
+ <li>
+ Key objects must be copy-constructible (they need not support assignment).
+ <li>
+ Key objects must be destructible.</li>
+ </ol>
+ <li>
+ Data:
+ <ol>
+ <li>
+ Data objects must be copy-constructible (they need not support assignment).
+ <LI>
+ Data objects must be default constructible.
+ <li>
+ Data objects must be destructible.</li>
+ </ol></li> </ol> <a name="exception_requirements">
+ <h2>Exception Requirements</h2>
+ </a>
+ <ol>
+ <li>
+ Keys:
+ <ol>
+ <li>
+ Key objects must not throw exceptions when destructed.
+ <li>
+ Key objects may throw exceptions when copy constructed.</li>
+ </ol>
+ <li>
+ Data:
+ <ol>
+ <li>
+ Data objects must must not throw exceptions when destructed.
+ <li>
+ Data objects may throw exceptions when copy constructed.</li>
+ </ol></li> </ol>
+ <HR>
+
+ </body>
+
+</html>
diff --git a/libstdc++-v3/docs/html/ext/pb_assoc/compound_data_enabled_ms_tag.html b/libstdc++-v3/docs/html/ext/pb_assoc/compound_data_enabled_ms_tag.html
new file mode 100644
index 00000000000..6b70c3fceba
--- /dev/null
+++ b/libstdc++-v3/docs/html/ext/pb_assoc/compound_data_enabled_ms_tag.html
@@ -0,0 +1,41 @@
+
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
+
+
+<html>
+<head>
+<title>compound_data_enabled_ms_tag Interface
+</title>
+
+</head>
+
+<body>
+<h1>
+<tt>compound_data_enabled_ms_tag
+</tt>
+
+ Interface
+
+
+</h1>
+
+<p>Mapping-semantics tag indicating that the container objects maps each key to some compound datum.
+</p>
+
+<ol>
+<li>
+<a href = "../../../../include/ext/pb_assoc/ms_trait.hpp"><tt>ms_trait.hpp</tt>
+</a>
+
+</li>
+
+</ol>
+
+
+
+
+</body>
+
+</html>
+
+
diff --git a/libstdc++-v3/docs/html/ext/pb_assoc/compound_data_type.html b/libstdc++-v3/docs/html/ext/pb_assoc/compound_data_type.html
new file mode 100644
index 00000000000..c9fd7e0f481
--- /dev/null
+++ b/libstdc++-v3/docs/html/ext/pb_assoc/compound_data_type.html
@@ -0,0 +1,128 @@
+
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
+
+
+<html>
+<head>
+<title>compound_data_type Interface
+</title>
+
+</head>
+
+<body>
+<h1>
+<tt>compound_data_type
+</tt>
+
+ Interface
+
+
+</h1>
+
+<p>A data-policy indicating that an associative container has multiple mapping levels.
+</p>
+
+<ol>
+<li>
+<a href = "../../../../include/ext/pb_assoc/data_type.hpp"><tt>data_type.hpp</tt>
+</a>
+
+</li>
+
+<li>
+<a href = "#link1">Template parameters.
+</a>
+
+</li>
+
+<li>
+Public Types and Constants:
+
+
+<ol>
+<li>
+<a href = "#link2">General definitions.
+</a>
+
+</li>
+
+</ol>
+
+</li>
+
+</ol>
+
+
+<h2>
+<a name = "link1">Template parameters.
+</a>
+
+</h2>
+
+<table WIDTH = "100%" BORDER = "1">
+<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 = "Cntnr3735929076">Cntnr</a></pre>
+
+
+</td>
+
+<td>
+<p>(Associative) container type to which every key in the container maps.</p>
+
+
+</td>
+
+<td>
+-
+
+
+</td>
+
+</tr>
+
+</table>
+
+<h2>
+<a name = "link2">General definitions.
+</a>
+
+</h2>
+
+<table WIDTH = "100%" BORDER = "1">
+<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 = "cntnr3735929108">cntnr</a></pre>
+
+
+</td>
+
+<td>
+<pre><a href = "#Cntnr3735929076">Cntnr</a></pre>
+
+
+</td>
+
+<td>
+<p>The type of container which is the actual data type.</p>
+
+
+</td>
+
+</tr>
+
+</table>
+
+
+
+</body>
+
+</html>
+
+
diff --git a/libstdc++-v3/docs/html/ext/pb_assoc/compound_ds_tag.html b/libstdc++-v3/docs/html/ext/pb_assoc/compound_ds_tag.html
new file mode 100644
index 00000000000..c1cb9ce3ceb
--- /dev/null
+++ b/libstdc++-v3/docs/html/ext/pb_assoc/compound_ds_tag.html
@@ -0,0 +1,77 @@
+
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
+
+
+<html>
+<head>
+<title>compound_ds_tag Interface
+</title>
+
+</head>
+
+<body>
+<h1>
+<tt>compound_ds_tag
+</tt>
+
+ Interface
+
+
+</h1>
+
+<p>Compound data-structure tag.
+</p>
+
+<p>Indicates that the underlying data-structure is a composition of other data structures.
+</p>
+
+<ol>
+<li>
+<a href = "../../../../include/ext/pb_assoc/ds_trait.hpp"><tt>ds_trait.hpp</tt>
+</a>
+
+</li>
+
+<li>
+<a href = "#link1">Base classes.
+</a>
+
+</li>
+
+</ol>
+
+
+<h2>
+<a name = "link1">Base classes.
+</a>
+
+</h2>
+
+<table WIDTH = "100%" BORDER = "1">
+<TR><TD Width = "80%" ALIGN = "left"><b>Class</b></TD><TD Width = "20%" ALIGN = "left"><b>Derivation Type</b></TD></TR>
+
+
+<tr>
+<td>
+<pre><a href = "basic_ds_tag.html"><tt>basic_ds_tag</tt></a></pre>
+
+
+</td>
+
+<td>
+<p>public</p>
+
+
+</td>
+
+</tr>
+
+</table>
+
+
+
+</body>
+
+</html>
+
+
diff --git a/libstdc++-v3/docs/html/ext/pb_assoc/concepts.html b/libstdc++-v3/docs/html/ext/pb_assoc/concepts.html
new file mode 100644
index 00000000000..cd7295891e8
--- /dev/null
+++ b/libstdc++-v3/docs/html/ext/pb_assoc/concepts.html
@@ -0,0 +1,124 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
+<html>
+<head>
+<title>Concepts</title>
+<meta name="GENERATOR" content="Microsoft Visual Studio .NET 7.1">
+<meta name="vs_targetSchema" content="http://schemas.microsoft.com/intellisense/ie5">
+</head>
+<body bgcolor = "white">
+<h1>Concepts</h1>
+
+<p>
+Following are some concepts used throughout the documentation.
+</p>
+
+<ol>
+ <li><a href = "#concepts_null_policies">Null Policy Classes</a></li>
+ <li><a href = "#concepts_find_and_range_iterators">Find and Range Iterators</a></li>
+ <li><a href = "#concepts_mapping_levels">Mapping Levels</a></li>
+</ol>
+
+<h2><a name = "concepts_null_policies">Null Policy Classes</a></h2>
+
+<p>
+ Associative containers are typically parameterized by various policies.
+For example, a hash-based associative
+container is parameterized by a hash-functor, transforming each key into an non-negative numerical type. Each such value is then further mapped into a position within the table.
+The mapping of a key into a position within the table is therefore a two-step process.
+</p>
+
+<p>
+In some
+cases, instantiations are <i>redundant</i>. For example, when the keys are integers, it is possible to use a <i>redundant</i>
+hash policy, which transforms each key into its value.
+</p>
+
+<p>
+ In some other cases, these policies are <i>irrelevent</i>. For example,
+a hash-based associative container might transform keys into positions within
+a table by a different method than the two-step method described above. In such a case, the hash functor is simply irrelevent.
+</p>
+
+<p>
+ <tt>pb_assoc</tt> uses special pre-defined &quot;null policies&quot; classes
+for these cases. Some null policies in <tt>pb_assoc</tt>
+are:
+</p>
+<ol>
+ <li <a href = "null_data_type.html"><tt>null_data_type</tt></a></li>
+ <li><a href = "null_node_updator.html"><tt>null_node_updator</tt></a></li>
+ <li><a href = "null_hash_fn.html"><tt>null_hash_fn</tt></a></li>
+ <li><a href = "null_probe_fn.html"><tt>null_probe_fn</tt></a></li>
+</ol>
+
+<p>
+A &quot;set&quot; in <tt>pb_assoc</tt> is an associative container with its <tt>Data_Parameter</tt> instantiated by
+<a href = "null_data_type.html"><tt>null_data_type</tt></a>.
+<a href = "tree_based_containers.html#node_invariants.html">Tree-Based Containers::Node Invariants</a>
+explains another case where a null policy is needed.
+</p>
+
+
+
+<h2><a name = "concepts_find_and_range_iterators">Find and Range Methods and Iterators</a></h2>
+
+<p>
+ Associative containers allow access to their elements via iterators. <i>E.g.</i>,
+<tt>find</tt> returns an iterator to an element with a given key and
+<tt>begin</tt> returns an iterator to the first element in the container.
+</p>
+
+<p>
+In general, there are two types of methods: <i>find types</i>, and <i>range types</i>.
+ Find-type
+methods return iterators corresponding to elements which have been found in some sense, as
+the container searched for them in order to access them (<i>i.e.</i>, via the
+<tt>find</tt> method) or searched for their location in order to insert them
+(<i>i.e.</i>, via the <tt>insert</tt> method). Range-type methods return iterators
+which can be used to traverse the range of all stored elements, (<i>i.e.</i>, via the
+<tt>begin</tt> and <tt>end</tt> methods).
+</p>
+
+<p>Correspondingly, in <tt>pb_assoc</tt> there are two types of iterators: <i>find type</i>
+iterators are returned by find methods, and range iterators are returned by range methods. For example,
+if <tt>T</tt> is any associative container with integer keys, and <tt>t</tt>
+is a container of type <tt>T</tt>,
+then the following snippet is valid:
+</p>
+
+<pre>
+<b>typename</b> T::find_iterator it0 = t.find(3);
+<b>typename</b> T::const_find_iterator it0 = t.find(3);
+
+<b>typename</b> T::iterator it0 = t.begin();
+<b>typename</b> T::const_iterator it0 = t.begin();
+</pre>
+
+
+<p>
+ This is motivated and explained further in
+<a href = "ds_gen.html#find_range">Data-Structure Genericity::Find-Type and Range-Type Methods and Iterators</a>, which also explains the relationship between find-type and range-type iterators.
+</p>
+
+<h2><a href = "#concepts_mapping_levels">Mapping Levels</a></h2>
+
+<p>
+ In <tt>pb_assoc</tt> &quot;multimaps&quot; are
+&quot;maps&quot; of &quot;sets&quot;. While this design allows efficient
+operations, it makes for cumbersome use at points. For example a
+&quot;multimap&quot; of integers to characters does not
+directly support <tt>inser(std::make_pair(2, 'b')</tt>, since 2 is mapped
+to a &quot;set&quot; of characters, and not to a character.
+</p>
+
+<p>
+ Consequently, <tt>pb_assoc</tt> contains a rebind-like mechanism so that
+containers can support such operations. To dispel ambiguity, container types are
+assigned mapping levels. &quot;Maps&quot; and &quot;sets&quot; have
+a mapping level 1, since they use a single association level. The &quot;multimap&quot;
+above has a mapping level 2, since it uses two association levels: one for integers, and one for characters. The rebind mechanism can be used to alter the association level. This is described in
+<a href = "ms_gen.html">Mapping Semantics</a>.
+</p>
+
+</body>
+</html>
diff --git a/libstdc++-v3/docs/html/ext/pb_assoc/contact.html b/libstdc++-v3/docs/html/ext/pb_assoc/contact.html
new file mode 100644
index 00000000000..2eb28be483b
--- /dev/null
+++ b/libstdc++-v3/docs/html/ext/pb_assoc/contact.html
@@ -0,0 +1,19 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
+<html>
+<head>
+<title>Contact</title>
+
+<meta name="GENERATOR" content="Microsoft Visual Studio .NET 7.1">
+<meta name="vs_targetSchema" content="http://schemas.microsoft.com/intellisense/ie5">
+
+</head>
+<body bgcolor = "white">
+<h1>Contact</h1>
+
+<p>
+For anything relevant, please write to
+<a href = "mailto:pbassoc@gmail.com">pbassoc@gmail.com</a>
+</p>
+
+</body>
+</html>
diff --git a/libstdc++-v3/docs/html/ext/pb_assoc/counter_update_metadata.html b/libstdc++-v3/docs/html/ext/pb_assoc/counter_update_metadata.html
new file mode 100644
index 00000000000..fb56b1a0ae2
--- /dev/null
+++ b/libstdc++-v3/docs/html/ext/pb_assoc/counter_update_metadata.html
@@ -0,0 +1,101 @@
+
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
+
+
+<html>
+<head>
+<title>counter_update_metadata Interface
+</title>
+
+</head>
+
+<body>
+<h1>
+<tt>counter_update_metadata
+</tt>
+
+ Interface
+
+
+</h1>
+
+<p>A list-update metadata type that moves elements to the front of the list based on the counter algorithm.
+</p>
+
+<ol>
+<li>
+<a href = "../../../../include/ext/pb_assoc/counter_update_policy.hpp"><tt>counter_update_policy.hpp</tt>
+</a>
+
+</li>
+
+<li>
+<a href = "#link1">Template parameters.
+</a>
+
+</li>
+
+<li>
+Public Types and Constants:
+
+
+<ol>
+<li>
+<a href = "#link2">General definitions.
+</a>
+
+</li>
+
+</ol>
+
+</li>
+
+</ol>
+
+
+<h2>
+<a name = "link1">Template parameters.
+</a>
+
+</h2>
+
+<table WIDTH = "100%" BORDER = "1">
+<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 = "Size_Type3735929483">Size_Type</a></pre>
+
+
+</td>
+
+<td>
+<p>Size type which will be used for counting the number of times a node was accessed.</p>
+
+
+</td>
+
+<td>
+size_t
+
+
+</td>
+
+</tr>
+
+</table>
+
+<h2>
+<a name = "link2">General definitions.
+</a>
+
+</h2>
+
+
+
+</body>
+
+</html>
+
+
diff --git a/libstdc++-v3/docs/html/ext/pb_assoc/counter_update_policy.html b/libstdc++-v3/docs/html/ext/pb_assoc/counter_update_policy.html
new file mode 100644
index 00000000000..c54fe3739d0
--- /dev/null
+++ b/libstdc++-v3/docs/html/ext/pb_assoc/counter_update_policy.html
@@ -0,0 +1,380 @@
+
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
+
+
+<html>
+<head>
+<title>counter_update_policy Interface
+</title>
+
+</head>
+
+<body>
+<h1>
+<tt>counter_update_policy
+</tt>
+
+ Interface
+
+
+</h1>
+
+<p>A list-update policy that moves elements to the front of the list based on the counter algorithm.
+</p>
+
+<p>This class is likely to slightly change interface when random number generators become part of the C++ standard.
+</p>
+
+<ol>
+<li>
+<a href = "../../../../include/ext/pb_assoc/counter_update_policy.hpp"><tt>counter_update_policy.hpp</tt>
+</a>
+
+</li>
+
+<li>
+<a href = "#link1">Template parameters.
+</a>
+
+</li>
+
+<li>
+Public Types and Constants:
+
+
+<ol>
+<li>
+<a href = "#link2">Size definitions.
+</a>
+
+</li>
+
+</ol>
+
+</li>
+
+<li>
+Public Methods:
+
+
+<ol>
+<li>
+<a href = "#link3">Constructors, destructor, and related.
+</a>
+
+</li>
+
+<li>
+<a href = "#link4">Information methods.
+</a>
+
+</li>
+
+</ol>
+
+</li>
+
+<li>
+Protected Types and Constants:
+
+
+<ol>
+<li>
+<a href = "#link5">Metadata definitions.
+</a>
+
+</li>
+
+</ol>
+
+</li>
+
+<li>
+Protected Methods:
+
+
+<ol>
+<li>
+<a href = "#link6">Metadata operations.
+</a>
+
+</li>
+
+</ol>
+
+</li>
+
+</ol>
+
+
+<h2>
+<a name = "link1">Template parameters.
+</a>
+
+</h2>
+
+<table WIDTH = "100%" BORDER = "1">
+<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 = "Size_Type3735929483">Size_Type</a></pre>
+
+
+</td>
+
+<td>
+<p>Size type.</p>
+
+
+</td>
+
+<td>
+size_t
+
+
+</td>
+
+</tr>
+
+<tr>
+<td>
+<pre><a name = "Metadata_Reference3735929465">Metadata_Reference</a></pre>
+
+
+</td>
+
+<td>
+<p>Metadata reference type.</p>
+
+
+</td>
+
+<td>
+<pre>std::allocator&lt;
+ <a href = "counter_update_metadata.html"><tt>counter_update_metadata</tt></a>&gt;::
+ reference
+
+
+</td>
+
+</tr>
+
+</table>
+
+<h2>
+<a name = "link2">Size definitions.
+</a>
+
+</h2>
+
+<table WIDTH = "100%" BORDER = "1">
+<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_type3735929547">size_type</a></pre>
+
+
+</td>
+
+<td>
+<pre><a href = "#Size_Type3735929483">Size_Type</a></pre>
+
+
+</td>
+
+<td>
+<p>Size type used for counting the number of times each node is accessed until the count is reset to 0 and the node moved to the front of the list.</p>
+
+
+</td>
+
+</tr>
+
+</table>
+
+<h2>
+<a name = "link3">Constructors, destructor, and related.
+</a>
+
+</h2>
+
+<table WIDTH = "100%" BORDER = "1">
+<TR><TD Width = "45%" ALIGN = "left"><b>Method</b></TD><TD Width = "55%" ALIGN = "left"><b>Description</b></TD></TR>
+
+
+<tr>
+<td>
+<pre> counter_update_policy
+ (<a href = "#size_type3735929547">size_type</a> max_count = 5)</pre>
+
+
+</td>
+
+<td>
+<p>Constructor. <font color = "#666666"><tt>max_count</tt></font> determines the the number of times each node is accessed until the count is reset to 0 and the node moved to the front of the list.</p>
+
+
+</td>
+
+</tr>
+
+<tr>
+<td>
+<pre><b>void</b>
+ swap
+ (<font color = "olive">counter_update_policy</font> &amp;r_other)</pre>
+
+
+</td>
+
+<td>
+<p>Swaps content.</p>
+
+
+</td>
+
+</tr>
+
+</table>
+
+<h2>
+<a name = "link4">Information methods.
+</a>
+
+</h2>
+
+<table WIDTH = "100%" BORDER = "1">
+<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>
+ <a href = "#size_type3735929547">size_type</a>
+ get_max_count
+ () <b>const</b></pre>
+
+
+</td>
+
+<td>
+<p>Returns the max count of each metadata (number of times it is accessed until moved to the front of the list).</p>
+
+
+</td>
+
+</tr>
+
+</table>
+
+<h2>
+<a name = "link5">Metadata definitions.
+</a>
+
+</h2>
+
+<table WIDTH = "100%" BORDER = "1">
+<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_type3735929937">metadata_type</a></pre>
+
+
+</td>
+
+<td>
+<pre><a href = "counter_update_metadata.html"><tt>counter_update_metadata</tt></a></pre>
+
+
+</td>
+
+<td>
+<p>Metadata on which this functor operates.</p>
+
+
+</td>
+
+</tr>
+
+<tr>
+<td>
+<pre><a name = "metadata_reference3735929497">metadata_reference</a></pre>
+
+
+</td>
+
+<td>
+<pre><a href = "#Metadata_Reference3735929465">Metadata_Reference</a></pre>
+
+
+</td>
+
+<td>
+<p>Reference to metadata on which this functor operates.</p>
+
+
+</td>
+
+</tr>
+
+</table>
+
+<h2>
+<a name = "link6">Metadata operations.
+</a>
+
+</h2>
+
+<table WIDTH = "100%" BORDER = "1">
+<TR><TD Width = "45%" ALIGN = "left"><b>Method</b></TD><TD Width = "55%" ALIGN = "left"><b>Description</b></TD></TR>
+
+
+<tr>
+<td>
+<pre><a href = "#metadata_type3735929937">metadata_type</a>
+ <b>operator</b>()
+ () <b>const</b></pre>
+
+
+</td>
+
+<td>
+<p>Creates a metadata object.</p>
+
+
+</td>
+
+</tr>
+
+<tr>
+<td>
+<pre><b>bool</b>
+ <b>operator</b>()
+ (<a href = "#metadata_reference3735929497">metadata_reference</a> r_data) <b>const</b></pre>
+
+
+</td>
+
+<td>
+<p>Decides whether a metadata object should be moved to the front of the list.</p>
+
+
+</td>
+
+</tr>
+
+</table>
+
+
+
+</body>
+
+</html>
+
+
diff --git a/libstdc++-v3/docs/html/ext/pb_assoc/data_enabled_ms_tag.html b/libstdc++-v3/docs/html/ext/pb_assoc/data_enabled_ms_tag.html
new file mode 100644
index 00000000000..7ae1ac06738
--- /dev/null
+++ b/libstdc++-v3/docs/html/ext/pb_assoc/data_enabled_ms_tag.html
@@ -0,0 +1,41 @@
+
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
+
+
+<html>
+<head>
+<title>data_enabled_ms_tag Interface
+</title>
+
+</head>
+
+<body>
+<h1>
+<tt>data_enabled_ms_tag
+</tt>
+
+ Interface
+
+
+</h1>
+
+<p>Mapping-semantics tag indicating that the container objects maps each key to some datum.
+</p>
+
+<ol>
+<li>
+<a href = "../../../../include/ext/pb_assoc/ms_trait.hpp"><tt>ms_trait.hpp</tt>
+</a>
+
+</li>
+
+</ol>
+
+
+
+
+</body>
+
+</html>
+
+
diff --git a/libstdc++-v3/docs/html/ext/pb_assoc/design.html b/libstdc++-v3/docs/html/ext/pb_assoc/design.html
new file mode 100644
index 00000000000..4eace5f70cd
--- /dev/null
+++ b/libstdc++-v3/docs/html/ext/pb_assoc/design.html
@@ -0,0 +1,23 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
+<html>
+ <head>
+ <title>Design</title>
+ <meta name="GENERATOR" content="Microsoft Visual Studio .NET 7.1">
+ <meta name="vs_targetSchema" content="http://schemas.microsoft.com/intellisense/ie5">
+ </head>
+<body bgcolor = "white">
+<h1>Design</h1>
+
+<ol>
+ <li> <a href = "overview.html">Overview</a> describes an overview.</li>
+ <li> <a href = "concepts.html">Concepts</a> describes some concepts. </li>
+ <li> <a href = "ds_gen.html">Data-Structure Genericity</a> discusses generic manipulation of containers based on different underlying data-structures.</li>
+ <li> <a href = "ms_gen.html">Mapping-Semantic Genericity</a> discusses generic manipulation of containers with different mapping semantics.</li>
+ <li> <a href = "hash_based_containers.html">Hash-Based Containers</a> describes the design and policies of hash-based containers.</li>
+ <li> <a href = "tree_based_containers.html">Tree-Based Containers</a> describes the design and policies of tree-based containers.</li>
+ <li> <a href = "lu_based_containers.html">List-Based Containers</a> describes the design and policies of list-based containers with update policies.</li>
+</ol>
+
+
+ </body>
+</html>
diff --git a/libstdc++-v3/docs/html/ext/pb_assoc/different_underlying_dss.jpg b/libstdc++-v3/docs/html/ext/pb_assoc/different_underlying_dss.jpg
new file mode 100644
index 00000000000..2ddd2571814
--- /dev/null
+++ b/libstdc++-v3/docs/html/ext/pb_assoc/different_underlying_dss.jpg
Binary files differ
diff --git a/libstdc++-v3/docs/html/ext/pb_assoc/direct_mask_range_hashing.html b/libstdc++-v3/docs/html/ext/pb_assoc/direct_mask_range_hashing.html
new file mode 100644
index 00000000000..f1915c31be5
--- /dev/null
+++ b/libstdc++-v3/docs/html/ext/pb_assoc/direct_mask_range_hashing.html
@@ -0,0 +1,251 @@
+
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
+
+
+<html>
+<head>
+<title>direct_mask_range_hashing Interface
+</title>
+
+</head>
+
+<body>
+<h1>
+<tt>direct_mask_range_hashing
+</tt>
+
+ Interface
+
+
+</h1>
+
+<p>A mask range-hashing class (uses a bit-mask).
+</p>
+
+<ol>
+<li>
+<a href = "../../../../include/ext/pb_assoc/hash_policy.hpp"><tt>hash_policy.hpp</tt>
+</a>
+
+</li>
+
+<li>
+<a href = "#link1">Template parameters.
+</a>
+
+</li>
+
+<li>
+Public Types and Constants:
+
+
+<ol>
+<li>
+<a href = "#link2">General definitions.
+</a>
+
+</li>
+
+</ol>
+
+</li>
+
+<li>
+Public Methods:
+
+
+<ol>
+<li>
+<a href = "#link3">Constructors, destructor, and related.
+</a>
+
+</li>
+
+</ol>
+
+</li>
+
+<li>
+Protected Methods:
+
+
+<ol>
+<li>
+<a href = "#link4">Notification methods.
+</a>
+
+</li>
+
+<li>
+<a href = "#link5">Operators.
+</a>
+
+</li>
+
+</ol>
+
+</li>
+
+</ol>
+
+
+<h2>
+<a name = "link1">Template parameters.
+</a>
+
+</h2>
+
+<table WIDTH = "100%" BORDER = "1">
+<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 = "Size_Type3735929483">Size_Type</a></pre>
+
+
+</td>
+
+<td>
+<p>Size type.</p>
+
+
+</td>
+
+<td>
+size_t
+
+
+</td>
+
+</tr>
+
+</table>
+
+<h2>
+<a name = "link2">General definitions.
+</a>
+
+</h2>
+
+<table WIDTH = "100%" BORDER = "1">
+<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_type3735929547">size_type</a></pre>
+
+
+</td>
+
+<td>
+<pre><a href = "#Size_Type3735929483">Size_Type</a></pre>
+
+
+</td>
+
+<td>
+<p>Size type.</p>
+
+
+</td>
+
+</tr>
+
+</table>
+
+<h2>
+<a name = "link3">Constructors, destructor, and related.
+</a>
+
+</h2>
+
+<table WIDTH = "100%" BORDER = "1">
+<TR><TD Width = "45%" ALIGN = "left"><b>Method</b></TD><TD Width = "55%" ALIGN = "left"><b>Description</b></TD></TR>
+
+
+<tr>
+<td>
+<pre><b>void</b>
+ swap
+ (<font color = "olive">direct_mask_range_hashing</font> &amp;r_other)</pre>
+
+
+</td>
+
+<td>
+<p>Swaps content.</p>
+
+
+</td>
+
+</tr>
+
+</table>
+
+<h2>
+<a name = "link4">Notification methods.
+</a>
+
+</h2>
+
+<table WIDTH = "100%" BORDER = "1">
+<TR><TD Width = "45%" ALIGN = "left"><b>Method</b></TD><TD Width = "55%" ALIGN = "left"><b>Description</b></TD></TR>
+
+
+<tr>
+<td>
+<pre><b>void</b>
+ notify_resized
+ (<a href = "#size_type3735929547">size_type</a> size)</pre>
+
+
+</td>
+
+<td>
+<p>Notifies the policy object that the container's size has changed to <font color = "#666666"><tt>size</tt></font>.</p>
+
+
+</td>
+
+</tr>
+
+</table>
+
+<h2>
+<a name = "link5">Operators.
+</a>
+
+</h2>
+
+<table WIDTH = "100%" BORDER = "1">
+<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> <a href = "#size_type3735929547">size_type</a>
+ <b>operator</b>()
+ (<a href = "#size_type3735929547">size_type</a> hash) <b>const</b></pre>
+
+
+</td>
+
+<td>
+<p>Transforms the hash value <font color = "#666666"><tt>hash</tt></font> into a ranged-hash value (using a bit-mask).</p>
+
+
+</td>
+
+</tr>
+
+</table>
+
+
+
+</body>
+
+</html>
+
+
diff --git a/libstdc++-v3/docs/html/ext/pb_assoc/direct_mod_range_hashing.html b/libstdc++-v3/docs/html/ext/pb_assoc/direct_mod_range_hashing.html
new file mode 100644
index 00000000000..b9096ccb35c
--- /dev/null
+++ b/libstdc++-v3/docs/html/ext/pb_assoc/direct_mod_range_hashing.html
@@ -0,0 +1,228 @@
+
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
+
+
+<html>
+<head>
+<title>direct_mod_range_hashing Interface
+</title>
+
+</head>
+
+<body>
+<h1>
+<tt>direct_mod_range_hashing
+</tt>
+
+ Interface
+
+
+</h1>
+
+<p>A mod range-hashing class (uses the modulo function).
+</p>
+
+<ol>
+<li>
+<a href = "../../../../include/ext/pb_assoc/hash_policy.hpp"><tt>hash_policy.hpp</tt>
+</a>
+
+</li>
+
+<li>
+<a href = "#link1">Template parameters.
+</a>
+
+</li>
+
+<li>
+Public Types and Constants:
+
+
+<ol>
+<li>
+<a href = "#link2">General definitions.
+</a>
+
+</li>
+
+</ol>
+
+</li>
+
+<li>
+Public Methods:
+
+
+<ol>
+<li>
+<a href = "#link3">Constructors, destructor, and related.
+</a>
+
+</li>
+
+</ol>
+
+</li>
+
+<li>
+Protected Methods:
+
+
+<ol>
+<li>
+<a href = "#link4">Notification methods.
+</a>
+
+</li>
+
+<li>
+<a href = "#link5">Operators.
+</a>
+
+</li>
+
+</ol>
+
+</li>
+
+</ol>
+
+
+<h2>
+<a name = "link1">Template parameters.
+</a>
+
+</h2>
+
+<table WIDTH = "100%" BORDER = "1">
+<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 = "Size_Type3735929483">Size_Type</a></pre>
+
+
+</td>
+
+<td>
+<p>Size type.</p>
+
+
+</td>
+
+<td>
+size_t
+
+
+</td>
+
+</tr>
+
+</table>
+
+<h2>
+<a name = "link2">General definitions.
+</a>
+
+</h2>
+
+<table WIDTH = "100%" BORDER = "1">
+<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_type3735929547">size_type</a></pre>
+
+
+</td>
+
+<td>
+<pre><a href = "#Size_Type3735929483">Size_Type</a></pre>
+
+
+</td>
+
+<td>
+<p>Size type.</p>
+
+
+</td>
+
+</tr>
+
+</table>
+
+<h2>
+<a name = "link3">Constructors, destructor, and related.
+</a>
+
+</h2>
+
+<table WIDTH = "100%" BORDER = "1">
+<TR><TD Width = "45%" ALIGN = "left"><b>Method</b></TD><TD Width = "55%" ALIGN = "left"><b>Description</b></TD></TR>
+
+
+<tr>
+<td>
+<pre><b>void</b>
+ swap
+ (<font color = "olive">direct_mod_range_hashing</font> &amp;r_other)</pre>
+
+
+</td>
+
+<td>
+<p>Swaps content.</p>
+
+
+</td>
+
+</tr>
+
+</table>
+
+<h2>
+<a name = "link4">Notification methods.
+</a>
+
+</h2>
+
+<h2>
+<a name = "link5">Operators.
+</a>
+
+</h2>
+
+<table WIDTH = "100%" BORDER = "1">
+<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> <a href = "#size_type3735929547">size_type</a>
+ <b>operator</b>()
+ (<a href = "#size_type3735929547">size_type</a> hash) <b>const</b></pre>
+
+
+</td>
+
+<td>
+<p>Transforms the hash value <font color = "#666666"><tt>hash</tt></font> into a ranged-hash value (using a modulo operation).</p>
+
+
+</td>
+
+</tr>
+
+</table>
+
+
+
+</body>
+
+</html>
+
+
diff --git a/libstdc++-v3/docs/html/ext/pb_assoc/disclaimer.html b/libstdc++-v3/docs/html/ext/pb_assoc/disclaimer.html
new file mode 100644
index 00000000000..c5dcb864b4c
--- /dev/null
+++ b/libstdc++-v3/docs/html/ext/pb_assoc/disclaimer.html
@@ -0,0 +1,25 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
+<html>
+<head>
+<title>Disclaimer and Copyright</title>
+<meta name="GENERATOR" content="Microsoft Visual Studio .NET 7.1">
+<meta name="vs_targetSchema" content="http://schemas.microsoft.com/intellisense/ie5">
+</head>
+<body bgcolor = "white">
+
+<h2>Disclaimer and Copyright</h2>
+
+<p>
+Revised 16 February, 2004
+</p>
+&copy; Copyright Ami Tavory and Vladimir Dreizin, IBM-HRL, 2004, and Benjamin Kosnik, Red Hat, 2004.
+<P>
+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.
+</p>
+<P>
+None of the above authors, nor IBM Haifa Research Laboratories, Red Hat, or both, make any representation about the suitability of this software for any purpose. It is provided "as is" without express or implied warranty.
+</p>
+
+
+</body>
+</html>
diff --git a/libstdc++-v3/docs/html/ext/pb_assoc/ds_gen.html b/libstdc++-v3/docs/html/ext/pb_assoc/ds_gen.html
new file mode 100644
index 00000000000..d7cc0aad22a
--- /dev/null
+++ b/libstdc++-v3/docs/html/ext/pb_assoc/ds_gen.html
@@ -0,0 +1,368 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
+<html>
+ <head>
+ <title>Data-Structure Genericity</title>
+ <meta name="GENERATOR" content="Microsoft Visual Studio .NET 7.1">
+ <meta name="vs_targetSchema" content="http://schemas.microsoft.com/intellisense/ie5">
+ </head>
+<body bgcolor = "white">
+<h1>Data-Structure Genericity</h1>
+
+<p>
+ This section describes genericity over different underlying data-structures. It is organized as follows.
+</p>
+<ol>
+ <li><a href = "#problem">The Basic Problem</a></li>
+ <li><a href = "#ds_hierarchy">Container Hierarchy</a></li>
+ <li><a href = "#ds_traits">Data-Structure Tags and Traits</a></li>
+ <li><a href = "#find_range">Find-Type and Range-Type Methods and Iterators</a></li>
+</ol>
+
+<h2><a name = "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 behaviour of the object? <i>E.g.</i>, suppose one writes
+</p>
+<pre>
+<b>template</b>&lt;
+ <b>class</b> Cntnr&gt;
+<b>void</b> some_op_sequence
+ (Cntnr &r_cntnr)
+{
+ ...
+}
+</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? containers based on splay trees or lists with update policies "cache" "frequently accessed" elements; containers based on most other underlying data-structures do not.</li>
+</ol>
+
+<h2><a name = "ds_hierarchy">Container Hierarchy</a></h2>
+
+<p>
+ Figure
+<a href = "#cd">Class hierarchy</a>
+ shows the container hierarchy.
+</p>
+<ol>
+ <li>
+<a href = "basic_assoc_cntnr.html"><tt>basic_assoc_cntnr</tt></a>
+contains types and methods shared by all associative containers, <i>e.g.</i>, the type <tt>allocator</tt> and the method <tt>find</tt>.
+ </li>
+ <li><a href = "basic_assoc_cntnr.html"><tt>basic_hash_assoc_cntnr</tt></a> subclasses
+<a href = "basic_assoc_cntnr.html"><tt>basic_assoc_cntnr</tt></a>, and contains
+types and methods shared by all hash-based containers, <i>e.g.</i>, the type <tt>hash_fn</tt>.
+ </li>
+ <ol>
+ <li>
+<a href = "cc_hash_assoc_cntnr.html"><tt>cc_hash_assoc_cntnr</tt></a>
+and
+<a href = "gp_hash_assoc_cntnr.html"><tt>gp_hash_assoc_cntnr</tt></a>
+each subclass
+<a href = "basic_hash_assoc_cntnr.html"><tt>basic_hash_assoc_cntnr</tt></a>, and encapsulate collision-chaining and (general) probing hash tables, respectively. These two types of hash tables have somewhat different policies and methods (<i>i.e.</i>, constructors and policy-access methods).
+ </li>
+ </ol>
+ <li>
+<a href = "tree_assoc_cntnr.html"><tt>tree_assoc_cntnr</tt></a>
+subclasses one of
+<a href = "basic_tree_assoc_cntnr.html"><tt>basic_tree_assoc_cntnr</tt></a> which
+subclasses
+<a href = "basic_assoc_cntnr.html"><tt>basic_assoc_cntnr</tt></a>.
+<a href = "tree_assoc_cntnr.html"><tt>tree_assoc_cntnr</tt></a>
+ encapsulates a tree-based container, and is parameterized by which underlying data-structure to use (<i>e.g.</i>, a red-black tree);
+<a href = "basic_assoc_cntnr.html"><tt>basic_assoc_cntnr</tt></a>.
+is specialized to the capabilities of the underlying structure.
+<a href = "tree_assoc_cntnr.html"><tt>tree_assoc_cntnr</tt></a> contains some additional methods over
+<a href = "basic_assoc_cntnr.html"><tt>basic_assoc_cntnr</tt></a>,
+<i>e.g.</i>, split and join methods.
+ </li>
+ <li>
+<a href = "lu_assoc_cntnr.html"><tt>lu_assoc_cntnr</tt></a>
+subclasses
+<a href = "basic_assoc_cntnr.html"><tt>basic_assoc_cntnr</tt></a>,
+and encapsulates a list with update policies.
+ </li>
+</ol>
+
+<p>
+ The hierarchy is composed naturally, such that each container inherits
+all types and methods from its base. <a href = "#ds_traits">Data-Structure Tags and Traits</a> discusses how to query which types and methods each container supports.
+</p>
+
+
+
+<h2><a name = "ds_traits">Data-Structure Tags and Traits</a></h2>
+
+<p>
+ <tt>pb_assoc</tt> contains a tag and traits mechanism similar to that of the STL's iterators.
+</p>
+
+<p>
+ <tt>pb_assoc</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 = "#ds_tag_cd">Data-structure tag class hierarchy</a>.
+</p>
+
+<h6 align = "center">
+<a name = "cd">
+<img src = "ds_tag_cd.jpg" width = "70%" alt = "no image">
+</h6>
+</a>
+<h6 align = "center">
+Data-structure tag class hierarchy.
+</h6>
+
+<p>
+ <a href = "basic_assoc_cntnr.html"><tt>basic_assoc_cntnr</tt></a> publicly defines
+<tt>ds_category</tt> as one of the classes in Figure
+.
+Given any container <tt>Cntnr</tt>, the tag of the underlying data-structure can be found via <tt><b>typename</b> Cntnr::ds_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 = "ds_traits.html">ds_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 = "ds_traits.html"><tt>ds_traits</tt></a><tt>&lt;Cntnr&gt;::erase_can_throw</tt>,
+for example.
+
+<p>
+ Some of the definitions in
+<a href = "ds_traits.html"><tt>ds_traits</tt></a>
+are dependent on other definitions. <i>E.g.</i>, if
+<a href = "ds_traits.html"><tt>ds_traits</tt></a><tt>&lt;Cntnr&gt;::split_join</tt>
+is <tt><b>true</b></tt> (which is the case for containers based on trees),
+then
+<a href = "ds_traits.html"><tt>ds_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 = "ds_traits.html"><tt>ds_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>]).
+
+
+<h2><a name = "find_range">Find-Type and Range-Type Methods and Iterators</a></h2>
+
+<p>
+ <tt>pb_assoc</tt> differentiates between two types of methods: find-type methods, and range-type methods. For example, <tt>find</tt> is a find-type method, since a container object searches for an element with a given key; <tt>insert</tt> is a find-type method, since, by STL convention, a container object returns an iterator corresponding to an element with a given key; <tt>begin</tt> and <tt>end</tt> are range-type methods, since they are not used to find a specific element, but rather to go over all elements in a container object.
+</p>
+
+<p>
+ Correspondingly, containers in <tt>pb_assoc</tt> define two families of iterators. <tt>const_find_iterator</tt> and <tt>find_iterator</tt> are the iterator types returned by find-type methods; <tt>const_iterator</tt> and <tt>iterator</tt> are the iterator types returned by range-type methods.
+</p>
+
+<p>
+ The relationship between these iterator types varies between container types. In a tree-based container, for example, <tt>const_find_iterator</tt> and <tt>const_iterator</tt> are synonymous, and <tt>find_iterator</tt> and <tt>iterator</tt> are synonymous; in a hash-based container, for example, this is not the case. Futhermore, find-type iterators in a hash-based container lack movement operators, such as
+ <tt><b>operator++</b></tt>.
+ All containers, however, maintain the invariants shown in Figure
+
+.
+</p>
+
+
+<p>
+ This distinction between find-type and range-type iterators and methods, while complicating the interface, has several advantages:
+</p>
+
+<h3>Iterators in unordered container types</h3>
+
+<p>
+ Given an unordered container type, <i>e.g.</i>, a hash-based container, it makes no sense to move an iterator returned by a find-type method.
+Let <tt>cntnr</tt> be an associative-container object, and
+consider:
+</p>
+
+<pre>
+std::for_each(m.find(1), m.find(5), foo);
+</pre>
+
+<p>
+which applies <tt>foo</tt> to all elements in <tt>m</tt>
+between <tt>1</tt> and <tt>5</tt>.
+</p>
+
+<p>If <tt>cntnr</tt> is a
+tree-based container object, then an in-order walk will apply <tt>foo</tt>
+to the relevant elements, <i>e.g.</i>, as in Figure
+<a href = "#range_it_in_hts">Range iteration in different data-structures</a>
+-A. If <tt>m</tt> is a
+hash-based container, then the order of elements between any two
+elements is undefined (and probably time-varying); there is no
+guarantee that the elements traversed will coincide with the
+<i>logical</i> elements between 1 and 5, <i>e.g.</i>, as in
+Figure <a href = "#range_it_in_hts">Range iteration in different data-structures</a>-B.
+</p>
+
+<p>
+The application of a
+range function <i>e.g.</i>, <tt>for_each</tt>, to a
+pair of hash-based container's iterators is possibly sensical only
+if the iterators are those returned by <tt>begin</tt> and <tt>end</tt>,
+respectively. Therefore, the iterator returned by
+<tt>m</tt>'s <tt>find</tt> method should be immovable.
+</p>
+
+<p>
+ Another point also indicates that hash-based containers'
+find-type iterators and range-type iterators should be distinct.
+Consider Figure
+<a href = "#find_its_in_hash_tables">
+Find-type iterators in hash tables</a>-A.
+An
+(immovable) find-type iterator, designed only to access an
+element, requires at most a single pointer to the element's link.
+Conversely, an iterator designed for range operations
+requires some more information <i>e.g.</i>, the bucket number),
+since a cross-list traversal might be necessary. Alternatively,
+the lists might be linked, forming a monolithic total-element
+list, as in Figure
+<a href = "#find_its_in_hash_tables">
+Find-type iterators in hash tables</a>-B (this seems
+similar to the Dinkumware design
+[<a href = "references.html#dinkumware_stl">dinkumware_stl</a>]). This,
+however, complicates the hash-table's operations.
+
+<h6 align = "center">
+<a name = "range_it_in_hts">
+<img src = "find_iterators_range_ops_1.jpg" width = "70%" alt = "no image">
+</a>
+</h6>
+<h6 align = "center">
+Range iteration in different data-structures.
+</h6>
+
+
+<h6 align = "center">
+<a name = "find_its_in_hash_tables">
+<img src = "find_iterators_range_ops_2.jpg" width = "70%" alt = "no image">
+</a>
+</h6>
+<h6 align = "center">
+Find-type iterators in hash tables.
+</h6>
+
+<p>
+ As a consequence of this design,
+</p>
+
+<pre>
+std::for_each(m.find(1), m.find(5), foo);
+</pre>
+
+<p>
+ will compile for tree-based containers, but will not compile
+for hash-tables or other types. The returned type of <tt>find</tt>
+is a find-type iterator. For tree-based containers, this is synonymous
+with a range-type iterator, and therefore supports <tt><b>operator</b>++</tt>;
+for other types of containers, a find-type iterator lacks <tt><b>operator</b>++</tt>.
+</p>
+
+<h3>Invalidation Guarantees</h3>
+
+<p>
+ Consider the following snippet:
+</p>
+
+<pre>
+it = c.find(3);
+
+c.erase(5);
+</pre>
+
+<p>
+ Following the call to <tt>erase</tt>, what is the validity
+of <tt>it</tt>: can it be dereferenced? can it be incremented?
+</p>
+
+<p>
+ The answer depends on the underlying data-structure of the container.
+Figure
+<a href = "#invalidation_guarantee_erase">Effect of erase in different underlying data-structures</a>
+shows three cases: A1 and A2 show a red-black tree;
+B1 and B2 show an ordered-vector tree; C1 and C2
+show a collision-chaining hash table.
+</p>
+
+<h6 align = "center">
+<a name = "invalidation_guarantee_erase">
+<img src = "invalidation_guarantee_erase.jpg" width = "70%" alt = "no image">
+</h6>
+</a>
+<h6 align = "center">
+Effect of erase in different underlying data-structures.
+</h6>
+
+
+<ol>
+ <li>
+ `Erasing 5 from A1 yields A2. Clearly, an iterator to 3
+ can be dereferenced and incremented.
+ </li>
+ <li>
+ Erasing 5 from B1 yields B2. Clearly, an iterator to 3 is
+ not valid at all.
+ </li>
+ <li>
+ Erasing 5 from C1 yields C2. Here the situation is more complicated.
+On the one hand, incrementing <tt>it</tt> can be undefined. On the other
+hand, there is no problem in dereferencing <tt>it</tt>. In
+classic STL, it is not possible to express whether <tt>it</tt>
+is valid or not.
+ </li>
+</ol>
+
+<p>
+ Thus again, the iterator concept seems overloaded. Distinguishing
+between find and range types allows fine-grained invalidation guarantees.
+<a href = #invalidation_guarantee_cd">Invalidation guarantees class hierarchy</a>
+shows tags corresponding to different types of invalidation guarantees.
+</p>
+
+<h6 align = "center">
+<a name = "invalidation_guarantee_cd">
+<img src = "invalidation_guarantee_cd.jpg" width = "70%" alt = "no image">
+</h6>
+</a>
+<h6 align = "center">
+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 find-type iterator, a found pointer, or a found reference, remains valid as long as the container object is not modified.
+ </li>
+ <li> <a href = "find_invalidation_guarantee.html"><tt>find_invalidation_guarantee</tt></a> corresponds to a guarantee that a find-type iterator, a found pointer, or a found reference, remains valid even if the containter 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 containter object is modified.
+ </li>
+</ol>
+
+
+<p>
+ To find the invalidation guarantee of a container, one can use
+</p>
+<pre>
+<b>typename</b> <a href = "ds_traits.html">ds_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>
+
+
+
+</body>
+
+</html>
diff --git a/libstdc++-v3/docs/html/ext/pb_assoc/ds_tag_cd.jpg b/libstdc++-v3/docs/html/ext/pb_assoc/ds_tag_cd.jpg
new file mode 100644
index 00000000000..0526f8649fc
--- /dev/null
+++ b/libstdc++-v3/docs/html/ext/pb_assoc/ds_tag_cd.jpg
Binary files differ
diff --git a/libstdc++-v3/docs/html/ext/pb_assoc/ds_traits.html b/libstdc++-v3/docs/html/ext/pb_assoc/ds_traits.html
new file mode 100644
index 00000000000..c646af2f883
--- /dev/null
+++ b/libstdc++-v3/docs/html/ext/pb_assoc/ds_traits.html
@@ -0,0 +1,41 @@
+
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
+
+
+<html>
+<head>
+<title>ds_traits Interface
+</title>
+
+</head>
+
+<body>
+<h1>
+<tt>ds_traits
+</tt>
+
+ Interface
+
+
+</h1>
+
+<p>Signifies a basic invalidation guarantee that any iterator, pointer, or reference to a container object's mapped value type is valid as long as the container is not modified.
+</p>
+
+<ol>
+<li>
+<a href = "../../../../include/ext/pb_assoc/ds_trait.hpp"><tt>ds_trait.hpp</tt>
+</a>
+
+</li>
+
+</ol>
+
+
+
+
+</body>
+
+</html>
+
+
diff --git a/libstdc++-v3/docs/html/ext/pb_assoc/embedded_lists_1.jpg b/libstdc++-v3/docs/html/ext/pb_assoc/embedded_lists_1.jpg
new file mode 100644
index 00000000000..0d6569ad566
--- /dev/null
+++ b/libstdc++-v3/docs/html/ext/pb_assoc/embedded_lists_1.jpg
Binary files differ
diff --git a/libstdc++-v3/docs/html/ext/pb_assoc/embedded_lists_2.jpg b/libstdc++-v3/docs/html/ext/pb_assoc/embedded_lists_2.jpg
new file mode 100644
index 00000000000..d6e4aa10a91
--- /dev/null
+++ b/libstdc++-v3/docs/html/ext/pb_assoc/embedded_lists_2.jpg
Binary files differ
diff --git a/libstdc++-v3/docs/html/ext/pb_assoc/examples.html b/libstdc++-v3/docs/html/ext/pb_assoc/examples.html
new file mode 100644
index 00000000000..af20aad5072
--- /dev/null
+++ b/libstdc++-v3/docs/html/ext/pb_assoc/examples.html
@@ -0,0 +1,185 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
+<html>
+<head>
+<title>Examples</title>
+<meta name="GENERATOR" content="Microsoft Visual Studio .NET 7.1">
+<meta name="vs_targetSchema" content="http://schemas.microsoft.com/intellisense/ie5">
+</head>
+<body bgcolor = "white">
+<h1>Examples</h1>
+
+<ol>
+ <li><a href = "#basic_usage">Basic use</a></li>
+ <li><a href = "#generics">Generics</a></li>
+ <li><a href = "#hash_based">Hash-Based Containers</a></li>
+ <li><a href = "#tree_based">Tree-Based Containers</a></li>
+</ol>
+
+<h2><a name = "basic_usage">Basic Use</a></h2>
+
+<ol>
+ <li><a href = "../../../../testsuite/ext/pb_assoc/example/basic_map.cc"><tt>basic_map.cc</tt></a>- Basic use of &quot;maps&quot;.</li>
+ <li><a href = "../../../../testsuite/ext/pb_assoc/example/basic_set.cc"><tt>basic_set.cc</tt></a>- Basic use of &quot;sets&quot;.
+See
+<a href = "ms_gen.html#ds_policy">Mapping Semantics::Data Types as a Policy</a>.
+ </li>
+ <li><a href = "../../../../testsuite/ext/pb_assoc/example/basic_multimap.cc"><tt>basic_multimap.cc</tt></a>- Basic use of &quot;multimaps&quot;.
+See
+ <a href = "ms_gen.html#ds_policy">Mapping Semantics::Data Types as a Policy</a>.
+ </li>
+ <li><a href = "../../../../testsuite/ext/pb_assoc/example/erase_if.cc"><tt>erase_if.cc</tt></a>- Conditionally
+erasing values from a container object.
+See
+<a href = "motivation.html#methods">Motivation::Choice of Methods</a>.
+ </li>
+</ol>
+
+
+
+<h2><a name = "generics">Generics</a></h2>
+
+<ol>
+ <li><a href = "../../../../testsuite/ext/pb_assoc/example/ds_traits.cc"><tt>ds_traits.cc</tt></a>-
+Using
+<a href = "ds_traits.html"><tt>ds_traits</tt></a> to query about underlying
+data-structure behaviour.
+See
+<a href = "ds_gen.html#ds_traits">Data-Structure Genericity::Data-Structure Tags and Traits</a>.
+ </li>
+ <li> <a href = "../../../../testsuite/ext/pb_assoc/example/mapping_level.cc"><tt>mapping_level.cc</tt></a>-
+Rebinding a compound associative-container to different mapping levels.
+See
+<a href = "ms_gen.html#mapping_level">Mapping-Semantics::Mapping Levels</a>.
+ </li>
+ <li> <a href = "../../../../testsuite/ext/pb_assoc/example/ms_traits.cpp"><tt>ms_traits.cpp</tt></a>-
+Using <a href = "ms_traits.html"><tt>ms_traits</tt></a>
+to query about mapping semantics.
+See
+<a href = "ms_gen.html#ms_traits">Mapping-Semantics::Tags and Traits</a>.
+ </li>
+ <li><a href = "../../../../testsuite/ext/pb_assoc/example/cc_ht_extract_key.cc"><tt>cc_ht_extract_key.cc</tt></a>-
+ Extracting the key from different types.
+ </li>
+</ol>
+
+
+<h2><a name = "hash_based">Hash-Based Containers</a></h2>
+
+<p>
+ See
+<a href = "hash_based_containers.html">Hash-Based Containers</a>.
+</p>
+
+<h3>General</h3>
+
+<ol>
+ <li>
+ <a href = "../../../../testsuite/ext/pb_assoc/example/hash_bad_find.cc"><tt>hash_bad_find.cc</tt></a>-
+ A non-compiling example showing wrong use of finding keys in hash-based
+ containers.
+ See
+ <a href = "ds_gen.html#find_range">Data-Structure Genericity::Find-Type and Range-Type Methods and Iterators</a>.
+ </li>
+</ol>
+
+
+<h3>Resize-Related</h3>
+
+<p>See
+ <a href = "../../../../testsuite/ext/pb_assoc/example/hash_based_containers.html#resize_policies">Hash-Based Containers::Resize Policies</a>.
+</p>
+
+<ol>
+ <li>
+ <a href = "../../../../testsuite/ext/pb_assoc/example/hash_initial_size.cc"><tt>hash_initial_size.cc</tt></a>-
+ Setting the initial size of a hash-based container object.
+ </li>
+ <li>
+ <a href = "../../../../testsuite/ext/pb_assoc/example/hash_bad_resize.cc"><tt>hash_bad_resize.cc</tt></a>-
+ A non-compiling example showing how not to resize a hash-based container object.
+ </li>
+ <li>
+ <a href = "../../../../testsuite/ext/pb_assoc/example/hash_resize.cc"><tt>hash_resize.cc</tt></a>-
+ Resizing the size of a hash-based container object.
+ </li>
+ <li><a href = "../../../../testsuite/ext/pb_assoc/example/hash_illegal_resize.cc"><tt>hash_illegal_resize.cc</tt></a>-
+ Showing an illegal resize of a hash-based container object.
+ </li>
+ <li>
+ <a href = "../../../../testsuite/ext/pb_assoc/example/hash_load_set_change.cc"><tt>hash_load_set_change.cc</tt></a>-
+ Changing the load factors of a hash-based container object.
+ </li>
+</ol>
+
+
+<h3>Hash-Related</h3>
+
+<p>See
+ <a href = "../../../../testsuite/ext/pb_assoc/example/hash_based_containers.html#hash_policies">Hash-Based Containers::Hash Policies</a>.
+</p>
+
+<ol>
+ <li>
+ <a href = "../../../../testsuite/ext/pb_assoc/example/hash_mod.cc"><tt>hash_mod.cc</tt></a>-
+Using a modulo range-hashing function.
+ </li>
+ <li>
+ <a href = "../../../../testsuite/ext/pb_assoc/example/store_hash.cc"><tt>store_hash.cc</tt></a>-
+ Storing the hash value along with each key.
+ </li>
+ <li>
+ <a href = "../../../../testsuite/ext/pb_assoc/example/shift_mask.cc"><tt>shift_mask.cc</tt></a>-
+ Writing a range-hashing functor.
+ </li>
+ <li><a href = "../../../../testsuite/ext/pb_assoc/example/ranged_hash.cc"><tt>ranged_hash.cc</tt></a>-
+ Writing
+ a ranged-hash functor.</li>
+</ol>
+
+
+
+
+
+<h2><a name = "tree_based">Tree-Based Containers</a></h2>
+
+<p>
+ See
+<a href = "tree_based_containers.html">Tree-Based Containers</a>.
+</p>
+
+<h3>Node-Invariatns</h3>
+
+<p>
+ See
+<a href = "tree_based_containers.html#invariants">Tree-Based Containers::Node Invariants</a>.
+</p>
+
+<ol>
+ <li><a href="../../../../testsuite/ext/pb_assoc/example/tree_order_statistics.cc"><tt>tree_order_statistics.cc</tt></a>-
+Using trees for order statistics.
+ </li>
+ <li><a href="../../../../testsuite/ext/pb_assoc/example/tree_intervals.cc"><tt>tree_intervals.cc</tt></a>- Augmenting an
+<a href = "ov_tree_set.html"><tt>ov_tree_set</tt></a>
+to support operations on line intervals.
+ </li>
+</ol>
+
+<h3>Split and Join</h3>
+
+<p>
+ See
+<a href = "tree_based_containers.html#add_methods">Tree-Based Containers::Additional Types and Methods</a>.
+</p>
+
+<ol>
+ <li><a href="../../../../testsuite/ext/pb_assoc/example/tree_join.cc"><tt>tree_join.cc</tt></a>- Joining
+two tree-based container objects.
+ </li>
+ <li><a href="../../../../testsuite/ext/pb_assoc/example/tree_split.cc"><tt>tree_split.cc</tt></a>- Splitting
+a tree-based container object.
+ </li>
+ <li><a href="../../../../testsuite/ext/pb_assoc/example/tree_order_statistics_join.cc"><tt>tree_order_statistics_join.cc</tt></a>- Order statistics while joining two tree-based container objects.
+</ol>
+
+</body>
+</html>
diff --git a/libstdc++-v3/docs/html/ext/pb_assoc/exception_guarantees_specifics.html b/libstdc++-v3/docs/html/ext/pb_assoc/exception_guarantees_specifics.html
new file mode 100644
index 00000000000..48f12bcfbfd
--- /dev/null
+++ b/libstdc++-v3/docs/html/ext/pb_assoc/exception_guarantees_specifics.html
@@ -0,0 +1,31 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
+
+<html>
+<head>
+ <title>Exception Guarantee Specifics</title>
+</head>
+<body bgcolor = "white">
+<h1>Exception Guarantee Specifics</h1>
+The following represent exception guaratee specifics, subject to the <a href="component_requirements.html#exception_requirements">component exception-requirements</a>.
+<ol>
+ <li> <a name="basic_guarantee">No</a> resources are leaked in the face of exceptions. In particular, this means:
+ <ol>
+ <li>By the time a container's destructor completes:
+ <ol>
+ <li>It has returned all memory it has allocated to the appropriate deallocation function.</li>
+ <li>The destructor has been called for all objects constructed by the container.</li>
+ </ol>
+ <li>Algorithms destroy all temporary objects and deallocate all temporary memory even if the algorithm does not complete due to an exception.</li>
+ <li>Algorithms which construct objects either complete successfully or destroy any objects they have constructed at the time of the exception.</li>
+ <li>Algorithms which destruct objects always succeed.</li>
+ <li>Containers continue to fulfill all of their requirements, even after an exception occurs during a mutating function. For example, they will never give an inaccurate report of its size, or fail to meet performance requirements because of some thrown exception.</li>
+ </ol>
+ </li>
+ <li> <a name="strong_guarantee">The</a> <i>strong guarantee</i>: If an operation on a container fails due to an exception, then, semantically, the operation is a no-op applied to the container.</li>
+ <li> <a name="cannot_throw_guarantee">The</a> operation cannot throw an exception.</li>
+</ol>
+(The phrasing of the above is based on <a href="references.html#abrahams97exception">[abrahams97exception]</a>.)
+
+
+</body>
+</html>
diff --git a/libstdc++-v3/docs/html/ext/pb_assoc/find_invalidation_guarantee.html b/libstdc++-v3/docs/html/ext/pb_assoc/find_invalidation_guarantee.html
new file mode 100644
index 00000000000..38d94470bac
--- /dev/null
+++ b/libstdc++-v3/docs/html/ext/pb_assoc/find_invalidation_guarantee.html
@@ -0,0 +1,74 @@
+
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
+
+
+<html>
+<head>
+<title>find_invalidation_guarantee Interface
+</title>
+
+</head>
+
+<body>
+<h1>
+<tt>find_invalidation_guarantee
+</tt>
+
+ Interface
+
+
+</h1>
+
+<p>Signifies an invalidation guarantee that includes all those of its base, and additionally, that any find-type iterator, pointer, or reference to a container object's mapped value type is valid as long as its corresponding entry has not be erased, regardless of modifications to the container object.
+</p>
+
+<ol>
+<li>
+<a href = "../../../../include/ext/pb_assoc/ds_trait.hpp"><tt>ds_trait.hpp</tt>
+</a>
+
+</li>
+
+<li>
+<a href = "#link1">Base classes.
+</a>
+
+</li>
+
+</ol>
+
+
+<h2>
+<a name = "link1">Base classes.
+</a>
+
+</h2>
+
+<table WIDTH = "100%" BORDER = "1">
+<TR><TD Width = "80%" ALIGN = "left"><b>Class</b></TD><TD Width = "20%" ALIGN = "left"><b>Derivation Type</b></TD></TR>
+
+
+<tr>
+<td>
+<pre><a href = "basic_invalidation_guarantee.html"><tt>basic_invalidation_guarantee</tt></a></pre>
+
+
+</td>
+
+<td>
+<p>public</p>
+
+
+</td>
+
+</tr>
+
+</table>
+
+
+
+</body>
+
+</html>
+
+
diff --git a/libstdc++-v3/docs/html/ext/pb_assoc/find_iterators_cd.jpg b/libstdc++-v3/docs/html/ext/pb_assoc/find_iterators_cd.jpg
new file mode 100644
index 00000000000..5b0e80dedea
--- /dev/null
+++ b/libstdc++-v3/docs/html/ext/pb_assoc/find_iterators_cd.jpg
Binary files differ
diff --git a/libstdc++-v3/docs/html/ext/pb_assoc/find_iterators_range_ops_1.jpg b/libstdc++-v3/docs/html/ext/pb_assoc/find_iterators_range_ops_1.jpg
new file mode 100644
index 00000000000..6cc788fc4fd
--- /dev/null
+++ b/libstdc++-v3/docs/html/ext/pb_assoc/find_iterators_range_ops_1.jpg
Binary files differ
diff --git a/libstdc++-v3/docs/html/ext/pb_assoc/find_iterators_range_ops_2.jpg b/libstdc++-v3/docs/html/ext/pb_assoc/find_iterators_range_ops_2.jpg
new file mode 100644
index 00000000000..5e567e42cb3
--- /dev/null
+++ b/libstdc++-v3/docs/html/ext/pb_assoc/find_iterators_range_ops_2.jpg
Binary files differ
diff --git a/libstdc++-v3/docs/html/ext/pb_assoc/generics.html b/libstdc++-v3/docs/html/ext/pb_assoc/generics.html
new file mode 100644
index 00000000000..5b7f2fb7fc1
--- /dev/null
+++ b/libstdc++-v3/docs/html/ext/pb_assoc/generics.html
@@ -0,0 +1,25 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
+<html>
+<head>
+<title>Generics</title>
+<meta name="GENERATOR" content="Microsoft Visual Studio .NET 7.1">
+<meta name="vs_targetSchema" content="http://schemas.microsoft.com/intellisense/ie5">
+</head>
+<body bgcolor = "white">
+<h1>Generics</h1>
+
+<p>
+ Naturally, the ability to program generically different associative containers, is beneficial.
+The distinction in this library between <a href = "data_type_defs.html">data_type</a>s and
+<a href = "mapped_data_type_defs.html">mapped_data_type</a>s, and between <a href = "value_type_defs.html">value_type</a>s and
+<a href = "mapped_value_type_defs.html">mapped_value_type</a>s, somewhat complicates this.
+</p>
+
+<p>
+ The generic utility classes ease static detection of different associative-container
+types (<i>e.g.</i>, whether they are map or multimap types), and the extraction of data from iterators.
+</p>
+
+
+</body>
+</html>
diff --git a/libstdc++-v3/docs/html/ext/pb_assoc/gp_hash_assoc_cntnr.html b/libstdc++-v3/docs/html/ext/pb_assoc/gp_hash_assoc_cntnr.html
new file mode 100644
index 00000000000..3451380f5ca
--- /dev/null
+++ b/libstdc++-v3/docs/html/ext/pb_assoc/gp_hash_assoc_cntnr.html
@@ -0,0 +1,816 @@
+
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
+
+
+<html>
+<head>
+<title>gp_hash_assoc_cntnr Interface
+</title>
+
+</head>
+
+<body>
+<h1>
+<tt>gp_hash_assoc_cntnr
+</tt>
+
+ Interface
+
+
+</h1>
+
+<p>A general-probing hash-based associative container.
+</p>
+
+<ol>
+<li>
+<a href = "../../../../include/ext/pb_assoc/assoc_cntnr.hpp"><tt>assoc_cntnr.hpp</tt>
+</a>
+
+</li>
+
+<li>
+<a href = "#link1">Template parameters.
+</a>
+
+</li>
+
+<li>
+<a href = "#link2">Base classes.
+</a>
+
+</li>
+
+<li>
+Public Types and Constants:
+
+
+<ol>
+<li>
+<a href = "#link3">Policy definitions.
+</a>
+
+</li>
+
+</ol>
+
+</li>
+
+<li>
+Public Methods:
+
+
+<ol>
+<li>
+<a href = "#link4">Constructors, destructor, and related.
+</a>
+
+</li>
+
+<li>
+<a href = "#link5">Policy access methods.
+</a>
+
+</li>
+
+</ol>
+
+</li>
+
+</ol>
+
+
+<h2>
+<a name = "link1">Template parameters.
+</a>
+
+</h2>
+
+<table WIDTH = "100%" BORDER = "1">
+<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 = "Key3735928856">Key</a></pre>
+
+
+</td>
+
+<td>
+<p>Key type.</p>
+
+
+</td>
+
+<td>
+-
+
+
+</td>
+
+</tr>
+
+<tr>
+<td>
+<pre><a name = "Data3735928937">Data</a></pre>
+
+
+</td>
+
+<td>
+<p>Data type.</p>
+
+
+</td>
+
+<td>
+-
+
+
+</td>
+
+</tr>
+
+<tr>
+<td>
+<pre><a name = "Hash_Fn3735929222">Hash_Fn</a></pre>
+
+
+</td>
+
+<td>
+<p>Hash functor.</p>
+
+
+</td>
+
+<td>
+<pre>__gnu_cxx::hash&lt;<a href = "#Key3735928856">Key</a>&gt;</pre>if using gcc;<pre>stdext::hash_value&lt;<a href = "#Key3735928856">Key</a>&gt;</pre>if using Visual C++ .net
+
+
+</td>
+
+</tr>
+
+<tr>
+<td>
+<pre><a name = "Eq_Fn3735929016">Eq_Fn</a></pre>
+
+
+</td>
+
+<td>
+<p>Equivalence functor.</p>
+
+
+</td>
+
+<td>
+<pre>std::equal_to&lt;<a href = "#Key3735928856">Key</a>&gt;</pre>
+
+
+</td>
+
+</tr>
+
+<tr>
+<td>
+<pre><a name = "Comb_Probe_Fn3735929818">Comb_Probe_Fn</a></pre>
+
+
+</td>
+
+<td>
+<p>Combining probe functor.</p>
+
+
+<p>If <a href = "#Hash_Fn3735929222">Hash_Fn</a> is <a href = "null_hash_fn.html"><tt>null_hash_fn</tt></a>, and <a href = "#Probe_Fn3735929338">Probe_Fn</a> is <a href = "comb_probe_fn.html"><tt>comb_probe_fn</tt></a>, then this is the <a href = "concepts.html#concepts_hash_fns">ranged_hash function</a> functor; otherwise, this is the <a href = "concepts.html#concepts_hash_fns">range_hashing function</a> functor;</p>
+
+
+</td>
+
+<td>
+<pre><a href = "direct_mask_range_hashing.html">direct_mask_range_hashing</a>&lt;
+ <a href = "#Allocator3735929488">Allocator</a>&gt;</pre>
+
+
+</td>
+
+</tr>
+
+<tr>
+<td>
+<pre><a name = "Probe_Fn3735929338">Probe_Fn</a></pre>
+
+
+</td>
+
+<td>
+<p>Probe functor.</p>
+
+
+</td>
+
+<td>
+If <tt><a href = "#comb_hash_fn3735929798">comb_hash_fn</a></tt> is <tt><a href = "direct_mask_range_hashing.html">direct_mask_range_hashing&lt;&gt;</a></tt>, then <pre><a href = "linear_probe_fn.html">linear_probe_fn</a>&lt;
+ <b>typename</b> <a href = "#comb_hash_fn3735929798">comb_hash_fn</a>::size_type&gt;</pre>otherwise, <pre><a href = "quadratic_probe_fn.html">quadratic_probe_fn</a>&lt;
+ <b>typename</b> <a href = "#comb_hash_fn3735929798">comb_hash_fn</a>::size_type&gt;</pre>
+
+
+</td>
+
+</tr>
+
+<tr>
+<td>
+<pre><a name = "Resize_Policy3735929904">Resize_Policy</a></pre>
+
+
+</td>
+
+<td>
+<p>Resize policy.</p>
+
+
+</td>
+
+<td>
+If <tt><a href = "#comb_hash_fn3735929798">comb_hash_fn</a></tt> is <tt><a href = "direct_mask_range_hashing.html">direct_mask_range_hashing&lt;&gt;</a></tt>, then <pre><a href = "hash_standard_resize_policy.html">hash_standard_resize_policy</a>&lt;
+ <a href = "hash_exponential_size_policy.html">hash_exponential_size_policy</a>&lt;
+ <b>typename</b> <a href = "#comb_hash_fn3735929798">comb_hash_fn</a>::size_type&gt;,
+ <a href = "hash_load_check_resize_trigger.html">hash_load_check_resize_trigger</a>&lt;
+ <b>typename</b> <a href = "#comb_hash_fn3735929798">comb_hash_fn</a>::size_type&gt;,
+ <b>false</b>,
+ <b>typename</b> <a href = "#comb_hash_fn3735929798">comb_hash_fn</a>::size_type&gt;</pre>otherwise, <pre><a href = "hash_standard_resize_policy.html">hash_standard_resize_policy</a>&lt;
+ <a href = "hash_exponential_size_policy.html"><tt>hash_prime_size_policy</tt></a>&lt;
+ <b>typename</b> <a href = "#comb_hash_fn3735929798">comb_hash_fn</a>::size_type&gt;,
+ <a href = "hash_load_check_resize_trigger.html"><tt>hash_load_check_resize_trigger</tt></a>&lt;
+ <b>typename</b> <a href = "#comb_hash_fn3735929798">comb_hash_fn</a>::size_type&gt;,
+ <b>false</b>,
+ <b>typename</b> <a href = "#comb_hash_fn3735929798">comb_hash_fn</a>::size_type&gt;</pre>
+
+
+</td>
+
+</tr>
+
+<tr>
+<td>
+<pre><a name = "Store_Hash3735929567">Store_Hash</a></pre>
+
+
+</td>
+
+<td>
+<p>Indicates whether the hash value will be stored along with each key.</p>
+
+
+<p>If <tt><a href = "#hash_fn3735929286">hash_fn</a></tt> is <tt><a href = "null_hash_fn.html">null_hash_fn</a></tt>, then the container will not compile if this value is <tt><b>true</b></tt></p>
+
+
+</td>
+
+<td>
+<pre><tt><b>false</b></tt></pre>
+
+
+</td>
+
+</tr>
+
+<tr>
+<td>
+<pre><a name = "Allocator3735929488">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">Base classes.
+</a>
+
+</h2>
+
+<table WIDTH = "100%" BORDER = "1">
+<TR><TD Width = "80%" ALIGN = "left"><b>Class</b></TD><TD Width = "20%" ALIGN = "left"><b>Derivation Type</b></TD></TR>
+
+
+<tr>
+<td>
+<pre><a href = "#Comb_Probe_Fn3735929818">Comb_Probe_Fn</a></pre>
+
+
+</td>
+
+<td>
+<p>public</p>
+
+
+</td>
+
+</tr>
+
+<tr>
+<td>
+<pre><a href = "#Probe_Fn3735929338">Probe_Fn</a></pre>
+
+
+</td>
+
+<td>
+<p>public</p>
+
+
+</td>
+
+</tr>
+
+<tr>
+<td>
+<pre><a href = "basic_hash_assoc_cntnr.html"<tt>basic_hash_assoc_cntnr</tt></a></pre>
+
+
+</td>
+
+<td>
+<p>public</p>
+
+
+</td>
+
+</tr>
+
+</table>
+
+<h2>
+<a name = "link3">Policy definitions.
+</a>
+
+</h2>
+
+<table WIDTH = "100%" BORDER = "1">
+<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 = "comb_probe_fn3735929914">comb_probe_fn</a></pre>
+
+
+</td>
+
+<td>
+<pre><a href = "#Comb_Probe_Fn3735929818">Comb_Probe_Fn</a></pre>
+
+
+</td>
+
+<td>
+<p>Combining probe functor type.</p>
+
+
+</td>
+
+</tr>
+
+<tr>
+<td>
+<pre><a name = "probe_fn3735929402">probe_fn</a></pre>
+
+
+</td>
+
+<td>
+<pre><a href = "#Probe_Fn3735929338">Probe_Fn</a></pre>
+
+
+</td>
+
+<td>
+<p>Probe functor type.</p>
+
+
+</td>
+
+</tr>
+
+</table>
+
+<h2>
+<a name = "link4">Constructors, destructor, and related.
+</a>
+
+</h2>
+
+<table WIDTH = "100%" BORDER = "1">
+<TR><TD Width = "45%" ALIGN = "left"><b>Method</b></TD><TD Width = "55%" ALIGN = "left"><b>Description</b></TD></TR>
+
+
+<tr>
+<td>
+<pre> gp_hash_assoc_cntnr
+ ()</pre>
+
+
+</td>
+
+<td>
+<p>Default constructor.</p>
+
+
+</td>
+
+</tr>
+
+<tr>
+<td>
+<pre> gp_hash_assoc_cntnr
+ (<b>const</b> <a href = "#Hash_Fn3735929222">Hash_Fn</a> &amp;r_hash_fn)</pre>
+
+
+</td>
+
+<td>
+<p>Constructor taking some policy objects. <font color = "#666666"><tt>r_hash_fn</tt></font> will be copied by the <a href = "#Hash_Fn3735929222"><tt>Hash_Fn</tt></a> object of the container object.</p>
+
+
+</td>
+
+</tr>
+
+<tr>
+<td>
+<pre> gp_hash_assoc_cntnr
+ (<b>const</b> <a href = "#Hash_Fn3735929222">Hash_Fn</a> &amp;r_hash_fn,
+ <b>const</b> <a href = "#Eq_Fn3735929016">Eq_Fn</a> &amp;r_eq_fn)</pre>
+
+
+</td>
+
+<td>
+<p>Constructor taking some policy objects. <font color = "#666666"><tt>r_hash_fn</tt></font> will be copied by the <a href = "#Hash_Fn3735929222"><tt>Hash_Fn</tt></a> object of the container object, and <font color = "#666666"><tt>r_eq_fn</tt></font> will be copied by the <a href = "#Eq_Fn3735929016"><tt>Eq_Fn</tt></a> object of the container object.</p>
+
+
+</td>
+
+</tr>
+
+<tr>
+<td>
+<pre> gp_hash_assoc_cntnr
+ (<b>const</b> <a href = "#Hash_Fn3735929222">Hash_Fn</a> &amp;r_hash_fn,
+ <b>const</b> <a href = "#Eq_Fn3735929016">Eq_Fn</a> &amp;r_eq_fn,
+ <b>const</b> <a href = "#Comb_Probe_Fn3735929818">Comb_Probe_Fn</a> &amp;r_comb_probe_fn)</pre>
+
+
+</td>
+
+<td>
+<p>Constructor taking some policy objects. <font color = "#666666"><tt>r_hash_fn</tt></font> will be copied by the <a href = "#Hash_Fn3735929222"><tt>Hash_Fn</tt></a> object of the container object, <font color = "#666666"><tt>r_eq_fn</tt></font> will be copied by the <a href = "#Eq_Fn3735929016"><tt>Eq_Fn</tt></a> object of the container object, and <font color = "#666666"><tt>r_comb_probe_fn</tt></font> will be copied by the <a href = "#Comb_Probe_Fn3735929818"><tt>Comb_Probe_Fn</tt></a> object of the container object.</p>
+
+
+</td>
+
+</tr>
+
+<tr>
+<td>
+<pre> gp_hash_assoc_cntnr
+ (<b>const</b> <a href = "#Hash_Fn3735929222">Hash_Fn</a> &amp;r_hash_fn,
+ <b>const</b> <a href = "#Eq_Fn3735929016">Eq_Fn</a> &amp;r_eq_fn,
+ <b>const</b> <a href = "#Comb_Probe_Fn3735929818">Comb_Probe_Fn</a> &amp;r_comb_probe_fn,
+ <b>const</b> <a href = "#Probe_Fn3735929338">Probe_Fn</a> &amp;r_probe_fn)</pre>
+
+
+</td>
+
+<td>
+<p>Constructor taking some policy objects. <font color = "#666666"><tt>r_hash_fn</tt></font> will be copied by the <a href = "#Hash_Fn3735929222"><tt>Hash_Fn</tt></a> object of the container object, <font color = "#666666"><tt>r_eq_fn</tt></font> will be copied by the <a href = "#Eq_Fn3735929016"><tt>Eq_Fn</tt></a> object of the container object, <font color = "#666666"><tt>r_comb_probe_fn</tt></font> will be copied by the <a href = "#Comb_Probe_Fn3735929818"><tt>Comb_Probe_Fn</tt></a> object of the container object, and <font color = "#666666"><tt>r_probe_fn</tt></font> will be copied by the <a href = "#Probe_Fn3735929338"><tt>Probe_Fn</tt></a> object of the container object.</p>
+
+
+</td>
+
+</tr>
+
+<tr>
+<td>
+<pre> gp_hash_assoc_cntnr
+ (<b>const</b> <a href = "#Hash_Fn3735929222">Hash_Fn</a> &amp;r_hash_fn,
+ <b>const</b> <a href = "#Eq_Fn3735929016">Eq_Fn</a> &amp;r_eq_fn,
+ <b>const</b> <a href = "#Comb_Probe_Fn3735929818">Comb_Probe_Fn</a> &amp;r_comb_probe_fn,
+ <b>const</b> <a href = "#Probe_Fn3735929338">Probe_Fn</a> &amp;r_probe_fn,
+ <b>const</b> <a href = "#Resize_Policy3735929904">Resize_Policy</a> &amp;r_resize_policy)</pre>
+
+
+</td>
+
+<td>
+<p>Constructor taking some policy objects. <font color = "#666666"><tt>r_hash_fn</tt></font> will be copied by the <a href = "#Hash_Fn3735929222"><tt>Hash_Fn</tt></a> object of the container object, <font color = "#666666"><tt>r_eq_fn</tt></font> will be copied by the <a href = "#Eq_Fn3735929016"><tt>Eq_Fn</tt></a> object of the container object, <font color = "#666666"><tt>r_comb_probe_fn</tt></font> will be copied by the <a href = "#Comb_Probe_Fn3735929818"><tt>Comb_Probe_Fn</tt></a> object of the container object, <font color = "#666666"><tt>r_probe_fn</tt></font> will be copied by the <a href = "#Probe_Fn3735929338"><tt>Probe_Fn</tt></a> object of the container object, and <font color = "#666666"><tt>r_resize_policy</tt></font> will be copied by the <a href = "#Resize_Policy3735929904"><tt>Resize_Policy</tt></a> object of the container object.</p>
+
+
+</td>
+
+</tr>
+
+<tr>
+<td>
+<pre><b>template</b>&lt;
+ <b>class</b> It&gt;
+ gp_hash_assoc_cntnr
+ (It first_it,
+ It last_it)</pre>
+
+
+</td>
+
+<td>
+<p>Constructor taking iterators to a range of value_types. The value_types between <font color = "#666666"><tt>first_it</tt></font> and <font color = "#666666"><tt>last_it</tt></font> will be inserted into the container object.</p>
+
+
+</td>
+
+</tr>
+
+<tr>
+<td>
+<pre><b>template</b>&lt;
+ <b>class</b> It&gt;
+ gp_hash_assoc_cntnr
+ (It first_it,
+ It last_it,
+ <b>const</b> <a href = "#Hash_Fn3735929222">Hash_Fn</a> &amp;r_hash_fn)</pre>
+
+
+</td>
+
+<td>
+<p>Constructor taking iterators to a range of value_types and some policy objects. The value_types between <font color = "#666666"><tt>first_it</tt></font> and <font color = "#666666"><tt>last_it</tt></font> will be inserted into the container object. <font color = "#666666"><tt>r_hash_fn</tt></font> will be copied by the <a href = "#Hash_Fn3735929222"><tt>Hash_Fn</tt></a> object of the container object.</p>
+
+
+</td>
+
+</tr>
+
+<tr>
+<td>
+<pre><b>template</b>&lt;
+ <b>class</b> It&gt;
+ gp_hash_assoc_cntnr
+ (It first_it,
+ It last_it,
+ <b>const</b> <a href = "#Hash_Fn3735929222">Hash_Fn</a> &amp;r_hash_fn,
+ <b>const</b> <a href = "#Eq_Fn3735929016">Eq_Fn</a> &amp;r_eq_fn)</pre>
+
+
+</td>
+
+<td>
+<p>Constructor taking iterators to a range of value_types and some policy objects. The value_types between <font color = "#666666"><tt>first_it</tt></font> and <font color = "#666666"><tt>last_it</tt></font> will be inserted into the container object. <font color = "#666666"><tt>r_hash_fn</tt></font> will be copied by the <a href = "#Hash_Fn3735929222"><tt>Hash_Fn</tt></a> object of the container object, and <font color = "#666666"><tt>r_eq_fn</tt></font> will be copied by the <a href = "#Eq_Fn3735929016"><tt>Eq_Fn</tt></a> object of the container object.</p>
+
+
+</td>
+
+</tr>
+
+<tr>
+<td>
+<pre><b>template</b>&lt;
+ <b>class</b> It&gt;
+ gp_hash_assoc_cntnr
+ (It first_it,
+ It last_it,
+ <b>const</b> <a href = "#Hash_Fn3735929222">Hash_Fn</a> &amp;r_hash_fn,
+ <b>const</b> <a href = "#Eq_Fn3735929016">Eq_Fn</a> &amp;r_eq_fn,
+ <b>const</b> <a href = "#Comb_Probe_Fn3735929818">Comb_Probe_Fn</a> &amp;r_comb_probe_fn)</pre>
+
+
+</td>
+
+<td>
+<p>Constructor taking iterators to a range of value_types and some policy objects. The value_types between <font color = "#666666"><tt>first_it</tt></font> and <font color = "#666666"><tt>last_it</tt></font> will be inserted into the container object. <font color = "#666666"><tt>r_hash_fn</tt></font> will be copied by the <a href = "#Hash_Fn3735929222"><tt>Hash_Fn</tt></a> object of the container object, <font color = "#666666"><tt>r_eq_fn</tt></font> will be copied by the <a href = "#Eq_Fn3735929016"><tt>Eq_Fn</tt></a> object of the container object, and <font color = "#666666"><tt>r_comb_probe_fn</tt></font> will be copied by the <a href = "#Comb_Probe_Fn3735929818"><tt>Comb_Probe_Fn</tt></a> object of the container object.</p>
+
+
+</td>
+
+</tr>
+
+<tr>
+<td>
+<pre><b>template</b>&lt;
+ <b>class</b> It&gt;
+ gp_hash_assoc_cntnr
+ (It first_it,
+ It last_it,
+ <b>const</b> <a href = "#Hash_Fn3735929222">Hash_Fn</a> &amp;r_hash_fn,
+ <b>const</b> <a href = "#Eq_Fn3735929016">Eq_Fn</a> &amp;r_eq_fn,
+ <b>const</b> <a href = "#Comb_Probe_Fn3735929818">Comb_Probe_Fn</a> &amp;r_comb_probe_fn,
+ <b>const</b> <a href = "#Probe_Fn3735929338">Probe_Fn</a> &amp;r_probe_fn)</pre>
+
+
+</td>
+
+<td>
+<p>Constructor taking iterators to a range of value_types and some policy objects. The value_types between <font color = "#666666"><tt>first_it</tt></font> and <font color = "#666666"><tt>last_it</tt></font> will be inserted into the container object. <font color = "#666666"><tt>r_hash_fn</tt></font> will be copied by the <a href = "#Hash_Fn3735929222"><tt>Hash_Fn</tt></a> object of the container object, <font color = "#666666"><tt>r_eq_fn</tt></font> will be copied by the <a href = "#Eq_Fn3735929016"><tt>Eq_Fn</tt></a> object of the container object, <font color = "#666666"><tt>r_comb_probe_fn</tt></font> will be copied by the <a href = "#Comb_Probe_Fn3735929818"><tt>Comb_Probe_Fn</tt></a> object of the container object, and <font color = "#666666"><tt>r_probe_fn</tt></font> will be copied by the <a href = "#Probe_Fn3735929338"><tt>Probe_Fn</tt></a> object of the container object.</p>
+
+
+</td>
+
+</tr>
+
+<tr>
+<td>
+<pre><b>template</b>&lt;
+ <b>class</b> It&gt;
+ gp_hash_assoc_cntnr
+ (It first_it,
+ It last_it,
+ <b>const</b> <a href = "#Hash_Fn3735929222">Hash_Fn</a> &amp;r_hash_fn,
+ <b>const</b> <a href = "#Eq_Fn3735929016">Eq_Fn</a> &amp;r_eq_fn,
+ <b>const</b> <a href = "#Comb_Probe_Fn3735929818">Comb_Probe_Fn</a> &amp;r_comb_probe_fn,
+ <b>const</b> <a href = "#Probe_Fn3735929338">Probe_Fn</a> &amp;r_probe_fn,
+ <b>const</b> <a href = "#Resize_Policy3735929904">Resize_Policy</a> &amp;r_resize_policy)</pre>
+
+
+</td>
+
+<td>
+<p>Constructor taking iterators to a range of value_types and some policy objects. The value_types between <font color = "#666666"><tt>first_it</tt></font> and <font color = "#666666"><tt>last_it</tt></font> will be inserted into the container object. <font color = "#666666"><tt>r_hash_fn</tt></font> will be copied by the <a href = "#Hash_Fn3735929222"><tt>Hash_Fn</tt></a> object of the container object, <font color = "#666666"><tt>r_eq_fn</tt></font> will be copied by the <a href = "#Eq_Fn3735929016"><tt>Eq_Fn</tt></a> object of the container object, <font color = "#666666"><tt>r_comb_probe_fn</tt></font> will be copied by the <a href = "#Comb_Probe_Fn3735929818"><tt>Comb_Probe_Fn</tt></a> object of the container object, <font color = "#666666"><tt>r_probe_fn</tt></font> will be copied by the <a href = "#Probe_Fn3735929338"><tt>Probe_Fn</tt></a> object of the container object, and <font color = "#666666"><tt>r_resize_policy</tt></font> will be copied by the <a href = "#Resize_Policy3735929904"><tt>Resize_Policy</tt></a> object of the container object.</p>
+
+
+</td>
+
+</tr>
+
+<tr>
+<td>
+<pre> gp_hash_assoc_cntnr
+ (<b>const</b> <font color = "olive">gp_hash_assoc_cntnr</font> &amp;r_other)</pre>
+
+
+</td>
+
+<td>
+<p>Copy constructor.</p>
+
+
+</td>
+
+</tr>
+
+<tr>
+<td>
+<pre><b>virtual</b>
+ ~gp_hash_assoc_cntnr
+ ()</pre>
+
+
+</td>
+
+<td>
+<p>Destructor.</p>
+
+
+</td>
+
+</tr>
+
+<tr>
+<td>
+<pre><font color = "olive">gp_hash_assoc_cntnr</font> &amp;
+ <b>operator</b>=
+ (<b>const</b> <font color = "olive">gp_hash_assoc_cntnr</font> &amp;r_other)</pre>
+
+
+</td>
+
+<td>
+<p>Assignment operator.</p>
+
+
+</td>
+
+</tr>
+
+<tr>
+<td>
+<pre><b>void</b>
+ swap
+ (<font color = "olive">gp_hash_assoc_cntnr</font> &amp;r_other)</pre>
+
+
+</td>
+
+<td>
+<p>Swaps content.</p>
+
+
+</td>
+
+</tr>
+
+</table>
+
+<h2>
+<a name = "link5">Policy access methods.
+</a>
+
+</h2>
+
+<table WIDTH = "100%" BORDER = "1">
+<TR><TD Width = "45%" ALIGN = "left"><b>Method</b></TD><TD Width = "55%" ALIGN = "left"><b>Description</b></TD></TR>
+
+
+<tr>
+<td>
+<pre><a href = "#comb_probe_fn3735929914">comb_probe_fn</a> &amp;
+ get_comb_probe_fn
+ ()</pre>
+
+
+</td>
+
+<td>
+<p>Access to the <a href = "#comb_probe_fn3735929914"><tt>comb_probe_fn</tt></a> object.</p>
+
+
+</td>
+
+</tr>
+
+<tr>
+<td>
+<pre><b>const</b> <a href = "#comb_probe_fn3735929914">comb_probe_fn</a> &amp;
+ get_comb_probe_fn
+ () <b>const</b></pre>
+
+
+</td>
+
+<td>
+<p>Const access to the <a href = "#comb_probe_fn3735929914"><tt>comb_probe_fn</tt></a> object.</p>
+
+
+</td>
+
+</tr>
+
+<tr>
+<td>
+<pre><a href = "#probe_fn3735929402">probe_fn</a> &amp;
+ get_probe_fn
+ ()</pre>
+
+
+</td>
+
+<td>
+<p>Access to the <a href = "#probe_fn3735929402"><tt>probe_fn</tt></a> object.</p>
+
+
+</td>
+
+</tr>
+
+<tr>
+<td>
+<pre><b>const</b> <a href = "#probe_fn3735929402">probe_fn</a> &amp;
+ get_probe_fn
+ () <b>const</b></pre>
+
+
+</td>
+
+<td>
+<p>Const access to the <a href = "#probe_fn3735929402"><tt>probe_fn</tt></a> object.</p>
+
+
+</td>
+
+</tr>
+
+</table>
+
+
+
+</body>
+
+</html>
+
+
diff --git a/libstdc++-v3/docs/html/ext/pb_assoc/gp_hash_ds_tag.html b/libstdc++-v3/docs/html/ext/pb_assoc/gp_hash_ds_tag.html
new file mode 100644
index 00000000000..247a193d1ae
--- /dev/null
+++ b/libstdc++-v3/docs/html/ext/pb_assoc/gp_hash_ds_tag.html
@@ -0,0 +1,74 @@
+
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
+
+
+<html>
+<head>
+<title>gp_hash_ds_tag Interface
+</title>
+
+</head>
+
+<body>
+<h1>
+<tt>gp_hash_ds_tag
+</tt>
+
+ Interface
+
+
+</h1>
+
+<p>General-probing hash data-structure tag.
+</p>
+
+<ol>
+<li>
+<a href = "../../../../include/ext/pb_assoc/ds_trait.hpp"><tt>ds_trait.hpp</tt>
+</a>
+
+</li>
+
+<li>
+<a href = "#link1">Base classes.
+</a>
+
+</li>
+
+</ol>
+
+
+<h2>
+<a name = "link1">Base classes.
+</a>
+
+</h2>
+
+<table WIDTH = "100%" BORDER = "1">
+<TR><TD Width = "80%" ALIGN = "left"><b>Class</b></TD><TD Width = "20%" ALIGN = "left"><b>Derivation Type</b></TD></TR>
+
+
+<tr>
+<td>
+<pre><a href = "basic_hash_ds_tag.html"><tt>basic_hash_ds_tag</tt></a></pre>
+
+
+</td>
+
+<td>
+<p>public</p>
+
+
+</td>
+
+</tr>
+
+</table>
+
+
+
+</body>
+
+</html>
+
+
diff --git a/libstdc++-v3/docs/html/ext/pb_assoc/gp_hash_policy_cd.jpg b/libstdc++-v3/docs/html/ext/pb_assoc/gp_hash_policy_cd.jpg
new file mode 100644
index 00000000000..395349fae8d
--- /dev/null
+++ b/libstdc++-v3/docs/html/ext/pb_assoc/gp_hash_policy_cd.jpg
Binary files differ
diff --git a/libstdc++-v3/docs/html/ext/pb_assoc/hash_and_probe_general.html b/libstdc++-v3/docs/html/ext/pb_assoc/hash_and_probe_general.html
new file mode 100644
index 00000000000..c4b4833872d
--- /dev/null
+++ b/libstdc++-v3/docs/html/ext/pb_assoc/hash_and_probe_general.html
@@ -0,0 +1,45 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
+<html>
+<head>
+<title>Hash and Probe Policies</title>
+<meta name="GENERATOR" content="Microsoft Visual Studio .NET 7.1">
+<meta name="vs_targetSchema" content="http://schemas.microsoft.com/intellisense/ie5">
+</head>
+<body bgcolor = "white">
+<h1>Hash and Probe Policies</h1>
+
+
+<p>
+ As mentioned in
+<a href = "hash_policies.html">Hash Policies</a>,
+some of the containers require a ranged-hash function policy for
+mapping key types into a non-negative integral type in a range.
+<i>E.g.</i>, collision-based containers
+(<a href = "cc_ht_map_interface.html"><tt>cc_ht_map</tt></a>,
+<a href = "cc_ht_set_interface.html"><tt>cc_ht_set</tt></a>,
+<a href = "cc_ht_multimap_interface.html"><tt>cc_ht_multimap</tt></a>,
+and
+<a href = "cc_ht_multiset_interface.html"><tt>cc_ht_multiset</tt></a>),
+require a ranged-hash function.
+</p>
+
+<p>
+ Similarly, some hash tables
+need a ranged-probe function policy for mapping
+key types into a sequence of non-negative integral types in a range.
+<i>E.g.</i>, probing-based containers
+(<a href = "gp_ht_map_interface.html"><tt>gp_ht_map</tt></a>,
+<a href = "gp_ht_set_interface.html"><tt>gp_ht_set</tt></a>,
+<a href = "gp_ht_multimap_interface.html"><tt>gp_ht_multimap</tt></a>,
+and
+<a href = "gp_ht_multiset_interface.html"><tt>gp_ht_multiset</tt></a>),
+require a ranged-hash function.
+</p>
+
+<p>
+ <a href = "interface.html#policy_classes">Policy Classes</a>
+contains classes for creating ranged-hash and ranged-probe function policies.
+</p>
+
+</body>
+</html>
diff --git a/libstdc++-v3/docs/html/ext/pb_assoc/hash_based_containers.html b/libstdc++-v3/docs/html/ext/pb_assoc/hash_based_containers.html
new file mode 100644
index 00000000000..9fea0e6d168
--- /dev/null
+++ b/libstdc++-v3/docs/html/ext/pb_assoc/hash_based_containers.html
@@ -0,0 +1,1056 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
+<html>
+ <head>
+ <title>Hash-Based Containers</title>
+ <meta name="GENERATOR" content="Microsoft Visual Studio .NET 7.1">
+ <meta name="vs_targetSchema" content="http://schemas.microsoft.com/intellisense/ie5">
+ </head>
+
+<body bgcolor = "white">
+
+<h1>Hash-Based Containers</h1>
+
+<p>
+ This section describes hash-based containers. It is organized
+as follows.
+</p>
+
+<ol>
+ <li>
+ <a href = "#overview">Overview</a> is an overview.
+ </li>
+ <li>
+ <a href = "#hash_policies">Hash Policies</a> discusses
+ hash policies.
+ </li>
+ <li>
+ <a href = "#resize_policies">Resize Policies</a> discusses
+ resize policies.
+ </li>
+ <li>
+ <a href = "#policy_interaction">Policy Interaction</a> discusses
+ interaction between policies.
+ </li>
+</ol>
+
+
+
+<h2><a name = "overview">Overview</a></h2>
+
+
+<p>
+ Figure
+<a href = "#hash_cd">Hash-based containers</a>
+ shows the container-hierarchy; the hash-based containers are circled.
+<a href = "cc_hash_assoc_cntnr.html"><tt>cc_hash_assoc_cntnr</tt></a>
+is a collision-chaining hash-based container;
+<a href = "gp_hash_assoc_cntnr.html"><tt>gp_hash_assoc_cntnr</tt></a>
+is a (general) probing hash-based container.
+</p>
+
+<h6 align = "center">
+<a name = "hash_cd">
+<img src = "hash_cd.jpg" width = "70%" alt = "no image">
+</h6>
+<h6 align = "center">
+</a>
+Hash-based containers.
+</h6>
+
+<p>
+ The collision-chaining hash-based container has the following declaration.
+</p>
+<pre>
+<b>template</b>&lt;
+ <b>typename</b> Key,
+ <b>typename</b> Data,
+ <b>class</b> Hash_Fn = std::hash&lt;Key&gt;,
+ <b>class</b> Eq_Fn = std::equal_to&lt;Key&gt;,
+ <b>class</b> Comb_Hash_Fn =
+ <a href = "direct_mask_range_hashing.html">direct_mask_range_hashing</a>&lt;&gt;
+ <b>class</b> Resize_Policy = <i>default explained below.</i>
+ <b>bool</b> Store_Hash = <b>false</b>,
+ <b>class</b> Allocator =
+ std::allocator&lt;<b>char</b>&gt; &gt;
+<b>class</b> <a href = "cc_hash_assoc_cntnr.html">cc_hash_assoc_cntnr</a>;
+</pre>
+
+<p>
+ The parameters have the following meaning:
+</p>
+<ol>
+ <li> <tt>Key</tt> is the key type.
+ </li>
+ <li> <tt>Data</tt> is the data-policy, and is explained in
+<a href = "ms_gen.html#ds_policy">Mapping-Semantics Genericity::Data Types as a Policy</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 name = "#hash_policies">Hash Policies</a>.</li>
+ </li>
+ <li> <tt>Resize_Policy</tt> describes how a container object should
+change its internal size. This is described in
+<a name = #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 name = "#policy_interaction">Policy Interaction</a>.</li>
+ <li> <tt>Allocator</tt> is (surprisingly) 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> Data,
+ <b>class</b> Hash_Fn =
+ std::hash&lt;
+ Key&gt;,
+ <b>class</b> Eq_Fn =
+ std::equal_to&lt;
+ Key&gt;,
+ <b>class</b> Comb_Probe_Fn =
+ <a href = "direct_mask_range_hashing.html">direct_mask_range_hashing</a>&lt;&gt;
+ <b>class</b> Probe_Fn = <i>default explained below.</i>
+ <b>class</b> Resize_Policy = <i>default explained below.</i>
+ <b>bool</b> Store_Hash = <b>false</b>,
+ <b>class</b> Allocator =
+ std::allocator&lt;<b>char</b>&gt; &gt;
+<b>class</b> <a href = "gp_hash_assoc_cntnr.html">gp_hash_assoc_cntnr</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 name = "#policy_interaction">Policy Interaction</a>.
+</p>
+
+<h2><a name = "hash_policies">Hash Policies</h2></a>
+<p>
+ This subsection describes hash policies. It is organized as follows:
+</p>
+<ol>
+ <li> <a href = "#general_terms">General Terms</a> describes
+ some general terms.
+ </li>
+ <li> <a href = "#range_hashing_fns">Range-Hashing Functions</a>
+ describes range-hasing functions.</li>
+ <li> <a href = "#hash_policies_ranged_hash_policies">Ranged-Hash Functions</a>
+ describes ranged-hash functions. </li>
+ <li> <a href = "#pb_assoc_imp">Implementation in <tt>pb_assoc</tt></a>
+ describes the implementation of these concepts in <tt>pb_assoc</tt>.
+ </li>
+</ol>
+
+
+<h3><a name="general_terms">General Terms</a></h3>
+
+<p>
+ There
+are actually three functions involved in transforming a key into a hash-table's
+position (see Figure
+<a href = "#hash_ranged_hash_range_hashing_fns">
+Hash runctions, ranged-hash functions, and range-hashing functions
+</a>):
+</p>
+<ol>
+ <li>
+ A <i>ranged-hash</i> function, which maps keys into an interval of the
+ non-negative integrals. This is the function actually required by the
+ hash-table algorithm.
+ </li>
+ <li>
+ A hash function, which maps keys into non-negative integral types. This is
+ typically specified by the writer of the key class.
+ </li>
+ <li>
+ A <i>range-hashing</i> function, which maps non-negative integral types into an
+ interval of non-negative integral types.
+ </li>
+</ol>
+
+<h6 align = "center">
+<a name = "hash_ranged_hash_range_hashing_fns">
+<img src = "hash_ranged_hash_range_hashing_fns.jpg" width = "70%" alt = "no image">
+</h6>
+<h6 align = "center">
+</a>
+Hash runctions, 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>
+ <i>g : Z<sub>+</sub> &times; Z<sub>+</sub> &rarr; Z<sub>+</sub>, </i>
+</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="eqn: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 poisitions</i>
+within a table, <i>e.g.</i>, in a probing table.
+</p>
+<p>
+ 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 acheived 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">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="eqn: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="eqn:division_method_prime_mod">g(r, m) = r % m </a></i>(3) ,
+</p>
+<p>
+ and
+</p>
+<p>
+ <a name="eqn:division_method_bit_mask">
+ <i>g(r, m) = r &amp; m - 1, ( m = 2<sup>k</sup>
+ </i>
+ for some<i> k) </i></a>(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 bitwise 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">Ranged-Hash Functions</a></h3>
+
+<p>
+ In some less frequent 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>
+ <i>s = [ s<sub>0</sub>,..., s<sub>t - 1</sub>] </i>
+</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="eqn: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="eqn: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</sub></sub><sup>r<sub>0</sub> + k - 1</sup>
+ s<sub>i</sub> a<sup>i</sup> </i>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</sub></sub>
+ a<sup>r<sub>i</sub></sup> </i>mod <i>m </i>,
+</p>
+<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>
+
+
+<h3><a name="pb_assoc_imp">Implementation in <tt>pb_assoc</tt></a></h3>
+
+<p>
+<a href = "cc_hash_assoc_cntnr.html"><tt>cc_hash_assoc_cntnr</tt></a> is
+parameterized by <tt>Hash_Fn</tt> and <tt>Comb_Hash_Fn</tt>, a hash functor
+and a combining hash functor, respectively.
+</p>
+
+<p>
+ For any hash functor except <a href = "null_hash_fn.html"><tt>null_hash_fn</tt></a>,
+one of the
+<a href = "concepts.html#concepts_null_policies">Concepts::Null Policy Classes</a>,
+then <tt>Comb_Hash_Fn</tt> is considered a range-hashing functor.
+The container will synthesize a ranged-hash functor from both. For example, Figure
+<a href = "#hash_range_hashing_seq_diagram">
+Insert hash sequence diagram
+</a>
+shows an <tt>insert</tt> sequence diagram. 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 align = "center">
+<a name = "hash_range_hashing_seq_diagram">
+<img src = "hash_range_hashing_seq_diagram.jpg" width = "70%" alt = "no image">
+</a>
+</h6>
+<h6 align = "center">
+Insert hash sequence diagram.
+</h6>
+
+
+<p>
+ <tt>pb_assoc</tt> contains the following range-hashing policies:
+</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>
+</ol>
+
+
+<p>
+ If <tt>Comb_Hash_Fn</tt> is instantiated by
+<a href = "null_hash_fn.html"><tt>null_hash_fn</tt></a>,
+and a combining-hash functor, the container treats
+the combining hash functor as a ranged-hash function. For example, Figure
+<a href = "#hash_range_hashing_seq_diagram2">
+Insert hash sequence diagram with a null combination 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 align = "center">
+<a name = "hash_range_hashing_seq_diagram2">
+<img src = "hash_range_hashing_seq_diagram2.jpg" width = "70%" alt = "no image">
+</a>
+</h6>
+<h6 align = "center">
+Insert hash sequence diagram with a null combination policy.
+</h6>
+
+<p>
+ Similarly,
+<a href = "gp_hash_assoc_cntnr.html"></a><tt>gp_hash_assoc_cntnr</tt>
+is parameterized 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>
+
+<p>
+ <tt>pb_assoc</tt> contains the following probe policies:
+</p>
+
+<ol>
+ <li>
+<a href = "linear_probe_fn.html"><tt>linear_probe_fn</tt></a> is a linear probe
+function.
+ </li>
+ <li>
+<a href = "quadratic_probe_fn.html"><tt>quadratic_probe_fn</tt></a> is
+a quadratic probe function.
+ </li>
+</ol>
+
+
+
+
+
+
+
+
+
+<h2><a name = "resize_policies">Resize Policies</a></h2>
+
+<p>
+ This subsection describes resize policies. It is organized as follows:
+</p>
+
+<ol>
+ <li> <a href = "#general">General Terms</a> describes general
+ terms.
+ </li>
+ <li> <a href = "#size_policies">Size Policies</a> describes size
+ policies.
+ </li>
+ <li> <a href = "#trigger_policies">Trigger Policies</a> describes trigger
+ policies.
+ </li> <li> <a href = "#imp_pb_assoc">Implementation in <tt>pb_assoc</tt></a>
+ describes the implementation of these concepts in <tt>pb_assoc</tt>.
+ </li>
+</ol>
+
+
+<h3><a name = "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.
+</p>
+
+<p>
+ In general, resize policies can be decomposed into (probably 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">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 the <a href = "hash_policies.html#hash_policies_range_hashing_policies">Range-Hashing Policies</a> subsection),
+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 the <a href = "hash_policies.html#hash_policies_range_hashing_policies">Range-Hashing Policies</a> subsection),
+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">Trigger Policies</a></h3>
+
+<p>
+ Trigger policies determine when a hash table changes size.
+Following is a description of two polcies: <i>load-check</i>
+policies, and a 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 = "eqn: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 shortest
+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 align = "center">
+<a name = "balls_and_bins">
+<img src = "balls_and_bins.jpg" width = "70%" alt = "no image">
+</a>
+</h6>
+<h6 align = "center">
+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 = "eqn:prob_of_p1">
+ <i>p<sub>1</sub>
+ = </i>(3)
+ </a>
+ </p>
+ <p>
+ <i>
+ <b>P</b>(l<sub>1</sub> &ge; k)
+ =
+ </i>
+ </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>
+ <a name = "eqn: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>
+ <i>
+ <b>P</b>
+ (
+ &sum; <sub>i = 1</sub><sup>m</sup>
+ <b>I</b>(l<sub>i</sub> &ge; k) &ge; 1
+ )
+ =
+ </i>
+ </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>
+ <i>
+ e
+ ^
+ (
+ (
+ -
+ m p<sub>1</sub>
+ (
+ 1 / (m p<sub>1</sub>) - 1
+ )
+ <sup>2</sup>
+ )
+ /
+ 2
+ )
+ ,
+ </i>
+ </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_assoc">Implementation in <tt>pb_assoc</tt></a></h3>
+
+<p>
+ The resize policies in the previous subsection are conceptually straightforward. The design
+of hash-based containers' size-related interface is complicated by some factors.
+</p>
+<ol>
+ <li> Most containers, <i>i.e.</i> lists, trees, and vectors, have a single "size" concept. There is no
+distinction between the number of entries the container holds and the number of entries it is using. This,
+of course, is not the case for hash-based containers. Moreover, even describing the
+"actual" size of a hash-based container (as opposed to its logical size) is difficult - a probing-based container
+holds entries to elements, even those it does not use, while a chaining-based container holds pointers to entries.
+ </li>
+ <li>
+ The policies mentioned above operate in terms of invariants. <i>E.g.</i> a load-check trigger policy
+maintains an invariant concerning the load factor of a container object. This is sometimes too rigid:
+ <ol>
+ <li>In some cases it is desirable to allow controlled override of an entire policy, <i>e.g.</i> by externally resizing a container object (or giving it an initial size, which is a special case of externally resizing the container).
+ </li>
+ <li>
+ In other cases it is desirable to allow changing the specifics of a policy in runtime, <i>e.g.</i>, changing the load factors of a load-check policy.
+ </li>
+ </ol>
+ </li>
+ <li>
+ Resize policies interact strongly with hash policies. Performance-wise, for example, it is undesirable to use an exponential size policy of powers of two with a modulo range-hashing function, and it is undesirable to use a prime size policy with a mask range-hashing function. In other cases, the effects are more dramatic. For example, using a quadratic probe function with an exponential size policy will probably cause cases where the container object has available entries which are never reached by the probe function. (<a href = "hash_policies.html">Hash Policies</a>
+discusses the previous concepts.)
+ </li>
+</ol>
+
+<p>
+ Clearly, the more of these points an interface addresses, the greater its flexibility but the lower its encapsulation and uniformity between associative containers.
+</p>
+
+
+
+<p>
+ This library attempts to address these types of problems by delegating all size-related functionality to
+policy classes. Hash-based containers
+are parameterized by a resize-policy class (among others), and derive publicly from
+the resize-policy class
+[<a href = "references.html#alexandrescu01modern">alexandrescu01modern</a>]
+ <i>E.g.</i>, a collision-chaining
+hash table is defined as follows:
+</p>
+<pre>
+cc_ht_map&lt;
+ <b>class</b> Key,
+ <b>class</b> Data,
+ ...
+ <b>class</b> Resize_Policy
+ ...&gt; :
+ <b>public</b> Resize_Policy
+</pre>
+
+<p>
+ The containers themselves lack any functionality or public interface for manipulating sizes. A container
+object merely forwards events to its resize policy object and queries it for needed actions.
+</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 align = "center">
+<a name = "insert_resize_sequence_diagram1">
+<img src = "insert_resize_sequence_diagram1.jpg" width = "70%" alt = "no image">
+</a>
+</h6>
+<h6 align = "center">
+Insert resize sequence diagram.
+</h6>
+
+<p>
+ This addresses, to some extent, the problems mentioned above:
+</p>
+<ol>
+ <li>
+ Different instantiations of range-hashing policies can be met with different instantiations of
+ resize policies.
+ </li>
+ <li>
+ Questions on size-related interface are avoided, since the containers have no size-related methods. Thus
+ a container has no method for querying its actual size. It merely continuously forwards enough information to
+ its resize policy to answer such queries; the designer of the resize policy can decide whether, or how, to design the appropriate method. Also, a container has no methods for setting its size. It merely queries its
+resize policy for an initial size, queries it on a new size (if the resize policy indicates a resize is needed), and
+supports a <tt><b>protected virtual</b></tt> function for external resize.
+ </li>
+</ol>
+
+<p>
+ The library contains a single class for instantiating a resize policy,
+<tt>pb_assoc</tt> contains
+a standard resize policy,
+<a href = "ht_standard_resize_policy.html"><tt>ht_standard_resize_policy</tt></a> (the name is explained shortly).
+In terms of interface, it is parameterized by a boolean constant indicating whether its public interface supports
+queries of actual size and external resize operations (the inclusion and exclusion of these methods in the interface have obvious tradeoffs in terms of encapsulation and flexibility).
+([<a href = "references.html#alexandrescu01modern">alexandrescu01modern</a>] shows many techniques for
+changing between alternative interfaces at compile time.)
+</p>
+
+<p>
+As noted before,
+ size and trigger policies are usually orthogonal.
+<a href = "ht_standard_resize_policy.html"><tt>ht_standard_resize_policy</tt></a>
+is parameterized by size and trigger policies. For example,
+a collision-chaining hash table
+is typically be defined as follows:
+</p>
+<pre>
+cc_ht_map&lt;
+ key,
+ data,
+ ...
+ ht_standard_resize_policy&lt;
+ some_trigger_policy,
+ some_size_policy,
+ ...&gt; &gt;
+</pre>
+
+<p>
+ The sole function of
+<a href = "ht_standard_resize_policy.html"><tt>ht_standard_resize_policy</tt></a>
+ is to
+act as a standard delegator
+[<a href = "references.html#gamma95designpatterns">gamma95designpatterns</a>] for these
+policies.
+
+<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 align = "center">
+<a name = "insert_resize_sequence_diagram2">
+<img src = "insert_resize_sequence_diagram2.jpg" width = "70%" alt = "no image">
+</a>
+</h6>
+<h6 align = "center">
+Standard resize policy trigger sequence diagram.
+</h6>
+
+<h6 align = "center">
+<a name = "insert_resize_sequence_diagram3">
+<img src = "insert_resize_sequence_diagram3.jpg" width = "70%" alt = "no image">
+</a>
+</h6>
+<h6 align = "center">
+Standard resize policy size sequence diagram.
+</h6>
+
+<p>
+ The library (currently) supports the following instantiations of size
+and trigger policies:
+</p>
+
+<ol>
+ <li>
+ <a href = "ht_load_check_trigger.html"><tt>ht_load_check_trigger</tt></a> implements
+ a load check trigger policy.
+ </li>
+ <li>
+ <a href = "ht_max_collision_check_grow_resize_trigger.html"><tt>ht_max_collision_check_grow_resize_trigger</tt></a>
+ implements a collision check trigger policy.
+ </li>
+ <li>
+<a href = "ht_exponential_size_policy.html"><tt>ht_exponential_size_policy</tt></a> implemens
+an exponential-size policy (which should be used with mask range hashing).
+ </li>
+ <li>
+<a href = "ht_prime_size_policy.html"><tt>ht_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>
+ The trigger policies also support interfaces for changing their specifics which depend on compile time constants.
+</p>
+
+
+<p>
+ Figure
+<a href = "#resize_policy_cd">Resize policy class diagram</a> gives an overall picture
+of the resize-related classes.
+<tt>Container</tt> (which stands for any of the hash-based containers) is parameterized
+by <tt>Resize_Policy</tt>, from which it subclasses publicly
+[<a href = "references.html#alexandrescu01modern">alexandrescu01modern</a>].
+This class is currently instantiated only by
+<a href = "ht_standard_resize_policy.html"><tt>ht_standard_resize_policy</tt></a>.
+<a href = "ht_standard_resize_policy.html"><tt>ht_standard_resize_policy</tt></a> itself
+is parameterized by <tt>Trigger_Policy</tt> and <tt>Size_Policy</tt>.
+Currently, <tt>Trigger_Policy</tt> is instantiated by
+<a href = "ht_load_check_trigger.html"><tt>ht_load_check_trigger</tt></a>,
+or
+<a href = "ht_max_collision_check_grow_resize_trigger.html"><tt>ht_max_collision_check_grow_resize_trigger</tt></a>; <tt>Size_Policy</tt> is instantiated by
+<a href = "ht_exponential_size_policy.html"><tt>ht_exponential_size_policy</tt></a>,
+or
+<a href = "ht_prime_size_policy.html"><tt>ht_prime_size_policy</tt></a>.
+</p>
+
+
+<h6 align = "center">
+<a name = "resize_policy_cd">
+<img src = "resize_policy_cd.jpg" width = "70%" alt = "no image">
+</a>
+</h6>
+<h6 align = "center">
+Resize policy class diagram.
+</h6>
+
+
+
+
+<h2><a name = "#policy_interaction">Policy Interaction</a></h2>
+
+<p>
+ Hash-tables are unfortunately susceptible to choice of policies. One
+of the more complicated aspects of this is that poor combinations of good policies
+can alter performance drastically. Following are some considerations.
+</p>
+
+
+
+
+
+<h3>Range-Hashing Policies and Resize Policies</h3>
+
+<p>
+</p>
+
+
+<h3>Equivalence Functors, Storing Hash Values, and Hash Functions</h3>
+
+
+<p>
+<a href = "cc_hash_assoc_cntnr.html"><tt>cc_hash_assoc_cntnr</tt></a>
+and
+<a href = "gp_hash_assoc_cntnr.html"><tt>gp_hash_assoc_cntnr</tt></a>
+are parameterized by an equivalenc 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_assoc</tt>'s container will fail at compilation, by design, if this is attempted.
+</p>
+
+
+
+</body>
+
+</html>
diff --git a/libstdc++-v3/docs/html/ext/pb_assoc/hash_cd.jpg b/libstdc++-v3/docs/html/ext/pb_assoc/hash_cd.jpg
new file mode 100644
index 00000000000..6c26a177985
--- /dev/null
+++ b/libstdc++-v3/docs/html/ext/pb_assoc/hash_cd.jpg
Binary files differ
diff --git a/libstdc++-v3/docs/html/ext/pb_assoc/hash_exponential_size_policy.html b/libstdc++-v3/docs/html/ext/pb_assoc/hash_exponential_size_policy.html
new file mode 100644
index 00000000000..f0fc5a7624b
--- /dev/null
+++ b/libstdc++-v3/docs/html/ext/pb_assoc/hash_exponential_size_policy.html
@@ -0,0 +1,267 @@
+
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
+
+
+<html>
+<head>
+<title>hash_exponential_size_policy Interface
+</title>
+
+</head>
+
+<body>
+<h1>
+<tt>hash_exponential_size_policy
+</tt>
+
+ Interface
+
+
+</h1>
+
+<p>A size policy whose sequence of sizes form an exponential sequence (typically powers of 2)
+</p>
+
+<ol>
+<li>
+<a href = "../../../../include/ext/pb_assoc/hash_policy.hpp"><tt>hash_policy.hpp</tt>
+</a>
+
+</li>
+
+<li>
+<a href = "#link1">Template parameters.
+</a>
+
+</li>
+
+<li>
+Public Types and Constants:
+
+
+<ol>
+<li>
+<a href = "#link2">General definitions.
+</a>
+
+</li>
+
+</ol>
+
+</li>
+
+<li>
+Public Methods:
+
+
+<ol>
+<li>
+<a href = "#link3">Constructors, destructors, and related methods.
+</a>
+
+</li>
+
+</ol>
+
+</li>
+
+<li>
+Protected Methods:
+
+
+<ol>
+<li>
+<a href = "#link4">Size methods
+</a>
+
+</li>
+
+</ol>
+
+</li>
+
+</ol>
+
+
+<h2>
+<a name = "link1">Template parameters.
+</a>
+
+</h2>
+
+<table WIDTH = "100%" BORDER = "1">
+<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 = "Size_Type3735929483">Size_Type</a></pre>
+
+
+</td>
+
+<td>
+<p>Size type.</p>
+
+
+</td>
+
+<td>
+size_t
+
+
+</td>
+
+</tr>
+
+</table>
+
+<h2>
+<a name = "link2">General definitions.
+</a>
+
+</h2>
+
+<table WIDTH = "100%" BORDER = "1">
+<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_type3735929547">size_type</a></pre>
+
+
+</td>
+
+<td>
+<pre><a href = "#Size_Type3735929483">Size_Type</a></pre>
+
+
+</td>
+
+<td>
+<p>Size type.</p>
+
+
+</td>
+
+</tr>
+
+</table>
+
+<h2>
+<a name = "link3">Constructors, destructors, and related methods.
+</a>
+
+</h2>
+
+<table WIDTH = "100%" BORDER = "1">
+<TR><TD Width = "45%" ALIGN = "left"><b>Method</b></TD><TD Width = "55%" ALIGN = "left"><b>Description</b></TD></TR>
+
+
+<tr>
+<td>
+<pre> hash_exponential_size_policy
+ (<a href = "#size_type3735929547">size_type</a> start_size = 8,
+ <a href = "#size_type3735929547">size_type</a> grow_factor = 2)</pre>
+
+
+</td>
+
+<td>
+<p>Default constructor, or onstructor taking a <font color = "#666666"><tt>start_size</tt></font>, a start size and <font color = "#666666"><tt>grow_factor</tt></font>, a growth factor. The policy will use the sequence of sizes <font color = "#666666"><tt>start_size</tt></font>, <font color = "#666666"><tt>start_size</tt></font> * <font color = "#666666"><tt>grow_factor</tt></font>, <font color = "#666666"><tt>start_size</tt></font> * <font color = "#666666"><tt>grow_factor</tt></font>^2, ...</p>
+
+
+</td>
+
+</tr>
+
+<tr>
+<td>
+<pre><b>void</b>
+ swap
+ (<font color = "olive">hash_exponential_size_policy</font> &amp;r_other)</pre>
+
+
+</td>
+
+<td>
+<p>Swaps content.</p>
+
+
+</td>
+
+</tr>
+
+</table>
+
+<h2>
+<a name = "link4">Size methods
+</a>
+
+</h2>
+
+<table WIDTH = "100%" BORDER = "1">
+<TR><TD Width = "45%" ALIGN = "left"><b>Method</b></TD><TD Width = "55%" ALIGN = "left"><b>Description</b></TD></TR>
+
+
+<tr>
+<td>
+<pre><a href = "#size_type3735929547">size_type</a>
+ get_init_size
+ (<a href = "#size_type3735929547">size_type</a> suggested_size) <b>const</b></pre>
+
+
+</td>
+
+<td>
+<p>Given <font color = "#666666"><tt>suggested_size</tt></font>, a suggested size, returns an initial size of the container related to the initial size.</p>
+
+
+</td>
+
+</tr>
+
+<tr>
+<td>
+<pre><a href = "#size_type3735929547">size_type</a>
+ get_nearest_larger_size
+ (<a href = "#size_type3735929547">size_type</a> cur_size) <b>const</b></pre>
+
+
+</td>
+
+<td>
+<p>Given <font color = "#666666"><tt>cur_size</tt></font>, the current size, returns a size that is larger.</p>
+
+
+</td>
+
+</tr>
+
+<tr>
+<td>
+<pre><a href = "#size_type3735929547">size_type</a>
+ get_nearest_smaller_size
+ (<a href = "#size_type3735929547">size_type</a> cur_size) <b>const</b></pre>
+
+
+</td>
+
+<td>
+<p>Given <font color = "#666666"><tt>cur_size</tt></font>, the current size, returns a size that is smaller.</p>
+
+
+</td>
+
+</tr>
+
+</table>
+
+
+
+</body>
+
+</html>
+
+
diff --git a/libstdc++-v3/docs/html/ext/pb_assoc/hash_fn.html b/libstdc++-v3/docs/html/ext/pb_assoc/hash_fn.html
new file mode 100644
index 00000000000..6ef435b0ab8
--- /dev/null
+++ b/libstdc++-v3/docs/html/ext/pb_assoc/hash_fn.html
@@ -0,0 +1,25 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
+<html>
+<head>
+<title>Hash Functions</title>
+<meta name="GENERATOR" content="Microsoft Visual Studio .NET 7.1">
+<meta name="vs_targetSchema" content="http://schemas.microsoft.com/intellisense/ie5">
+</head>
+<body bgcolor = "white">
+<h1>Hash Functions</h1>
+
+<p>
+A hash function is essentially an <tt>std::unary_operator</tt>. It takes a
+<a href = "key_type_defs.html"><tt>const_key_reference</tt></a>, and returns
+a (non-negative) integral type.
+</p>
+
+<p>
+ A special hash function, <a href = "null_hash_fn.html"><tt>null_hash_fn</tt></a>
+serves to indicate that the <a href = "hash_policies.html">ranged-hash</a> function
+or <a href = "hash_policies.html">ranged-probe</a> function should not be formed by composition.
+</p>
+
+
+</body>
+</html>
diff --git a/libstdc++-v3/docs/html/ext/pb_assoc/hash_load_check_resize_trigger.html b/libstdc++-v3/docs/html/ext/pb_assoc/hash_load_check_resize_trigger.html
new file mode 100644
index 00000000000..6670d696860
--- /dev/null
+++ b/libstdc++-v3/docs/html/ext/pb_assoc/hash_load_check_resize_trigger.html
@@ -0,0 +1,744 @@
+
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
+
+
+<html>
+<head>
+<title>hash_load_check_resize_trigger Interface
+</title>
+
+</head>
+
+<body>
+<h1>
+<tt>hash_load_check_resize_trigger
+</tt>
+
+ Interface
+
+
+</h1>
+
+<p>A resize trigger policy based on a load check. It keeps the load factor between some load factors load_min and load_max.
+</p>
+
+<ol>
+<li>
+<a href = "../../../../include/ext/pb_assoc/hash_policy.hpp"><tt>hash_policy.hpp</tt>
+</a>
+
+</li>
+
+<li>
+<a href = "#link1">Template parameters.
+</a>
+
+</li>
+
+<li>
+Public Types and Constants:
+
+
+<ol>
+<li>
+<a href = "#link2">General definitions.
+</a>
+
+</li>
+
+</ol>
+
+</li>
+
+<li>
+Public Methods:
+
+
+<ol>
+<li>
+<a href = "#link3">Constructors, destructor, and related.
+</a>
+
+</li>
+
+<li>
+<a href = "#link4">Load access methods.
+</a>
+
+</li>
+
+</ol>
+
+</li>
+
+<li>
+Protected Methods:
+
+
+<ol>
+<li>
+<a href = "#link5">Insert search notifications.
+</a>
+
+</li>
+
+<li>
+<a href = "#link6">Find search notifications.
+</a>
+
+</li>
+
+<li>
+<a href = "#link7">Erase search notifications.
+</a>
+
+</li>
+
+<li>
+<a href = "#link8">Content change notifications.
+</a>
+
+</li>
+
+<li>
+<a href = "#link9">Size change notifications.
+</a>
+
+</li>
+
+<li>
+<a href = "#link10">Queries.
+</a>
+
+</li>
+
+</ol>
+
+</li>
+
+</ol>
+
+
+<h2>
+<a name = "link1">Template parameters.
+</a>
+
+</h2>
+
+<table WIDTH = "100%" BORDER = "1">
+<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 = "External_Load_Access3735929540">External_Load_Access</a></pre>
+
+
+</td>
+
+<td>
+<p>Specifies whether the load factor can be accessed externally. The two options have different tradeoffs in terms of flexibility, genericity, and encapsulation.</p>
+
+
+</td>
+
+<td>
+<tt><b>false</b></tt>
+
+
+</td>
+
+</tr>
+
+<tr>
+<td>
+<pre><a name = "Size_Type3735929483">Size_Type</a></pre>
+
+
+</td>
+
+<td>
+<p>Size type.</p>
+
+
+</td>
+
+<td>
+size_t
+
+
+</td>
+
+</tr>
+
+</table>
+
+<h2>
+<a name = "link2">General definitions.
+</a>
+
+</h2>
+
+<table WIDTH = "100%" BORDER = "1">
+<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_type3735929547">size_type</a></pre>
+
+
+</td>
+
+<td>
+<pre><a href = "#Size_Type3735929483">Size_Type</a></pre>
+
+
+</td>
+
+<td>
+<p>Size type.</p>
+
+
+</td>
+
+</tr>
+
+<tr>
+<td>
+<pre><a name = "external_load_access3735929604">external_load_access</a></pre>
+
+
+</td>
+
+<td>
+<pre><a href = "#External_Load_Access3735929540">External_Load_Access</a></pre>
+
+
+</td>
+
+<td>
+<p>Indicates whether loads can be accessed externally</p>
+
+
+</td>
+
+</tr>
+
+</table>
+
+<h2>
+<a name = "link3">Constructors, destructor, and related.
+</a>
+
+</h2>
+
+<table WIDTH = "100%" BORDER = "1">
+<TR><TD Width = "45%" ALIGN = "left"><b>Method</b></TD><TD Width = "55%" ALIGN = "left"><b>Description</b></TD></TR>
+
+
+<tr>
+<td>
+<pre> hash_load_check_resize_trigger
+ (float load_min = 0.125,
+ float load_max = 0.5)</pre>
+
+
+</td>
+
+<td>
+<p>Default constructor, or constructor taking <font color = "#666666"><tt>load_min</tt></font> and <font color = "#666666"><tt>load_max</tt></font> load factors between which this policy will keep the actual load.</p>
+
+
+<p>It is the responsibility of the user to ensure that <font color = "#666666"><tt>load_min</tt></font> is smaller than <font color = "#666666"><tt>load_max</tt></font>.</p>
+
+
+</td>
+
+</tr>
+
+<tr>
+<td>
+<pre><b>void</b>
+ swap
+ (<font color = "olive">hash_load_check_resize_trigger</font> &amp;r_other)</pre>
+
+
+</td>
+
+<td>
+<p>Swaps content.</p>
+
+
+</td>
+
+</tr>
+
+<tr>
+<td>
+<pre> <b>virtual</b>
+ ~hash_load_check_resize_trigger
+ ()</pre>
+
+
+</td>
+
+<td>
+<p>Destructor.</p>
+
+
+</td>
+
+</tr>
+
+</table>
+
+<h2>
+<a name = "link4">Load access methods.
+</a>
+
+</h2>
+
+<p> These methods are only available if the external access parameter is set.</p>
+
+
+<table WIDTH = "100%" BORDER = "1">
+<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> std::pair&lt;float, float&gt;
+ get_loads
+ () <b>const</b></pre>
+
+
+</td>
+
+<td>
+<p>Returns a pair of the minimal and maximal loads, respectively.</p>
+
+
+<p>Calling this method will not compile when <a href = "#External_Load_Access3735929540"><tt>External_Load_Access</tt></a> == <tt><b>false</b></tt>.</p>
+
+
+</td>
+
+</tr>
+
+<tr>
+<td>
+<pre><b>void</b>
+ set_loads
+ (std::pair&lt;float, float&gt; load_pair)</pre>
+
+
+</td>
+
+<td>
+<p>Sets the loads through a pair of the minimal and maximal loads, respectively.</p>
+
+
+<p>Calling this method resizes the container, and might throw an exception. It is the responsibility of the user to pass appropriate loads to this function. Calling this method will not compile when <a href = "#External_Load_Access3735929540"><tt>External_Load_Access</tt></a> == <tt><b>false</b></tt>.</p>
+
+
+</td>
+
+</tr>
+
+</table>
+
+<h2>
+<a name = "link5">Insert search notifications.
+</a>
+
+</h2>
+
+<p>Notifications called during an insert operation.</p>
+
+
+<table WIDTH = "100%" BORDER = "1">
+<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>
+ notify_insert_search_start
+ ()</pre>
+
+
+</td>
+
+<td>
+<p>Notifies a search started.</p>
+
+
+</td>
+
+</tr>
+
+<tr>
+<td>
+<pre><b>inline</b> <b>void</b>
+ notify_insert_search_collision
+ ()</pre>
+
+
+</td>
+
+<td>
+<p>Notifies a search encountered a collision.</p>
+
+
+</td>
+
+</tr>
+
+<tr>
+<td>
+<pre><b>inline</b> <b>void</b>
+ notify_insert_search_end
+ ()</pre>
+
+
+</td>
+
+<td>
+<p>Notifies a search ended.</p>
+
+
+</td>
+
+</tr>
+
+</table>
+
+<h2>
+<a name = "link6">Find search notifications.
+</a>
+
+</h2>
+
+<p>Notifications called during a find operation.</p>
+
+
+<table WIDTH = "100%" BORDER = "1">
+<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>
+ notify_find_search_start
+ ()</pre>
+
+
+</td>
+
+<td>
+<p>Notifies a search started.</p>
+
+
+</td>
+
+</tr>
+
+<tr>
+<td>
+<pre><b>inline</b> <b>void</b>
+ notify_find_search_collision
+ ()</pre>
+
+
+</td>
+
+<td>
+<p>Notifies a search encountered a collision.</p>
+
+
+</td>
+
+</tr>
+
+<tr>
+<td>
+<pre><b>inline</b> <b>void</b>
+ notify_find_search_end
+ ()</pre>
+
+
+</td>
+
+<td>
+<p>Notifies a search ended.</p>
+
+
+</td>
+
+</tr>
+
+</table>
+
+<h2>
+<a name = "link7">Erase search notifications.
+</a>
+
+</h2>
+
+<p>Notifications called during an insert operation.</p>
+
+
+<table WIDTH = "100%" BORDER = "1">
+<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>
+ notify_erase_search_start
+ ()</pre>
+
+
+</td>
+
+<td>
+<p>Notifies a search started.</p>
+
+
+</td>
+
+</tr>
+
+<tr>
+<td>
+<pre><b>inline</b> <b>void</b>
+ notify_erase_search_collision
+ ()</pre>
+
+
+</td>
+
+<td>
+<p>Notifies a search encountered a collision.</p>
+
+
+</td>
+
+</tr>
+
+<tr>
+<td>
+<pre><b>inline</b> <b>void</b>
+ notify_erase_search_end
+ ()</pre>
+
+
+</td>
+
+<td>
+<p>Notifies a search ended.</p>
+
+
+</td>
+
+</tr>
+
+</table>
+
+<h2>
+<a name = "link8">Content change notifications.
+</a>
+
+</h2>
+
+<p>Notifications called when the content of the table changes in a way that can affect the resize policy.</p>
+
+
+<table WIDTH = "100%" BORDER = "1">
+<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>
+ notify_inserted
+ (<a href = "#size_type3735929547">size_type</a> num_entries)</pre>
+
+
+</td>
+
+<td>
+<p>Notifies an element was inserted. the total number of entries in the table is <font color = "#666666"><tt>num_entries</tt></font>.</p>
+
+
+</td>
+
+</tr>
+
+<tr>
+<td>
+<pre><b>inline</b> <b>void</b>
+ notify_erased
+ (<a href = "#size_type3735929547">size_type</a> num_entries)</pre>
+
+
+</td>
+
+<td>
+<p>Notifies an element was erased.</p>
+
+
+</td>
+
+</tr>
+
+<tr>
+<td>
+<pre><b>void</b>
+ notify_cleared
+ ()</pre>
+
+
+</td>
+
+<td>
+<p>Notifies the table was cleared.</p>
+
+
+</td>
+
+</tr>
+
+</table>
+
+<h2>
+<a name = "link9">Size change notifications.
+</a>
+
+</h2>
+
+<p>Notifications called when the table changes size.</p>
+
+
+<table WIDTH = "100%" BORDER = "1">
+<TR><TD Width = "45%" ALIGN = "left"><b>Method</b></TD><TD Width = "55%" ALIGN = "left"><b>Description</b></TD></TR>
+
+
+<tr>
+<td>
+<pre><b>void</b>
+ notify_resized
+ (<a href = "#size_type3735929547">size_type</a> new_size)</pre>
+
+
+</td>
+
+<td>
+<p>Notifies the table was resized as a result of this object's signifying that a resize is needed.</p>
+
+
+</td>
+
+</tr>
+
+<tr>
+<td>
+<pre><b>void</b>
+ notify_externally_resized
+ (<a href = "#size_type3735929547">size_type</a> new_size)</pre>
+
+
+</td>
+
+<td>
+<p>Notifies the table was resized externally.</p>
+
+
+</td>
+
+</tr>
+
+</table>
+
+<h2>
+<a name = "link10">Queries.
+</a>
+
+</h2>
+
+<p>Called to query whether/how to resize.</p>
+
+
+<table WIDTH = "100%" BORDER = "1">
+<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>bool</b>
+ is_resize_needed
+ () <b>const</b></pre>
+
+
+</td>
+
+<td>
+<p>Queries whether a resize is needed.</p>
+
+
+</td>
+
+</tr>
+
+<tr>
+<td>
+<pre><b>inline</b> <b>bool</b>
+ is_grow_needed
+ (<a href = "#size_type3735929547">size_type</a> size,
+ <a href = "#size_type3735929547">size_type</a> num_entries) <b>const</b></pre>
+
+
+</td>
+
+<td>
+<p>Queries whether a grow is needed.</p>
+
+
+<p>This method is called only if this object indicated resize is needed. The actual <font color = "#666666"><tt>size</tt></font> of the table is <font color = "#666666"><tt>size</tt></font>, and the number of entries in it is <font color = "#666666"><tt>num_entries</tt></font>.</p>
+
+
+</td>
+
+</tr>
+
+<tr>
+<td>
+<pre><b>inline</b> <b>bool</b>
+ is_shrink_needed
+ (<a href = "#size_type3735929547">size_type</a> size,
+ <a href = "#size_type3735929547">size_type</a> num_entries) <b>const</b></pre>
+
+
+</td>
+
+<td>
+<p>Queries whether a shrink is needed.</p>
+
+
+<p>This method is called only if this object indicated resize is needed. The actual <font color = "#666666"><tt>size</tt></font> of the table is <font color = "#666666"><tt>size</tt></font>, and the number of entries in it is <font color = "#666666"><tt>num_entries</tt></font>.</p>
+
+
+</td>
+
+</tr>
+
+</table>
+
+
+
+</body>
+
+</html>
+
+
diff --git a/libstdc++-v3/docs/html/ext/pb_assoc/hash_policies.html b/libstdc++-v3/docs/html/ext/pb_assoc/hash_policies.html
new file mode 100644
index 00000000000..c5bc2aadafa
--- /dev/null
+++ b/libstdc++-v3/docs/html/ext/pb_assoc/hash_policies.html
@@ -0,0 +1,375 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
+<html>
+<head>
+ <title>Hash Policies</title>
+ <meta name="GENERATOR" content="Microsoft Visual Studio .NET 7.1">
+ <meta name="vs_targetSchema" content="http://schemas.microsoft.com/intellisense/ie5">
+</head>
+<body bgcolor="white">
+
+<h1>Hash Policies</h1>
+<p>
+ This subsection describes hash policies. It is organized as follows:
+</p>
+<ol>
+ <li> The <a href = "#general_terms">General Terms</a> Section describes
+ some general terms.
+ </li>
+ <li> The <a href = "#range_hashing_fns">Range-Hashing Functions</a> Section
+ describes range-hasing functions.</li>
+ <li> The <a href = "#hash_policies_ranged_hash_policies">Ranged-Hash Functions</a> Section
+ describes ranged-hash functions. </li>
+ <li> The <a href = "#pb_assoc_imp">Implementation in <tt>pb_assoc</tt></a> Section
+ describes the implementation of these concepts in <tt>pb_assoc</tt>.
+ </li>
+</ol>
+
+
+<h2><a name="general_terms">General Terms</a></h2>
+
+<p>
+ There
+are actually three functions involved in transforming a key into a hash-table's
+position (see Figure
+<a href = "#hash_ranged_hash_range_hashing_fns">
+Hash runctions, ranged-hash functions, and range-hashing functions
+</a>):
+</p>
+<ol>
+ <li>
+ A <i>ranged-hash</i> function, which maps keys into an interval of the
+ non-negative integrals. This is the function actually required by the
+ hash-table algorithm.
+ </li>
+ <li>
+ A hash function, which maps keys into non-negative integral types. This is
+ typically specified by the writer of the key class.
+ </li>
+ <li>
+ A <i>range-hashing</i> function, which maps non-negative integral types into an
+ interval of non-negative integral types.
+ </li>
+</ol>
+
+<h6 align = "center">
+<a name = "hash_ranged_hash_range_hashing_fns">
+<img src = "hash_ranged_hash_range_hashing_fns.jpg" width = "40%" alt = "no image">
+</a>
+Hash runctions, 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>
+ <i>g : Z<sub>+</sub> &times; Z<sub>+</sub> &rarr; Z<sub>+</sub>, </i>
+</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="eqn: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).
+</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 poisitions</i>
+within a table, <i>e.g.</i>, in a probing table.
+</p>
+<p>
+ 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 acheived 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>
+
+
+<h2><a name="range_hashing_fns">Range-Hashing Functions</a></h2>
+
+<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="eqn: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="eqn:division_method_prime_mod">g(r, m) = r % m </a></i>(3) ,
+</p>
+<p>
+ and
+</p>
+<p>
+ <a name="eqn:division_method_bit_mask">
+ <i>g(r, m) = r &amp; m - 1, ( m = 2<sup>k</sup>
+ </i>
+ for some<i> k) </i></a>(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 bitwise 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>
+
+
+
+
+<h2><a name="hash_policies_ranged_hash_policies">Ranged-Hash Functions</a></h2>
+
+<p>
+ Although rarer, there are cases where 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 [<a href="references.html#austern98segmented">austern98segmented</a>].
+The values of <i>m</i> can be used in some cases, though, to estimate the
+"general" number of distinct values required.
+</p>
+
+<p>
+ Let
+</p>
+
+<p>
+ <i>s = [ s<sub>0</sub>,..., s<sub>t - 1</sub>] </i>
+</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="eqn: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="eqn: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</sub></sub><sup>r<sub>0</sub> + k - 1</sup>
+ s<sub>i</sub> a<sup>i</sup> </i>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</sub></sub>
+ a<sup>r<sub>i</sub></sup> </i>mod <i>m </i>,
+</p>
+<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>
+
+
+<h2><a name="pb_assoc_imp">Implementation in <tt>pb_assoc</tt></a></h2>
+
+<p>
+ Containers based on collision-chaining hash tables in <tt>pb_assoc</tt>
+are parameterized by the functors <tt>Hash_Fn</tt>, and <tt>Comb_Hash_Fn</tt>.
+</p>
+
+<p>
+ If such a container is instantiated with any hash functor and
+range-hashing functor, the container will synthesize a ranged-hash functor
+automatically. For example, Figure
+<a href = "#hash_range_hashing_seq_diagram">
+Insert hash sequence diagram
+</a>
+shows an <tt>insert</tt> sequence diagram. 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 align = "center">
+<a name = "hash_range_hashing_seq_diagram">
+<img src = "hash_range_hashing_seq_diagram.jpg" width = "50%" alt = "no image">
+</a>
+</h6>
+<h6 align = "center">
+Insert hash sequence diagram.
+</h6>
+
+
+<p>
+ If such a container is instantiated with the
+<a href = "concepts.html#concepts_null_policies">null policy</a>
+hash functor,
+<a href = "null_hash_fn.html"><tt>null_hash_fn</tt></a>,
+and a combining-hash functor, the container treats
+the combining hash functor as a ranged-hash function. For example, Figure
+<a href = "#hash_range_hashing_seq_diagram2">
+Insert hash sequence diagram with a null combination 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 align = "center">
+<a name = "hash_range_hashing_seq_diagram2">
+<img src = "hash_range_hashing_seq_diagram2.jpg" width = "50%" alt = "no image">
+</a>
+</h6>
+<h6 align = "center">
+Insert hash sequence diagram with a null combination policy.
+</h6>
+
+<p>
+ <tt>pb_assoc</tt> contains the following hash-related policies:
+</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 probe
+classes based on linear and quadratic increment, respectively.
+ </li>
+ <li>
+<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>
+are
+<a href = "concepts.html#concepts_null_policies">null policy classes</a> for creating
+ranged-hash and ranged-probe functions directly (<i>i.e.</i>, not through
+composition).
+ </li>
+</ol>
+
+<p>
+ <tt>pb_assoc</tt> does not provide any hash functions (it relies on those
+of the STL).
+</p>
+
+
+</body>
+
+</html>
diff --git a/libstdc++-v3/docs/html/ext/pb_assoc/hash_policy_cd.jpg b/libstdc++-v3/docs/html/ext/pb_assoc/hash_policy_cd.jpg
new file mode 100644
index 00000000000..c5d22903513
--- /dev/null
+++ b/libstdc++-v3/docs/html/ext/pb_assoc/hash_policy_cd.jpg
Binary files differ
diff --git a/libstdc++-v3/docs/html/ext/pb_assoc/hash_prime_size_policy.html b/libstdc++-v3/docs/html/ext/pb_assoc/hash_prime_size_policy.html
new file mode 100644
index 00000000000..5b6d0ac2224
--- /dev/null
+++ b/libstdc++-v3/docs/html/ext/pb_assoc/hash_prime_size_policy.html
@@ -0,0 +1,211 @@
+
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
+
+
+<html>
+<head>
+<title>hash_prime_size_policy Interface
+</title>
+
+</head>
+
+<body>
+<h1>
+<tt>hash_prime_size_policy
+</tt>
+
+ Interface
+
+
+</h1>
+
+<p>A size policy whose sequence of sizes form a nearly-exponential sequence of primes.
+</p>
+
+<ol>
+<li>
+<a href = "../../../../include/ext/pb_assoc/hash_policy.hpp"><tt>hash_policy.hpp</tt>
+</a>
+
+</li>
+
+<li>
+Public Types and Constants:
+
+
+<ol>
+<li>
+<a href = "#link1">General definitions.
+</a>
+
+</li>
+
+</ol>
+
+</li>
+
+<li>
+Public Methods:
+
+
+<ol>
+<li>
+<a href = "#link2">Constructors, destructor, and related.
+</a>
+
+</li>
+
+</ol>
+
+</li>
+
+<li>
+Protected Methods:
+
+
+<ol>
+<li>
+<a href = "#link3">Size methods
+</a>
+
+</li>
+
+</ol>
+
+</li>
+
+</ol>
+
+
+<h2>
+<a name = "link1">General definitions.
+</a>
+
+</h2>
+
+<table WIDTH = "100%" BORDER = "1">
+<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_type3735929547">size_type</a></pre>
+
+
+</td>
+
+<td>
+<pre>size_t</pre>
+
+
+</td>
+
+<td>
+<p>Size type.</p>
+
+
+</td>
+
+</tr>
+
+</table>
+
+<h2>
+<a name = "link2">Constructors, destructor, and related.
+</a>
+
+</h2>
+
+<table WIDTH = "100%" BORDER = "1">
+<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>
+ swap
+ (<font color = "olive">hash_prime_size_policy</font> &amp;r_other)</pre>
+
+
+</td>
+
+<td>
+<p>Swaps content.</p>
+
+
+</td>
+
+</tr>
+
+</table>
+
+<h2>
+<a name = "link3">Size methods
+</a>
+
+</h2>
+
+<table WIDTH = "100%" BORDER = "1">
+<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> <a href = "#size_type3735929547">size_type</a>
+ get_init_size
+ (<a href = "#size_type3735929547">size_type</a> suggested_size) <b>const</b></pre>
+
+
+</td>
+
+<td>
+<p>Given <font color = "#666666"><tt>suggested_size</tt></font>, a suggested size, returns an initial size of the container related to the initial size.</p>
+
+
+</td>
+
+</tr>
+
+<tr>
+<td>
+<pre><b>inline</b> <a href = "#size_type3735929547">size_type</a>
+ get_nearest_larger_size
+ (<a href = "#size_type3735929547">size_type</a> cur_size) <b>const</b></pre>
+
+
+</td>
+
+<td>
+<p>Given <font color = "#666666"><tt>cur_size</tt></font>, the current size, returns a size that is larger.</p>
+
+
+</td>
+
+</tr>
+
+<tr>
+<td>
+<pre><b>inline</b> <a href = "#size_type3735929547">size_type</a>
+ get_nearest_smaller_size
+ (<a href = "#size_type3735929547">size_type</a> cur_size) <b>const</b></pre>
+
+
+</td>
+
+<td>
+<p>Given <font color = "#666666"><tt>cur_size</tt></font>, the current size, returns a size that is smaller.</p>
+
+
+</td>
+
+</tr>
+
+</table>
+
+
+
+</body>
+
+</html>
+
+
diff --git a/libstdc++-v3/docs/html/ext/pb_assoc/hash_range_hashing_seq_diagram.jpg b/libstdc++-v3/docs/html/ext/pb_assoc/hash_range_hashing_seq_diagram.jpg
new file mode 100644
index 00000000000..f675cea6302
--- /dev/null
+++ b/libstdc++-v3/docs/html/ext/pb_assoc/hash_range_hashing_seq_diagram.jpg
Binary files differ
diff --git a/libstdc++-v3/docs/html/ext/pb_assoc/hash_range_hashing_seq_diagram2.jpg b/libstdc++-v3/docs/html/ext/pb_assoc/hash_range_hashing_seq_diagram2.jpg
new file mode 100644
index 00000000000..a292d5aaaa1
--- /dev/null
+++ b/libstdc++-v3/docs/html/ext/pb_assoc/hash_range_hashing_seq_diagram2.jpg
Binary files differ
diff --git a/libstdc++-v3/docs/html/ext/pb_assoc/hash_ranged_hash_range_hashing_fns.jpg b/libstdc++-v3/docs/html/ext/pb_assoc/hash_ranged_hash_range_hashing_fns.jpg
new file mode 100644
index 00000000000..ba5f6cd1c5d
--- /dev/null
+++ b/libstdc++-v3/docs/html/ext/pb_assoc/hash_ranged_hash_range_hashing_fns.jpg
Binary files differ
diff --git a/libstdc++-v3/docs/html/ext/pb_assoc/hash_standard_resize_policy.html b/libstdc++-v3/docs/html/ext/pb_assoc/hash_standard_resize_policy.html
new file mode 100644
index 00000000000..0735dad5304
--- /dev/null
+++ b/libstdc++-v3/docs/html/ext/pb_assoc/hash_standard_resize_policy.html
@@ -0,0 +1,986 @@
+
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
+
+
+<html>
+<head>
+<title>hash_standard_resize_policy Interface
+</title>
+
+</head>
+
+<body>
+<h1>
+<tt>hash_standard_resize_policy
+</tt>
+
+ Interface
+
+
+</h1>
+
+<p>A resize policy which delegates operations to size and trigger policies.
+</p>
+
+<ol>
+<li>
+<a href = "../../../../include/ext/pb_assoc/hash_policy.hpp"><tt>hash_policy.hpp</tt>
+</a>
+
+</li>
+
+<li>
+<a href = "#link1">Template parameters.
+</a>
+
+</li>
+
+<li>
+<a href = "#link2">Base classes.
+</a>
+
+</li>
+
+<li>
+Public Types and Constants:
+
+
+<ol>
+<li>
+<a href = "#link3">General definitions.
+</a>
+
+</li>
+
+<li>
+<a href = "#link4">Policy definitions.
+</a>
+
+</li>
+
+</ol>
+
+</li>
+
+<li>
+Public Methods:
+
+
+<ol>
+<li>
+<a href = "#link5">Constructors, destructor, and related.
+</a>
+
+</li>
+
+<li>
+<a href = "#link6">Policy access methods.
+</a>
+
+</li>
+
+<li>
+<a href = "#link7">Size access methods.
+</a>
+
+</li>
+
+</ol>
+
+</li>
+
+<li>
+Protected Methods:
+
+
+<ol>
+<li>
+<a href = "#link8">Insert search notifications.
+</a>
+
+</li>
+
+<li>
+<a href = "#link9">Find search notifications.
+</a>
+
+</li>
+
+<li>
+<a href = "#link10">Erase search notifications.
+</a>
+
+</li>
+
+<li>
+<a href = "#link11">Content change notifications.
+</a>
+
+</li>
+
+<li>
+<a href = "#link12">Size change notifications.
+</a>
+
+</li>
+
+<li>
+<a href = "#link13">Queries.
+</a>
+
+</li>
+
+</ol>
+
+</li>
+
+</ol>
+
+
+<h2>
+<a name = "link1">Template parameters.
+</a>
+
+</h2>
+
+<table WIDTH = "100%" BORDER = "1">
+<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 = "Size_Policy3735929689">Size_Policy</a></pre>
+
+
+</td>
+
+<td>
+<p>Size policy type.</p>
+
+
+</td>
+
+<td>
+<a href = "hash_exponential_size_policy.html"><tt>hash_exponential_size_policy&lt;&gt;</tt></a>
+
+
+</td>
+
+</tr>
+
+<tr>
+<td>
+<pre><a name = "Trigger_Policy3735930002">Trigger_Policy</a></pre>
+
+
+</td>
+
+<td>
+<p>Trigger policy type.</p>
+
+
+</td>
+
+<td>
+<a href = "ht_load_check_trigger.html"><tt>ht_load_check_trigger&lt;&gt;</tt></a>
+
+
+</td>
+
+</tr>
+
+<tr>
+<td>
+<pre><a name = "External_Size_Access3735929535">External_Size_Access</a></pre>
+
+
+</td>
+
+<td>
+<p>Indicates whether physical sizes can be accessed externally.</p>
+
+
+</td>
+
+<td>
+<tt><b>false</b></tt>
+
+
+</td>
+
+</tr>
+
+<tr>
+<td>
+<pre><a name = "Size_Type3735929483">Size_Type</a></pre>
+
+
+</td>
+
+<td>
+<p>Size type.</p>
+
+
+</td>
+
+<td>
+size_t
+
+
+</td>
+
+</tr>
+
+</table>
+
+<h2>
+<a name = "link2">Base classes.
+</a>
+
+</h2>
+
+<table WIDTH = "100%" BORDER = "1">
+<TR><TD Width = "80%" ALIGN = "left"><b>Class</b></TD><TD Width = "20%" ALIGN = "left"><b>Derivation Type</b></TD></TR>
+
+
+<tr>
+<td>
+<pre><a href = "#Size_Policy3735929689">Size_Policy</a></pre>
+
+
+</td>
+
+<td>
+<p>public</p>
+
+
+</td>
+
+</tr>
+
+<tr>
+<td>
+<pre><a href = "#Trigger_Policy3735930002">Trigger_Policy</a></pre>
+
+
+</td>
+
+<td>
+<p>public</p>
+
+
+</td>
+
+</tr>
+
+</table>
+
+<h2>
+<a name = "link3">General definitions.
+</a>
+
+</h2>
+
+<table WIDTH = "100%" BORDER = "1">
+<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_type3735929547">size_type</a></pre>
+
+
+</td>
+
+<td>
+<pre><a href = "#Size_Type3735929483">Size_Type</a></pre>
+
+
+</td>
+
+<td>
+<p>Size type.</p>
+
+
+</td>
+
+</tr>
+
+</table>
+
+<h2>
+<a name = "link4">Policy definitions.
+</a>
+
+</h2>
+
+<table WIDTH = "100%" BORDER = "1">
+<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 = "trigger_policy3735930066">trigger_policy</a></pre>
+
+
+</td>
+
+<td>
+<pre><a href = "#Trigger_Policy3735930002">Trigger_Policy</a></pre>
+
+
+</td>
+
+<td>
+<p>Trigger policy type.</p>
+
+
+</td>
+
+</tr>
+
+<tr>
+<td>
+<pre><a name = "size_policy3735929753">size_policy</a></pre>
+
+
+</td>
+
+<td>
+<pre><a href = "#Size_Policy3735929689">Size_Policy</a></pre>
+
+
+</td>
+
+<td>
+<p>Size policy type.</p>
+
+
+</td>
+
+</tr>
+
+<tr>
+<td>
+<pre><a name = "external_size_access3735929599">external_size_access</a></pre>
+
+
+</td>
+
+<td>
+<pre><a href = "#External_Size_Access3735929535">External_Size_Access</a></pre>
+
+
+</td>
+
+<td>
+<p>Indicates whether sizes can be accessed externally.</p>
+
+
+</td>
+
+</tr>
+
+</table>
+
+<h2>
+<a name = "link5">Constructors, destructor, and related.
+</a>
+
+</h2>
+
+<table WIDTH = "100%" BORDER = "1">
+<TR><TD Width = "45%" ALIGN = "left"><b>Method</b></TD><TD Width = "55%" ALIGN = "left"><b>Description</b></TD></TR>
+
+
+<tr>
+<td>
+<pre> hash_standard_resize_policy
+ (<a href = "#size_type3735929547">size_type</a> suggested_size = 8)</pre>
+
+
+</td>
+
+<td>
+<p>Default constructor, or constructor taking <font color = "#666666"><tt>suggested_size</tt></font>, a suggested size (the actual size will be determined by the <a href = "#Size_Policy3735929689"><tt>Size_Policy</tt></a> object).</p>
+
+
+</td>
+
+</tr>
+
+<tr>
+<td>
+<pre> hash_standard_resize_policy
+ (<b>const</b> <a href = "#Size_Policy3735929689">Size_Policy</a> &amp;r_size_policy,
+ <a href = "#size_type3735929547">size_type</a> suggested_size = 8)</pre>
+
+
+</td>
+
+<td>
+<p>constructor taking some policies and <font color = "#666666"><tt>suggested_size</tt></font>, a suggested size (the actual size will be determined by the <a href = "#Size_Policy3735929689"><tt>Size_Policy</tt></a> object). <font color = "#666666"><tt>r_size_policy</tt></font> will be copied by the <a href = "#Size_Policy3735929689"><tt>Size_Policy</tt></a> object of this object.</p>
+
+
+</td>
+
+</tr>
+
+<tr>
+<td>
+<pre> hash_standard_resize_policy
+ (<b>const</b> <a href = "#Size_Policy3735929689">Size_Policy</a> &amp;r_size_policy,
+ <b>const</b> <a href = "#Trigger_Policy3735930002">Trigger_Policy</a> &amp;r_trigger_policy,
+ <a href = "#size_type3735929547">size_type</a> suggested_size = 8)</pre>
+
+
+</td>
+
+<td>
+<p>constructor taking some policies and <font color = "#666666"><tt>suggested_size</tt></font>, a suggested size (the actual size will be determined by the <a href = "#Size_Policy3735929689"><tt>Size_Policy</tt></a> object). <font color = "#666666"><tt>r_size_policy</tt></font> will be copied by the <a href = "#Size_Policy3735929689"><tt>Size_Policy</tt></a> object of this object. <font color = "#666666"><tt>r_trigger_policy</tt></font> will be copied by the <a href = "#Trigger_Policy3735930002"><tt>Trigger_Policy</tt></a> object of this object.</p>
+
+
+</td>
+
+</tr>
+
+<tr>
+<td>
+<pre><b>virtual</b>
+ ~hash_standard_resize_policy
+ ()</pre>
+
+
+</td>
+
+<td>
+<p>Destructor.</p>
+
+
+</td>
+
+</tr>
+
+<tr>
+<td>
+<pre><b>inline</b> <b>void</b>
+ swap
+ (<font color = "olive">hash_standard_resize_policy</font> &amp;r_other)</pre>
+
+
+</td>
+
+<td>
+<p>Swaps content.</p>
+
+
+</td>
+
+</tr>
+
+</table>
+
+<h2>
+<a name = "link6">Policy access methods.
+</a>
+
+</h2>
+
+<table WIDTH = "100%" BORDER = "1">
+<TR><TD Width = "45%" ALIGN = "left"><b>Method</b></TD><TD Width = "55%" ALIGN = "left"><b>Description</b></TD></TR>
+
+
+<tr>
+<td>
+<pre><a href = "#Size_Policy3735929689">Size_Policy</a> &amp;
+ get_size_policy
+ ()</pre>
+
+
+</td>
+
+<td>
+<p>Access to the <a href = "#Size_Policy3735929689"><tt>Size_Policy</tt></a> object used.</p>
+
+
+</td>
+
+</tr>
+
+<tr>
+<td>
+<pre><b>const</b> <a href = "#Size_Policy3735929689">Size_Policy</a> &amp;
+ get_size_policy
+ () <b>const</b></pre>
+
+
+</td>
+
+<td>
+<p>Const access to the <a href = "#Size_Policy3735929689"><tt>Size_Policy</tt></a> object used.</p>
+
+
+</td>
+
+</tr>
+
+<tr>
+<td>
+<pre><a href = "#Trigger_Policy3735930002">Trigger_Policy</a> &amp;
+ get_trigger_policy
+ ()</pre>
+
+
+</td>
+
+<td>
+<p>Access to the <a href = "#Trigger_Policy3735930002"><tt>Trigger_Policy</tt></a> object used.</p>
+
+
+</td>
+
+</tr>
+
+<tr>
+<td>
+<pre><b>const</b> <a href = "#Trigger_Policy3735930002">Trigger_Policy</a> &amp;
+ get_trigger_policy
+ () <b>const</b></pre>
+
+
+</td>
+
+<td>
+<p>Access to the <a href = "#Trigger_Policy3735930002"><tt>Trigger_Policy</tt></a> object used.</p>
+
+
+</td>
+
+</tr>
+
+</table>
+
+<h2>
+<a name = "link7">Size access methods.
+</a>
+
+</h2>
+
+<p>These methods are available only if the external size parameter indicates that external size access is allowed.</p>
+
+
+<table WIDTH = "100%" BORDER = "1">
+<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> <a href = "#size_type3735929547">size_type</a>
+ get_actual_size
+ () <b>const</b></pre>
+
+
+</td>
+
+<td>
+<p>Returns the actual size of the container.</p>
+
+
+<p>This method returns the number of entries (used and unused) in the container. It is different from the container's size method, which returns the number of used entries. Calling this method will not compile when <a href = "#External_Size_Access3735929535"><tt>External_Size_Access</tt></a> == <tt><b>false</b></tt>.</p>
+
+
+</td>
+
+</tr>
+
+<tr>
+<td>
+<pre><b>void</b>
+ resize
+ (<a href = "#size_type3735929547">size_type</a> suggested_new_size)</pre>
+
+
+</td>
+
+<td>
+<p>Resizes the container to <font color = "#666666"><tt>suggested_new_size</tt></font>, a suggested size (the actual size will be determined by the <a href = "#Size_Policy3735929689"><tt>Size_Policy</tt></a> object).</p>
+
+
+<p>Calling this method will not compile when <a href = "#External_Size_Access3735929535"><tt>External_Size_Access</tt></a> == <tt><b>false</b></tt>.</p>
+
+
+</td>
+
+</tr>
+
+</table>
+
+<h2>
+<a name = "link8">Insert search notifications.
+</a>
+
+</h2>
+
+<p>Notifications called during an insert operation.</p>
+
+
+<table WIDTH = "100%" BORDER = "1">
+<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>
+ notify_insert_search_start
+ ()</pre>
+
+
+</td>
+
+<td>
+<p>Notifies a search started.</p>
+
+
+</td>
+
+</tr>
+
+<tr>
+<td>
+<pre><b>inline</b> <b>void</b>
+ notify_insert_search_collision
+ ()</pre>
+
+
+</td>
+
+<td>
+<p>Notifies a search encountered a collision.</p>
+
+
+</td>
+
+</tr>
+
+<tr>
+<td>
+<pre><b>inline</b> <b>void</b>
+ notify_insert_search_end
+ ()</pre>
+
+
+</td>
+
+<td>
+<p>Notifies a search ended.</p>
+
+
+</td>
+
+</tr>
+
+</table>
+
+<h2>
+<a name = "link9">Find search notifications.
+</a>
+
+</h2>
+
+<p>Notifications called during a find operation.</p>
+
+
+<table WIDTH = "100%" BORDER = "1">
+<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>
+ notify_find_search_start
+ ()</pre>
+
+
+</td>
+
+<td>
+<p>Notifies a search started.</p>
+
+
+</td>
+
+</tr>
+
+<tr>
+<td>
+<pre><b>inline</b> <b>void</b>
+ notify_find_search_collision
+ ()</pre>
+
+
+</td>
+
+<td>
+<p>Notifies a search encountered a collision.</p>
+
+
+</td>
+
+</tr>
+
+<tr>
+<td>
+<pre><b>inline</b> <b>void</b>
+ notify_find_search_end
+ ()</pre>
+
+
+</td>
+
+<td>
+<p>Notifies a search ended.</p>
+
+
+</td>
+
+</tr>
+
+</table>
+
+<h2>
+<a name = "link10">Erase search notifications.
+</a>
+
+</h2>
+
+<p>Notifications called during an insert operation.</p>
+
+
+<table WIDTH = "100%" BORDER = "1">
+<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>
+ notify_erase_search_start
+ ()</pre>
+
+
+</td>
+
+<td>
+<p>Notifies a search started.</p>
+
+
+</td>
+
+</tr>
+
+<tr>
+<td>
+<pre><b>inline</b> <b>void</b>
+ notify_erase_search_collision
+ ()</pre>
+
+
+</td>
+
+<td>
+<p>Notifies a search encountered a collision.</p>
+
+
+</td>
+
+</tr>
+
+<tr>
+<td>
+<pre><b>inline</b> <b>void</b>
+ notify_erase_search_end
+ ()</pre>
+
+
+</td>
+
+<td>
+<p>Notifies a search ended.</p>
+
+
+</td>
+
+</tr>
+
+</table>
+
+<h2>
+<a name = "link11">Content change notifications.
+</a>
+
+</h2>
+
+<p>Notifications called when the content of the table changes in a way that can affect the resize policy.</p>
+
+
+<table WIDTH = "100%" BORDER = "1">
+<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>
+ notify_inserted
+ (<a href = "#size_type3735929547">size_type</a> num_e)</pre>
+
+
+</td>
+
+<td>
+<p>Notifies an element was inserted.</p>
+
+
+</td>
+
+</tr>
+
+<tr>
+<td>
+<pre><b>inline</b> <b>void</b>
+ notify_erased
+ (<a href = "#size_type3735929547">size_type</a> num_e)</pre>
+
+
+</td>
+
+<td>
+<p>Notifies an element was erased.</p>
+
+
+</td>
+
+</tr>
+
+<tr>
+<td>
+<pre><b>void</b>
+ notify_cleared
+ ()</pre>
+
+
+</td>
+
+<td>
+<p>Notifies the table was cleared.</p>
+
+
+</td>
+
+</tr>
+
+</table>
+
+<h2>
+<a name = "link12">Size change notifications.
+</a>
+
+</h2>
+
+<p>Notifications called when the table changes size.</p>
+
+
+<table WIDTH = "100%" BORDER = "1">
+<TR><TD Width = "45%" ALIGN = "left"><b>Method</b></TD><TD Width = "55%" ALIGN = "left"><b>Description</b></TD></TR>
+
+
+<tr>
+<td>
+<pre><b>void</b>
+ notify_resized
+ (<a href = "#size_type3735929547">size_type</a> new_size)</pre>
+
+
+</td>
+
+<td>
+<p>Notifies the table was resized to <font color = "#666666"><tt>new_size</tt></font>.</p>
+
+
+</td>
+
+</tr>
+
+</table>
+
+<h2>
+<a name = "link13">Queries.
+</a>
+
+</h2>
+
+<p>Called to query whether/how to resize.</p>
+
+
+<table WIDTH = "100%" BORDER = "1">
+<TR><TD Width = "45%" ALIGN = "left"><b>Method</b></TD><TD Width = "55%" ALIGN = "left"><b>Description</b></TD></TR>
+
+
+<tr>
+<td>
+<pre><a href = "#size_type3735929547">size_type</a>
+ get_init_size
+ () <b>const</b></pre>
+
+
+</td>
+
+<td>
+<p>Queries initial size.</p>
+
+
+</td>
+
+</tr>
+
+<tr>
+<td>
+<pre><b>inline</b> <b>bool</b>
+ is_resize_needed
+ () <b>const</b></pre>
+
+
+</td>
+
+<td>
+<p>Queries whether a resize is needed.</p>
+
+
+</td>
+
+</tr>
+
+<tr>
+<td>
+<pre><a href = "#size_type3735929547">size_type</a>
+ get_new_size
+ (<a href = "#size_type3735929547">size_type</a> size, <a href = "#size_type3735929547">size_type</a> num_used_e) <b>const</b></pre>
+
+
+</td>
+
+<td>
+<p>Queries what the new <font color = "#666666"><tt>size</tt></font> should be.</p>
+
+
+</td>
+
+</tr>
+
+</table>
+
+
+
+</body>
+
+</html>
+
+
diff --git a/libstdc++-v3/docs/html/ext/pb_assoc/home.html b/libstdc++-v3/docs/html/ext/pb_assoc/home.html
new file mode 100644
index 00000000000..79b80662062
--- /dev/null
+++ b/libstdc++-v3/docs/html/ext/pb_assoc/home.html
@@ -0,0 +1,56 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
+<HTML>
+<HEAD>
+<TITLE>pb_assoc</TITLE>
+<META NAME="Generator" content="Microsoft Visual Studio .NET 7.1">
+</HEAD>
+<BODY>
+<h1>
+ <tt>pb_assoc</tt> -
+ Policy Based Associative Containers
+</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>
+</p>
+
+<p>
+ The <tt>pb_assoc</tt> library is a library of policy-based associative
+containers, designed for high-performance, flexibility, and semantic safety.
+</p>
+
+<p>The documentation is organized as follows.
+</p>
+<ol>
+ <li> The <a href = "introduction.html">Introduction</a> Section describes the problems which this library tries to address.</li>
+ <li>The <a href = "motivation.html">Motivation</a> Section describes and motivates
+the main differences between this library and the STL's associative containers.</li>
+ <li>The <a href = "design.html">Design</a> Section describes the design.
+ <ol>
+ <li> <a href = "overview.html">Overview</a> describes an overview.</li>
+ <li> <a href = "ds_gen.html">Data-Structure Genericity</a> discusses generic manipulation of containers based on different underlying data-structures.</li>
+ <li> <a href = "ms_gen.html">Mapping-Semantic Genericity</a> discusses generic manipulation of containers with different mapping semantics.</li>
+ <li> <a href = "hash_based_containers.html">Hash-Based Containers</a> describes the design and policies of hash-based containers.</li>
+ <li> <a href = "tree_based_containers.html">Tree-Based Containers</a> describes the design and policies of tree-based containers.</li>
+ <li> <a href = "lu_based_containers.html">List-Based Containers</a> describes the design and policies of list-based containers with update policies.</li>
+ </ol>
+ </li>
+ <li> The <a href = "interface.html">Interface</a>
+Section provides links to the interfaces of the classes.
+ </li>
+ <li>The
+<a href = "examples.html">Examples</a> Section shows examples of using and extending
+the library.
+ </li>
+</ol>
+
+
+</BODY>
+</HTML>
diff --git a/libstdc++-v3/docs/html/ext/pb_assoc/index.html b/libstdc++-v3/docs/html/ext/pb_assoc/index.html
new file mode 100644
index 00000000000..1e0864126e7
--- /dev/null
+++ b/libstdc++-v3/docs/html/ext/pb_assoc/index.html
@@ -0,0 +1,12 @@
+<HTML>
+<HEAD>
+<TITLE>pb_assoc</TITLE>
+<META NAME="Generator" content="Microsoft Visual Studio .NET 7.1">
+</HEAD>
+
+<frameset cols = "15%, 85%">
+ <frame src = "toc.html">
+ <frame src = "home.html" name = "content">
+</frameset>
+
+</HTML> \ No newline at end of file
diff --git a/libstdc++-v3/docs/html/ext/pb_assoc/insert_resize_sequence_diagram1.jpg b/libstdc++-v3/docs/html/ext/pb_assoc/insert_resize_sequence_diagram1.jpg
new file mode 100644
index 00000000000..6e8a94d3d00
--- /dev/null
+++ b/libstdc++-v3/docs/html/ext/pb_assoc/insert_resize_sequence_diagram1.jpg
Binary files differ
diff --git a/libstdc++-v3/docs/html/ext/pb_assoc/insert_resize_sequence_diagram2.jpg b/libstdc++-v3/docs/html/ext/pb_assoc/insert_resize_sequence_diagram2.jpg
new file mode 100644
index 00000000000..4aa2c6cb8ce
--- /dev/null
+++ b/libstdc++-v3/docs/html/ext/pb_assoc/insert_resize_sequence_diagram2.jpg
Binary files differ
diff --git a/libstdc++-v3/docs/html/ext/pb_assoc/insert_resize_sequence_diagram3.jpg b/libstdc++-v3/docs/html/ext/pb_assoc/insert_resize_sequence_diagram3.jpg
new file mode 100644
index 00000000000..e7cadf1755a
--- /dev/null
+++ b/libstdc++-v3/docs/html/ext/pb_assoc/insert_resize_sequence_diagram3.jpg
Binary files differ
diff --git a/libstdc++-v3/docs/html/ext/pb_assoc/insert_type_methods.html b/libstdc++-v3/docs/html/ext/pb_assoc/insert_type_methods.html
new file mode 100644
index 00000000000..3687a5b3176
--- /dev/null
+++ b/libstdc++-v3/docs/html/ext/pb_assoc/insert_type_methods.html
@@ -0,0 +1,42 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
+<html>
+<head>
+<title>Insert-type Methods</title>
+<meta name="GENERATOR" content="Microsoft Visual Studio .NET 7.1">
+<meta name="vs_targetSchema" content="http://schemas.microsoft.com/intellisense/ie5">
+</head>
+<body bgcolor = "white">
+<h2>Insert-Type Methods</h2>
+<TABLE WIDTH="100%" BORDER="1" ID="Table1">
+ <TR>
+ <TD Width = "30%" ALIGN="left"><b>Method</b></TD>
+ <TD Width = "50%" ALIGN="left"><b>Description</b></TD>
+ <TD Width = "10%" ALIGN="left"><b>Complexity Guarantee</b></TD>
+ <TD Width = "10%" ALIGN="left"><b>Exception Guarantee</b></TD>
+ </TR>
+ <TR>
+ <TD ALIGN="left">
+<pre><b>inline</b> std::pair&lt;<a href = "find_iterator.html">find_iterator</a>, <b>bool</b>&gt;
+ insert
+ (<a href = "mapped_value_type_defs.html">const_mapped_reference</a> r_value)
+</pre>
+ </TD>
+ <TD ALIGN="left">Inserts <tt>r_value</tt> into the table. Writes only if an entry with an equivalent key does not exist. If the entry was written, returns
+<pre>std::make_pair(it, <b>true</b>)
+</pre> where <tt>it</tt> corresponds to the new entry;
+ Otherwise, returns
+<pre>std::make_pair(<a href = "find_type_methods.html">find_end()</a>, <b>false</b>)
+</pre>.</TD>
+ <TD ALIGN="left"><i>O(1)</i> average <p><i>O(m)</i> worst</p> <p>(<i>m</i> = #entries)</p> <p><sub><a href = "#mmap_complex">[1]</a></sub></p></TD>
+ <TD ALIGN="left"><a href = "exception_guarantees_specifics.html#basic_guarantee">1</a>,<a href = "exception_guarantees_specifics.html#strong_guarantee">2</a></TD>
+ </TR>
+</TABLE>
+
+<p>
+<a name = "mmap_complex">[1]</a> Note that for multimap types, the mapped data part is a collection, and so the average and worst case complexities
+need to be multiplied by the corresponding complexities of copying collections.
+</p>
+
+
+</body>
+</html>
diff --git a/libstdc++-v3/docs/html/ext/pb_assoc/interface.html b/libstdc++-v3/docs/html/ext/pb_assoc/interface.html
new file mode 100644
index 00000000000..11bf5d15227
--- /dev/null
+++ b/libstdc++-v3/docs/html/ext/pb_assoc/interface.html
@@ -0,0 +1,342 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
+<HTML>
+<HEAD>
+ <TITLE>Interface</TITLE>
+ <META NAME="Generator" content="Microsoft Visual Studio .NET 7.1">
+</HEAD>
+<BODY>
+
+<H1>Interface</H1>
+<p>
+ Following is the library's interface:
+</p>
+<ol>
+ <li> <a href = "tutorial.html">Short Tutorial</a> is a short tutorial. </li>
+ <li> <a href="#containers">Containers</a> describes the containers of
+the library.
+ </li>
+ <li>
+ <a href="#ds_pol">Data-Type Policies</a> describes data-type policies.
+ </li>
+ <li>
+ <a href="#ds_tag">Data-Structure Tags and Traits</a> describes
+ tags and traits identifying the underlying data-structure and its behaviour.
+ </li>
+ <li>
+ <a href="#ms_tag">Mapping-Semantics Tags and Traits</a> describes
+ tags and traits identifying the mapping-semantics.
+ </li>
+ <li>
+ <a href = "#ds_policy_classes">Data-Structure Policy Classes</a> describes
+ policies for configuring underlying data-structures.
+ </li>
+ <li>
+ <a href="#exceptions">Exceptions</a> Subsection desribes exception classes.
+ </li>
+</ol>
+
+
+<hr>
+
+
+
+<h2><a name = "containers">Containers</a></h2>
+
+<p>
+<a href = "overview.html">Overview</a> and
+<a href = "ds_gen.html">Data-Structure Genericity</a> discuss relevant design
+points.
+</p>
+
+<h6 align = "center">
+<a name = "cd">
+<img src = "cd.jpg" width = "70%" alt = "no image">
+</h6>
+</a>
+<h6 align = "center">
+class hierarchy.
+</h6>
+
+<ol>
+ <li>
+ Basic Associative-Containers:
+ <ol>
+ <li><a href = "basic_assoc_cntnr.html"><tt>basic_assoc_cntnr</tt></a> - basic associative-container for the &quot;map&quot; case</li>
+ <li><a href = "basic_assoc_cntnr_no_data.html"><tt>basic_assoc_cntnr</tt></a> - basic associative-container for the &quot;set&quot; case</li>
+ <li><a href = "basic_assoc_cntnr_compound_data.html"><tt>basic_assoc_cntnr</tt></a> - basic associative-container for the &quot;multimap&quot; case</li>
+ </ol>
+ </li>
+ <li>
+ Hash-Based Associative-Containers:
+ <ol>
+ <li><a href = "basic_hash_assoc_cntnr.html"><tt>basic_hash_assoc_cntnr</tt></a> - basic hash-based associative-container </li>
+ <li><a href = "cc_hash_assoc_cntnr.html"><tt>cc_hash_assoc_cntnr</tt></a> - collision-chaining hash-based associative-container </li>
+ <li><a href = "gp_hash_assoc_cntnr.html"><tt>gp_hash_assoc_cntnr</tt></a> - (general) probing hash-based associative-container </li>
+ </ol>
+ </li>
+ <li>
+ Tree-Based Associative-Containers:
+ <ol>
+ <li><a href = "basic_tree_assoc_cntnr.html"><tt>basic_tree_assoc_cntnr</tt></a> - basic tree-based associative-container </li>
+ <li><a href = "basic_tree_assoc_cntnr_rev.html"><tt>basic_tree_assoc_cntnr</tt></a> - basic tree-based associative-container with reverse iteration </li>
+ <li><a href = "tree_assoc_cntnr.html"><tt>tree_assoc_cntnr</tt></a> - tree-based associative-container </li>
+ </ol>
+ </li>
+ <li>
+ List-Based Associative-Contaiers:
+ <ol>
+ <li><a href = "lu_assoc_cntnr.html"><tt>lu_assoc_cntnr</tt></a> - list-based update-policy associative container</li>
+ </ol>
+ </li>
+</ol>
+
+
+<hr>
+
+
+<h2><a name = "ds_pol">Data-Type Policies</a></h2>
+
+<p>
+<a href = "overview.html">Overview</a> and
+<a href = "ms_gen.html">Mapping-Semantic Genericity</a> discuss relevant design
+points.
+</p>
+
+<ol>
+ <li><a href = "null_data_type.html"><tt>null_data_type</tt></a>
+ </li>
+ <li><a href = "compound_data_type.html"><tt>compound_data_type</tt></a>
+ </li>
+</ol>
+
+<hr>
+
+
+
+
+<h2><a name = "ds_tag">Data-Structure Tags and Traits</a></h2>
+
+<p>
+
+</p>
+
+<h3>Data-Structure Tags</h3>
+
+<h6 align = "center">
+<a name = "cd">
+<img src = "ds_tag_cd.jpg" width = "70%" alt = "no image">
+</h6>
+</a>
+<h6 align = "center">
+Data-Structure Tag class hierarchy.
+</h6>
+
+<ol>
+ <li> <a href = "basic_ds_tag.html"><tt>basic_ds_tag</tt></a></li>
+ <li> <a href = "basic_hash_ds_tag.html"><tt>basic_hash_ds_tag</tt></a></li>
+ <li> <a href = "cc_hash_ds_tag.html"><tt>cc_hash_ds_tag</tt></a></li>
+ <li> <a href = "gp_hash_ds_tag.html"><tt>gp_hash_ds_tag</tt></a></li>
+ <li> <a href = "basic_tree_ds_tag.html"><tt>basic_tree_ds_tag</tt></a></li>
+ <li> <a href = "rb_tree_ds_tag.html"><tt>rb_tree_ds_tag</tt></a></li>
+ <li> <a href = "splay_tree_ds_tag.html"><tt>splay_tree_ds_tag</tt></a></li>
+ <li> <a href = "ov_tree_ds_tag.html"><tt>ov_tree_ds_tag</tt></a></li>
+ <li> <a href = "lu_ds_tag.html"><tt>lu_ds_tag</tt></a></li>
+ <li> <a href = "compound_ds_tag.html"><tt>compound_ds_tag</tt></a></li>
+</ol>
+
+
+<h3>Invalidation-Guarantee Tags</h3>
+
+<h6 align = "center">
+<a name = "cd">
+<img src = "invalidation_guarantee_cd.jpg" width = "70%" alt = "no image">
+</h6>
+</a>
+<h6 align = "center">
+Invalidation guarantees class hierarchy.
+</h6>
+
+<ol>
+ <li> <a href = "basic_invalidation_guarantee.html"><tt>basic_invalidation_guarantee</tt></a></li>
+ <li> <a href = "find_invalidation_guarantee.html"><tt>find_invalidation_guarantee</tt></a></li>
+ <li> <a href = "range_invalidation_guarantee.html"><tt>range_invalidation_guarantee</tt></a></li>
+</ol>
+
+<h3>Data-Structure Traits</h3>
+
+<ol>
+ <li> <a href = "ds_traits.html"><tt>ds_traits</tt></a></li>
+</ol>
+
+
+<hr>
+
+
+<h2><a name = "ms_tag">Mapping-Semantics Tags and Traits</a></h2>
+
+<p>
+
+</p>
+
+<h3>Mapping-Semantics Tags</h3>
+
+<h6 align = "center">
+<a name = "cd">
+<img src = "ms_tag_cd.jpg" width = "70%" alt = "no image">
+</h6>
+</a>
+<h6 align = "center">
+Mapping-Semantics Tag class hierarchy.
+</h6>
+
+<ol>
+ <li> <a href = "basic_ms_tag.html"><tt>basic_ms_tag</tt></a></li>
+ <li> <a href = "data_enabled_ms_tag.html"><tt>data_enabled_ms_tag</tt></a></li>
+ <li> <a href = "compound_data_enabled_ms_tag.html"><tt>compound_data_enabled_ms_tag</tt></a></li>
+</ol>
+
+
+<h3>Mapping-Semantics Traits</h3>
+
+<ol>
+ <li> <a href = "ms_traits.html"><tt>ms_traits</tt></a></li>
+</ol>
+
+
+<hr>
+
+
+<h2><a name="ds_policy_classes">Data-Structure Policy Classes</a></h2>
+
+
+<h3>Hash-Related Policies</h3>
+
+<p>
+</p><a href = "hash_based_containers.html">Hash-Based Containers</a> describes
+relevant design points.
+</p>
+
+<h4>Hash and Probe Policies</h4>
+<ol>
+ <li> Hash Functions:
+ <ol>
+ <li> <a href="null_hash_fn.html"><tt>null_hash_fn</tt></a></li>
+ </ol>
+ </li>
+ <li> Range-Hashing Functions:
+ <ol>
+ <li><a href="sample_range_hashing.html">Interface of a Range-Hashing Function</a></li>
+ <li> <a href="direct_mask_range_hashing.html"><tt>direct_mask_range_hashing</tt></a></li>
+ <li> <a href="direct_mod_range_hashing.html"><tt>direct_mod_range_hashing</tt></a></li>
+ </ol>
+ </li>
+ <li> Probe Functions:
+ <ol>
+ <li> <a href="sample_probe_fn.html">Interface of a Probe Function</a></li>
+ <li> <a href="linear_probe_fn.html"><tt>linear_probe_fn</tt></a></li>
+ <li> <a href="quadratic_probe_fn.html"><tt>quadratic_probe_fn</tt></a></li>
+ <li> <a href="null_probe_fn.html"><tt>null_probe_fn</tt></a></li>
+ </ol>
+ </li>
+ <li> Ranged-Hash Functions:
+ <ol>
+ <li><a href="ranged_hash_fn.html">Interface of a Ranged-Hash Function</a></li>
+ </ol>
+ </li>
+ <li> Ranged-Probe Functions:
+ <ol>
+ <li> <a href="ranged_probe_fn.html">Interface of a Ranged-Probe function</a></li>
+ </ol>
+ </li>
+</ol>
+
+
+
+<h4>Resize Policies</h4>
+
+<h6 align = "center">
+<a name = "resize_policy_cd">
+<img src = "resize_policy_cd.jpg" width = "70%" alt = "no image">
+</a>
+</h6>
+<h6 align = "center">
+Resize policy class diagram.
+</h6>
+
+<ol>
+ <li> Resize Policies:
+ <ol>
+ <li> <a href="sample_resize_policy.html">Interface of a Resize Policy</a>
+ <li> <a href="ht_standard_resize_policy.html"><tt>ht_standard_resize_policy</tt></a></li>
+ </ol>
+ </li>
+ <li> Size Policies:
+ <ol>
+ <li> <a href="sample_size_policy.html">Interface of a Size Policy</a></li>
+ <li> <a href="ht_exponential_size_policy.html"><tt>ht_exponential_size_policy</tt></a></li>
+ <li> <a href="ht_prime_size_policy.html"><tt>ht_prime_size_policy</tt></a></li>
+ </ol>
+ </li>
+ <li> Trigger Policies:
+ <ol>
+ <li><a href="sample_resize_trigger.html">Interface of a Trigger Policy</a></li>
+ <li> <a href="ht_load_check_resize_trigger.html"><tt>ht_load_check_resize_trigger</tt></a></li>
+ <li> <a href="ht_max_collision_check_grow_resize_trigger.html"><tt>ht_max_collision_check_grow_resize_trigger</tt></a></li>
+ </ol>
+ </li>
+</ol>
+
+
+
+<h3>Tree Node-Update Policies</h3>
+<ol>
+ <li> <a href = "node_invariants.html">Design of Node Update Policies</a></li>
+ <li> <a href="sample_node_updator.html">Interface of a Node Updator Policy</a></li>
+ <li> Order-Statistics (Finding Entries by Key Order):
+ <ol>
+ <li> <a href="order_statistics_key.html"><tt>order_statistics_key</tt></a></li>
+ <li> <a href="order_statistics_key_cmp.html"><tt>order_statistics_key_cmp</tt></a></li>
+ <li> <a href="order_statistics_node_updator.html"><tt>order_statistics_node_updator</tt></a></li>
+ <li> <a href="find_by_order.html"><tt>find_by_order</tt></a></li>
+ <li> <a href="order_by_key.html"><tt>order_by_key</tt></a></li>
+ </ol>
+ </li>
+ <li> <a href="null_node_updator.html"><tt>null_node_updator</tt></a></li>
+</ol>
+
+
+<h3>List Update Policies</h3>
+<ol>
+ <li> <a href = "list_updates.html">Design of List Update Policies</a> </li>
+ <li> <a href = "sample_update_policy.html">Interface of a List Update Policy</a> </li>
+ <li> Move-to-Front:
+ <ol>
+ <li> <a href="move_to_front_update_metadata.html"><tt>move_to_front_update_metadata</tt></a></li>
+ <li> <a href="move_to_front_update_policy.html"><tt>move_to_front_update_policy</tt></a></li>
+ </ol>
+ </li>
+ <li> Counter:
+ <ol>
+ <li> <a href="counter_update_metadata.html"><tt>counter_update_metadata</tt></a></li>
+ <li> <a href="counter_update_policy.html"><tt>counter_update_policy</tt></a></li>
+ </ol>
+ </li>
+</ol>
+
+
+<hr>
+
+
+
+
+<h2><a name="exceptions">Exceptions</a></h2>
+<ol>
+ <li> <a href="pb_assoc_ex.html"><tt>pb_assoc_ex</tt></a></li>
+ <li> <a href="cannot_insert.html"><tt>cannot_insert</tt></a></li>
+ <li> <a href="cannot_join.html"><tt>cannot_join</tt></a></li>
+ <li> <a href="cannot_resize.html"><tt>cannot_resize</tt></a></li>
+</ol>
+
+
+</BODY>
+</HTML>
diff --git a/libstdc++-v3/docs/html/ext/pb_assoc/interval_node_invariants.jpg b/libstdc++-v3/docs/html/ext/pb_assoc/interval_node_invariants.jpg
new file mode 100644
index 00000000000..0f4db9671a3
--- /dev/null
+++ b/libstdc++-v3/docs/html/ext/pb_assoc/interval_node_invariants.jpg
Binary files differ
diff --git a/libstdc++-v3/docs/html/ext/pb_assoc/introduction.html b/libstdc++-v3/docs/html/ext/pb_assoc/introduction.html
new file mode 100644
index 00000000000..e31dfc71a2f
--- /dev/null
+++ b/libstdc++-v3/docs/html/ext/pb_assoc/introduction.html
@@ -0,0 +1,31 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
+<HTML>
+<HEAD>
+<TITLE>Introduction</TITLE>
+<META NAME="Generator" content="Microsoft Visual Studio .NET 7.1">
+<base target = "content">
+</HEAD>
+<BODY>
+<H1>Introduction</H1>
+
+<p>
+ There are (at least) three orthogonal challenges to designing generic associative containers:
+</p>
+
+<ol>
+ <li> The choice of underlying data-structure affects not only the performance of containers, but their semantics as well. <i>E.g.</i>, containers based on trees store elements by a given order, while containers based on hash tables store elements in a meaningless (and probably time-varying) order; containers based on node-based trees can guarantee exception-free element erasing, while containers based on vector-based trees cannot. This complicates generic manipulation of associative containers based on different underlying data-structures.
+ </li>
+ <li>
+ Underlying data-structures can act very differently given different policies. <i>E.g.</i>, the policy by which a hash table translates a hash value into a position within a table affects performance dramatically; certain policies can make containers based on trees support order statistics (<i>i.e.</i>, queries on the order of stored elements) or other useful queries. This complicates the policy design of an associative container based on a given data-structure.
+ </li>
+ <li>
+ Various mapping semantics are appropriate in different settings. <i>E.g.</i>, in some cases a unique mapping between each key and a datum is appropriate (such as the STL's <tt>std::map</tt> guarantees); in other cases, unique storage of keys is required (such as the STL's <tt>std::set</tt> guarantees); in other cases, more complex mapping semantics are required. This complicates generic manipulation of associative containers with different mapping semantics.
+ </li>
+</ol>
+
+<p>
+ <tt>pb_assoc</tt> attempts to address these problems safely and efficiently.
+</p>
+
+</BODY>
+</HTML>
diff --git a/libstdc++-v3/docs/html/ext/pb_assoc/invalidation_guarantee_cd.jpg b/libstdc++-v3/docs/html/ext/pb_assoc/invalidation_guarantee_cd.jpg
new file mode 100644
index 00000000000..dde670039b7
--- /dev/null
+++ b/libstdc++-v3/docs/html/ext/pb_assoc/invalidation_guarantee_cd.jpg
Binary files differ
diff --git a/libstdc++-v3/docs/html/ext/pb_assoc/invalidation_guarantee_erase.jpg b/libstdc++-v3/docs/html/ext/pb_assoc/invalidation_guarantee_erase.jpg
new file mode 100644
index 00000000000..d1670978b6b
--- /dev/null
+++ b/libstdc++-v3/docs/html/ext/pb_assoc/invalidation_guarantee_erase.jpg
Binary files differ
diff --git a/libstdc++-v3/docs/html/ext/pb_assoc/lib_download.html b/libstdc++-v3/docs/html/ext/pb_assoc/lib_download.html
new file mode 100644
index 00000000000..20076319af1
--- /dev/null
+++ b/libstdc++-v3/docs/html/ext/pb_assoc/lib_download.html
@@ -0,0 +1,47 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
+<html>
+<head>
+<title>Library Download and Install</title>
+<meta name="GENERATOR" content="Microsoft Visual Studio .NET 7.1">
+<meta name="vs_targetSchema" content="http://schemas.microsoft.com/intellisense/ie5">
+</head>
+<body bgcolor = "white">
+<h1>Library Download and Install</h1>
+
+<ol>
+ <li><a href = "#requirements">Requirements</a></li>
+ <li><a href = "#donwload">Download</a></li>
+ <li><a href = "#install">Install</a></li>
+ <li><a href = "#use">Use</a></li>
+</ol>
+
+<h2><a name = "requirements">Requirements</a></h2>
+
+<p>
+ The library compiles and runs on the newer versions of
+<tt>g++</tt>, <tt>icc</tt> and <tt>Visual C++ .net</tt>. The
+<a href = "portability.html">Portability</a> Section describes the known
+compilers with which it works.
+</p>
+
+<p>
+ Unfortunately, we do not have access to other compilers, and so do not
+know how to define some standard policies whose namespaces and declarations
+we know only on
+<tt>g++</tt>, <tt>icc</tt>, and <tt>Visual C++ .net</tt>.
+We would appreciate help on this point.
+</p>
+
+<h2><a name = "donwload">Download</a></h2>
+
+<p>
+ The following <a href = "pb_assoc.zip">link</a> contains a zip
+file of the library.
+</p>
+
+
+<h2><a name = "install">Install</a></h2>
+
+
+</body>
+</html>
diff --git a/libstdc++-v3/docs/html/ext/pb_assoc/linear_probe_fn.html b/libstdc++-v3/docs/html/ext/pb_assoc/linear_probe_fn.html
new file mode 100644
index 00000000000..65943f2701e
--- /dev/null
+++ b/libstdc++-v3/docs/html/ext/pb_assoc/linear_probe_fn.html
@@ -0,0 +1,238 @@
+
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
+
+
+<html>
+<head>
+<title>linear_probe_fn Interface
+</title>
+
+</head>
+
+<body>
+<h1>
+<tt>linear_probe_fn
+</tt>
+
+ Interface
+
+
+</h1>
+
+<p>A probe sequence policy using fixed increments.
+</p>
+
+<ol>
+<li>
+<a href = "../../../../include/ext/pb_assoc/hash_policy.hpp"><tt>hash_policy.hpp</tt>
+</a>
+
+</li>
+
+<li>
+<a href = "#link1">Template parameters.
+</a>
+
+</li>
+
+<li>
+Public Types and Constants:
+
+
+<ol>
+<li>
+<a href = "#link2">General definitions.
+</a>
+
+</li>
+
+</ol>
+
+</li>
+
+<li>
+Public Methods:
+
+
+<ol>
+<li>
+<a href = "#link3">Constructors, destructor, and related.
+</a>
+
+</li>
+
+</ol>
+
+</li>
+
+<li>
+Protected Methods:
+
+
+<ol>
+<li>
+<a href = "#link4">Offset methods.
+</a>
+
+</li>
+
+</ol>
+
+</li>
+
+</ol>
+
+
+<h2>
+<a name = "link1">Template parameters.
+</a>
+
+</h2>
+
+<table WIDTH = "100%" BORDER = "1">
+<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_Key_Ref3735929850">Const_Key_Ref</a></pre>
+
+
+</td>
+
+<td>
+<p>Const key reference type.</p>
+
+
+</td>
+
+<td>
+-
+
+
+</td>
+
+</tr>
+
+<tr>
+<td>
+<pre><a name = "Size_Type3735929483">Size_Type</a></pre>
+
+
+</td>
+
+<td>
+<p>Size type.</p>
+
+
+</td>
+
+<td>
+size_t
+
+
+</td>
+
+</tr>
+
+</table>
+
+<h2>
+<a name = "link2">General definitions.
+</a>
+
+</h2>
+
+<table WIDTH = "100%" BORDER = "1">
+<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_type3735929547">size_type</a></pre>
+
+
+</td>
+
+<td>
+<pre><a href = "#Size_Type3735929483">Size_Type</a></pre>
+
+
+</td>
+
+<td>
+<p>Size type.</p>
+
+
+</td>
+
+</tr>
+
+</table>
+
+<h2>
+<a name = "link3">Constructors, destructor, and related.
+</a>
+
+</h2>
+
+<table WIDTH = "100%" BORDER = "1">
+<TR><TD Width = "45%" ALIGN = "left"><b>Method</b></TD><TD Width = "55%" ALIGN = "left"><b>Description</b></TD></TR>
+
+
+<tr>
+<td>
+<pre><b>void</b>
+ swap
+ (<font color = "olive">linear_probe_fn</font> &amp;r_other)</pre>
+
+
+</td>
+
+<td>
+<p>Swaps content.</p>
+
+
+</td>
+
+</tr>
+
+</table>
+
+<h2>
+<a name = "link4">Offset methods.
+</a>
+
+</h2>
+
+<table WIDTH = "100%" BORDER = "1">
+<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> <a href = "#size_type3735929547">size_type</a>
+ <b>operator</b>()
+ (<a href = "#Const_Key_Ref3735929850">Const_Key_Ref</a> r_key,
+ <a href = "#size_type3735929547">size_type</a> i) <b>const</b></pre>
+
+
+</td>
+
+<td>
+<p>Returns the <font color = "#666666"><tt>i</tt></font>-th offset from the hash value.</p>
+
+
+</td>
+
+</tr>
+
+</table>
+
+
+
+</body>
+
+</html>
+
+
diff --git a/libstdc++-v3/docs/html/ext/pb_assoc/list_updates.html b/libstdc++-v3/docs/html/ext/pb_assoc/list_updates.html
new file mode 100644
index 00000000000..e45843b7922
--- /dev/null
+++ b/libstdc++-v3/docs/html/ext/pb_assoc/list_updates.html
@@ -0,0 +1,138 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
+<html>
+ <head>
+ <title>List Updates</title>
+ <meta name="GENERATOR" content="Microsoft Visual Studio .NET 7.1">
+ <meta name="vs_targetSchema" content="http://schemas.microsoft.com/intellisense/ie5">
+ </head>
+
+<body bgcolor = "white">
+
+<h1>List-Update Containers</h1>
+
+<p>
+ This section describes policies for list updates. It is organized as follows:
+</p>
+
+<ol>
+ <li> The <a href = "#general">General Terms</a> Subsection describes general
+ terms.
+ </li>
+ <li> The <a href = "#imp_pb_assoc">Implementation in <tt>pb_assoc</tt></a>
+ Subsection describes the implementation of these concepts in <tt>pb_assoc</tt>.
+ </li>
+</ol>
+
+
+<h2><a name = "general">General Terms</a></h2>
+
+<p>
+ Associative containers use some attributes of the keys of which they store: tree-based
+containers use the ability to compare keys; hash-based containers use the ability to map
+keys into numbers.
+</p>
+
+<p>
+ In the (rare) case where keys can only be checked for equivalence, these
+types of containers cannot be used. In such a case, storing the entries in a list is a reasonable solution.
+Clearly, the order of the elements within the list affects performance; ideally, frequently accessed elements
+should be at the front of the list.
+</p>
+
+<p>
+ Many remarkable (online competitive
+[<a href = "references.html#motwani95random">motwani95random</a>])
+algorithms exist for reordering lists to reflect access prediction
+[<a href = "references.html#andrew04mtf">andrew04mtf</a>]. Some of these algorithms require storing
+metadata with each key, while others do not. Some of these algorithms require only the ability to
+move an element to the front of the list, while others require the ability to interchange an element and
+its predecessor.
+</p>
+
+<p>
+ For example, Figure
+<a href = "#lu">-A
+The counter algorithm
+</a>
+shows the counter algorithm. Each node contains both a key and a count metadata (shown in bold).
+When an element is accessed (<i>e.g.</i> 6)
+its count is incremented, as shown in
+Figure
+<a href = "#lu">
+The counter algorithm
+</a>-B.
+If the count reaches some predetermined value, say 10, as shown in
+Figure
+<a href = "#lu">
+The counter algorithm
+</a>-C,
+the count is set to 0
+and the node is moved to the front of the list, as in
+Figure
+<a href = "#lu">
+The counter algorithm
+</a>-D.
+
+
+</p>
+
+<h6 align = "center">
+<a name = "lu">
+<img src = "lu.jpg" width = "65%">
+</a>
+</h6>
+<h6 align = "center">
+The counter algorithm.
+</h6>
+
+
+
+<h2><a name = "imp_pb_assoc">Implementation in <tt>pb_assoc</tt></a></h2>
+
+<p>
+ The <tt>pb_assoc</tt> library allows instantiating lists with policies
+implementing any algorithm moving nodes to the front of the list (policies implementing
+algorithms interchanging nodes are currently unsupported).
+</p>
+
+<p>
+ Associative containers based on lists are parameterized by a <tt>Update_Policy</tt> parameter.
+This parameter defines the type of metadata each node contains, how to create the metadata, and how to
+decide, using this metadata, whether to move a node to the front of the list.
+ A list-based associative container object derives (publicly) from its update policy.
+</p>
+
+<p>
+ An instantiation of <tt>Update_Policy</tt> must define internally <tt>update_metadata</tt> as the metadata
+it requires. Internally, each node of the list contains, besides the usual key and data, an instance
+of <tt><b>typename</b> Update_Policy::update_metadata</tt>.
+</p>
+
+<p>
+ An instantiation of <tt>Update_Policy</tt> must define internally two operators:
+</p>
+<pre>
+update_metadata
+ <b>operator</b>()
+ ();
+
+<b>bool</b>
+ <b>operator</b>()
+ (update_metadata &);
+</pre>
+
+<p>
+ The first is called by the container object, when creating a new node, to create the node's metadata. The
+second is called by the container object, when a node is accessed (<i>e.g.</i>, when a find operation's key
+is equivalent to the key of the node), to determine whether to move the node to the front of the list.
+</p>
+
+<p>
+ Additionally, the library contains implementations of the move-to-front and counter policies. These
+are described in
+<a href="interface.html#policy_classes">Policy Classes</a>.
+</p>
+
+</body>
+
+</html>
diff --git a/libstdc++-v3/docs/html/ext/pb_assoc/lu_assoc_cntnr.html b/libstdc++-v3/docs/html/ext/pb_assoc/lu_assoc_cntnr.html
new file mode 100644
index 00000000000..c9d0c75f1b0
--- /dev/null
+++ b/libstdc++-v3/docs/html/ext/pb_assoc/lu_assoc_cntnr.html
@@ -0,0 +1,570 @@
+
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
+
+
+<html>
+<head>
+<title>lu_assoc_cntnr Interface
+</title>
+
+</head>
+
+<body>
+<h1>
+<tt>lu_assoc_cntnr
+</tt>
+
+ Interface
+
+
+</h1>
+
+<p>A list-update based associative container.
+</p>
+
+<ol>
+<li>
+<a href = "../../../../include/ext/pb_assoc/assoc_cntnr.hpp"><tt>assoc_cntnr.hpp</tt>
+</a>
+
+</li>
+
+<li>
+<a href = "#link1">Template parameters.
+</a>
+
+</li>
+
+<li>
+<a href = "#link2">Base classes.
+</a>
+
+</li>
+
+<li>
+Public Types and Constants:
+
+
+<ol>
+<li>
+<a href = "#link3">Policy definitions.
+</a>
+
+</li>
+
+</ol>
+
+</li>
+
+<li>
+Public Methods:
+
+
+<ol>
+<li>
+<a href = "#link4">Constructors, destructor, and related.
+</a>
+
+</li>
+
+<li>
+<a href = "#link5">Policy access methods.
+</a>
+
+</li>
+
+</ol>
+
+</li>
+
+</ol>
+
+
+<h2>
+<a name = "link1">Template parameters.
+</a>
+
+</h2>
+
+<table WIDTH = "100%" BORDER = "1">
+<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 = "Key3735928856">Key</a></pre>
+
+
+</td>
+
+<td>
+<p>Key type.</p>
+
+
+</td>
+
+<td>
+-
+
+
+</td>
+
+</tr>
+
+<tr>
+<td>
+<pre><a name = "Data3735928937">Data</a></pre>
+
+
+</td>
+
+<td>
+<p>Data type.</p>
+
+
+</td>
+
+<td>
+-
+
+
+</td>
+
+</tr>
+
+<tr>
+<td>
+<pre><a name = "Eq_Fn3735929016">Eq_Fn</a></pre>
+
+
+</td>
+
+<td>
+<p>Equivalence functor.</p>
+
+
+</td>
+
+<td>
+<pre>std::equal_to&lt;<a href = "#Key3735928856">Key</a>&gt;</pre>
+
+
+</td>
+
+</tr>
+
+<tr>
+<td>
+<pre><a name = "Update_Policy3735929889">Update_Policy</a></pre>
+
+
+</td>
+
+<td>
+<p>Update policy (determines when an element will be moved to the front of the list.</p>
+
+
+</td>
+
+<td>
+<a href = "move_to_front_update_policy.html"><tt>move_to_front_update_policy</tt></a>
+
+
+</td>
+
+</tr>
+
+<tr>
+<td>
+<pre><a name = "Allocator3735929488">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">Base classes.
+</a>
+
+</h2>
+
+<table WIDTH = "100%" BORDER = "1">
+<TR><TD Width = "80%" ALIGN = "left"><b>Class</b></TD><TD Width = "20%" ALIGN = "left"><b>Derivation Type</b></TD></TR>
+
+
+<tr>
+<td>
+<pre><a href = "#Update_Policy3735929889">Update_Policy</a></pre>
+
+
+</td>
+
+<td>
+<p>public</p>
+
+
+</td>
+
+</tr>
+
+</table>
+
+<h2>
+<a name = "link3">Policy definitions.
+</a>
+
+</h2>
+
+<table WIDTH = "100%" BORDER = "1">
+<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 = "eq_fn3735929080">eq_fn</a></pre>
+
+
+</td>
+
+<td>
+<pre><a href = "#Eq_Fn3735929016">Eq_Fn</a></pre>
+
+
+</td>
+
+<td>
+<p>Equivalence functor type.</p>
+
+
+</td>
+
+</tr>
+
+<tr>
+<td>
+<pre><a name = "allocator3735929520">allocator</a></pre>
+
+
+</td>
+
+<td>
+<pre><a href = "#Allocator3735929488">Allocator</a></pre>
+
+
+</td>
+
+<td>
+<p>Allocator type.</p>
+
+
+</td>
+
+</tr>
+
+<tr>
+<td>
+<pre><a name = "update_policy3735929953">update_policy</a></pre>
+
+
+</td>
+
+<td>
+<pre><a href = "#Update_Policy3735929889">Update_Policy</a></pre>
+
+
+</td>
+
+<td>
+<p>List update policy type.</p>
+
+
+</td>
+
+</tr>
+
+</table>
+
+<h2>
+<a name = "link4">Constructors, destructor, and related.
+</a>
+
+</h2>
+
+<table WIDTH = "100%" BORDER = "1">
+<TR><TD Width = "45%" ALIGN = "left"><b>Method</b></TD><TD Width = "55%" ALIGN = "left"><b>Description</b></TD></TR>
+
+
+<tr>
+<td>
+<pre> lu_assoc_cntnr
+ ()</pre>
+
+
+</td>
+
+<td>
+<p>Default constructor.</p>
+
+
+</td>
+
+</tr>
+
+<tr>
+<td>
+<pre> lu_assoc_cntnr
+ (<b>const</b> <a href = "#Eq_Fn3735929016">Eq_Fn</a> &amp;r_eq_fn)</pre>
+
+
+</td>
+
+<td>
+<p>Constructor taking some policy objects. <font color = "#666666"><tt>r_eq_fn</tt></font> will be copied by the <a href = "#Eq_Fn3735929016"><tt>Eq_Fn</tt></a> object of the container object.</p>
+
+
+</td>
+
+</tr>
+
+<tr>
+<td>
+<pre> lu_assoc_cntnr
+ (<b>const</b> <a href = "#Eq_Fn3735929016">Eq_Fn</a> &amp;r_eq_fn,
+ <b>const</b> <a href = "#Update_Policy3735929889">Update_Policy</a> &amp;r_update_policy)</pre>
+
+
+</td>
+
+<td>
+<p>Constructor taking some policy objects. <font color = "#666666"><tt>r_eq_fn</tt></font> will be copied by the <a href = "#Eq_Fn3735929016"><tt>Eq_Fn</tt></a> object of the container object, and <font color = "#666666"><tt>r_update_policy</tt></font> will be copied by the <a href = "#Update_Policy3735929889"><tt>Update_Policy</tt></a> object of the container object.</p>
+
+
+</td>
+
+</tr>
+
+<tr>
+<td>
+<pre><b>template</b>&lt;<b>class</b> It&gt;
+ lu_assoc_cntnr
+ (It first_it, It last_it)</pre>
+
+
+</td>
+
+<td>
+<p>Constructor taking iterators to a range of value_types. The value_types between <font color = "#666666"><tt>first_it</tt></font> and <font color = "#666666"><tt>last_it</tt></font> will be inserted into the container object.</p>
+
+
+</td>
+
+</tr>
+
+<tr>
+<td>
+<pre><b>template</b>&lt;<b>class</b> It&gt;
+ lu_assoc_cntnr
+ (It first_it, It last_it,
+ <b>const</b> <a href = "#Eq_Fn3735929016">Eq_Fn</a> &amp;r_eq_fn)</pre>
+
+
+</td>
+
+<td>
+<p>Constructor taking iterators to a range of value_types and some policy objects. The value_types between <font color = "#666666"><tt>first_it</tt></font> and <font color = "#666666"><tt>last_it</tt></font> will be inserted into the container object.</p>
+
+
+</td>
+
+</tr>
+
+<tr>
+<td>
+<pre><b>template</b>&lt;<b>class</b> It&gt;
+ lu_assoc_cntnr
+ (It first_it, It last_it,
+ <b>const</b> <a href = "#Eq_Fn3735929016">Eq_Fn</a> &amp;r_eq_fn,
+ <b>const</b> <a href = "#Update_Policy3735929889">Update_Policy</a> &amp;r_update_policy)</pre>
+
+
+</td>
+
+<td>
+<p>Constructor taking iterators to a range of value_types and some policy objects. The value_types between <font color = "#666666"><tt>first_it</tt></font> and <font color = "#666666"><tt>last_it</tt></font> will be inserted into the container object.</p>
+
+
+</td>
+
+</tr>
+
+<tr>
+<td>
+<pre> lu_assoc_cntnr
+ (<b>const</b> <font color = "olive">lu_assoc_cntnr</font> &amp;r_other)</pre>
+
+
+</td>
+
+<td>
+<p>Copy constructor.</p>
+
+
+</td>
+
+</tr>
+
+<tr>
+<td>
+<pre><b>virtual</b>
+ ~lu_assoc_cntnr
+ ()</pre>
+
+
+</td>
+
+<td>
+<p>Destructor.</p>
+
+
+</td>
+
+</tr>
+
+<tr>
+<td>
+<pre><font color = "olive">lu_assoc_cntnr</font> &amp;
+ <b>operator</b>=
+ (<b>const</b> <font color = "olive">lu_assoc_cntnr</font> &amp;r_other)</pre>
+
+
+</td>
+
+<td>
+<p>Assignment operator.</p>
+
+
+</td>
+
+</tr>
+
+<tr>
+<td>
+<pre><b>void</b>
+ swap
+ (<font color = "olive">lu_assoc_cntnr</font> &amp;r_other)</pre>
+
+
+</td>
+
+<td>
+<p>Swaps content.</p>
+
+
+</td>
+
+</tr>
+
+</table>
+
+<h2>
+<a name = "link5">Policy access methods.
+</a>
+
+</h2>
+
+<table WIDTH = "100%" BORDER = "1">
+<TR><TD Width = "45%" ALIGN = "left"><b>Method</b></TD><TD Width = "55%" ALIGN = "left"><b>Description</b></TD></TR>
+
+
+<tr>
+<td>
+<pre><a href = "#eq_fn3735929080">eq_fn</a> &amp;
+ get_eq_fn
+ ()</pre>
+
+
+</td>
+
+<td>
+<p>Access to the <a href = "#eq_fn3735929080"><tt>eq_fn</tt></a> object.</p>
+
+
+</td>
+
+</tr>
+
+<tr>
+<td>
+<pre><b>const</b> <a href = "#eq_fn3735929080">eq_fn</a> &amp;
+ get_eq_fn
+ () <b>const</b></pre>
+
+
+</td>
+
+<td>
+<p>Const access to the <a href = "#eq_fn3735929080"><tt>eq_fn</tt></a> object.</p>
+
+
+</td>
+
+</tr>
+
+<tr>
+<td>
+<pre><a href = "#update_policy3735929953">update_policy</a> &amp;
+ get_update_policy
+ ()</pre>
+
+
+</td>
+
+<td>
+<p>Access to the <a href = "#update_policy3735929953"><tt>update_policy</tt></a> object.</p>
+
+
+</td>
+
+</tr>
+
+<tr>
+<td>
+<pre><b>const</b> <a href = "#update_policy3735929953">update_policy</a> &amp;
+ get_update_policy
+ () <b>const</b></pre>
+
+
+</td>
+
+<td>
+<p>Const access to the <a href = "#update_policy3735929953"><tt>update_policy</tt></a> object.</p>
+
+
+</td>
+
+</tr>
+
+</table>
+
+
+
+</body>
+
+</html>
+
+
diff --git a/libstdc++-v3/docs/html/ext/pb_assoc/lu_based_containers.html b/libstdc++-v3/docs/html/ext/pb_assoc/lu_based_containers.html
new file mode 100644
index 00000000000..4ee23f4f27d
--- /dev/null
+++ b/libstdc++-v3/docs/html/ext/pb_assoc/lu_based_containers.html
@@ -0,0 +1,225 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
+<html>
+ <head>
+ <title>List Updates</title>
+ <meta name="GENERATOR" content="Microsoft Visual Studio .NET 7.1">
+ <meta name="vs_targetSchema" content="http://schemas.microsoft.com/intellisense/ie5">
+ </head>
+
+<body bgcolor = "white">
+
+<h1>List-Update Containers</h1>
+
+
+<p>
+ This section describes list-based containers. It is organized as follows.
+</p>
+
+<ol>
+ <li> <a href = "#overview">Overview</a> is an overview.</li>
+ <li> <a href = "#list_updates">List Updates</a> describes updating lists
+as elements are accessed.</li>
+</ol>
+
+
+<h2><a name = "overview">Overview</a></h2>
+
+<p>
+ Associative containers typically use some attributes of the keys of which they store: tree-based
+containers use the ability to compare keys; hash-based containers use the ability to map
+keys into numbers.
+</p>
+
+<p>
+ In some cases it is better to avoid this:
+</p>
+
+<ol>
+ <li>
+ Hash-based and tree-based containers typically require additional memory
+ for time efficiency.
+ </li>
+ <li>
+ Hash-based and tree-based containers require extra information
+ about keys: hash-based containers need hash functors, tree-based containers need
+ comparison functors. In some (rare) cases, a key might be encapsulated to the extent that it is not possible to supply these functors.
+ </li>
+</ol>
+
+<p>
+ In such cases, storing the entries in a unique-key list is a reasonable solution.
+This uses the minimal amount of memory, and requires only an equivalence functor.
+Clearly, the order of the elements within the list affects performance; ideally, frequently accessed elements
+should be at the front of the list.
+</p>
+
+<p>
+ Many remarkable (online competitive
+[<a href = "references.html#motwani95random">motwani95random</a>])
+algorithms exist for reordering lists to reflect access prediction
+[<a href = "references.html#andrew04mtf">andrew04mtf</a>].
+</p>
+
+<p>
+ Figure
+<a href = "#lu_cd">List-update containers</a>
+ shows the container-hierarchy; the list-based container is circled.
+</p>
+
+<h6 align = "center">
+<a name = "lu_cd">
+<img src = "lu_cd.jpg" width = "70%" alt = "no image">
+</h6>
+<h6 align = "center">
+</a>
+List-update containers.
+</h6>
+
+
+<p>
+ The list-based container has the following declaration:
+</p>
+
+<pre>
+<b>template</b>&lt;
+ <b>typename</b> Key,
+ <b>typename</b> Data,
+ <b>class</b> Eq_Fn = std::equal_to&lt;Key&gt;,
+ <b>class</b> Update_Policy =
+ <a href = "move_to_front_lu_policy.html">move_to_front_lu_policy&lt;&gt;</a>,
+ <b>class</b> Allocator =
+ std::allocator&lt;<b>char</b>&gt; &gt;
+<b>class</b> <a href = "lu_assoc_cntnr.html">lu_assoc_cntnr</a>;
+</pre>
+
+
+<p>
+ The parameters have the following meaning:
+</p>
+<ol>
+ <li> <tt>Key</tt> is the key type.
+ </li>
+ <li> <tt>Data</tt> is the data-policy, and is explained in
+<a href = "ms_gen.html#ds_policy">Mapping-Semantics Genericity::Data Types as a Policy</a>.
+ </li>
+ <li> <tt>Eq_Fn</tt> is a key equivalence functor.</li>
+ <li> <tt>Update_Policy</tt> is a policy updating
+ positions in the list based on access patterns. It is described in
+ the following subsection.
+ </li>
+ <li> <tt>Allocator</tt> is (surprisingly) an allocator type.
+ </li>
+</ol>
+
+
+
+
+
+<h2><a name = "list_updates">List Updates</a></h2>
+
+<p>
+ This subsection describes list-update policies. It is organized as follows.
+</p>
+
+<ol>
+ <li> <a href = "#general">General Terms</a> describes general
+ terms.
+ </li>
+ <li> <a href = "#imp_pb_assoc">Implementation in <tt>pb_assoc</tt></a>
+ describes the implementation of these concepts in <tt>pb_assoc</tt>.
+ </li>
+</ol>
+
+
+
+
+<h3><a name = "general">General Terms</a></h3>
+
+
+<p>
+ For example, Figure
+<a href = "#lu">-A
+The counter algorithm
+</a>
+shows the counter algorithm. Each node contains both a key and a count metadata (shown in bold).
+When an element is accessed (<i>e.g.</i> 6)
+its count is incremented, as shown in
+Figure
+<a href = "#lu">
+The counter algorithm
+</a>-B.
+If the count reaches some predetermined value, say 10, as shown in
+Figure
+<a href = "#lu">
+The counter algorithm
+</a>-C,
+the count is set to 0
+and the node is moved to the front of the list, as in
+Figure
+<a href = "#lu">
+The counter algorithm
+</a>-D.
+
+
+</p>
+
+<h6 align = "center">
+<a name = "lu">
+<img src = "lu.jpg" width = "65%">
+</a>
+</h6>
+<h6 align = "center">
+The counter algorithm.
+</h6>
+
+
+
+<h3><a name = "imp_pb_assoc">Implementation in <tt>pb_assoc</tt></a></h3>
+
+<p>
+ The <tt>pb_assoc</tt> library allows instantiating lists with policies
+implementing any algorithm moving nodes to the front of the list (policies implementing
+algorithms interchanging nodes are currently unsupported).
+</p>
+
+<p>
+ Associative containers based on lists are parameterized by a <tt>Update_Policy</tt> parameter.
+This parameter defines the type of metadata each node contains, how to create the metadata, and how to
+decide, using this metadata, whether to move a node to the front of the list.
+ A list-based associative container object derives (publicly) from its update policy.
+</p>
+
+<p>
+ An instantiation of <tt>Update_Policy</tt> must define internally <tt>update_metadata</tt> as the metadata
+it requires. Internally, each node of the list contains, besides the usual key and data, an instance
+of <tt><b>typename</b> Update_Policy::update_metadata</tt>.
+</p>
+
+<p>
+ An instantiation of <tt>Update_Policy</tt> must define internally two operators:
+</p>
+<pre>
+update_metadata
+ <b>operator</b>()
+ ();
+
+<b>bool</b>
+ <b>operator</b>()
+ (update_metadata &);
+</pre>
+
+<p>
+ The first is called by the container object, when creating a new node, to create the node's metadata. The
+second is called by the container object, when a node is accessed (<i>e.g.</i>, when a find operation's key
+is equivalent to the key of the node), to determine whether to move the node to the front of the list.
+</p>
+
+<p>
+ Additionally, the library contains implementations of the move-to-front and counter policies. These
+are described in
+<a href="interface.html#policy_classes">Policy Classes</a>.
+</p>
+
+</body>
+
+</html>
diff --git a/libstdc++-v3/docs/html/ext/pb_assoc/lu_cd.jpg b/libstdc++-v3/docs/html/ext/pb_assoc/lu_cd.jpg
new file mode 100644
index 00000000000..c69cdc5348e
--- /dev/null
+++ b/libstdc++-v3/docs/html/ext/pb_assoc/lu_cd.jpg
Binary files differ
diff --git a/libstdc++-v3/docs/html/ext/pb_assoc/lu_ds_tag.html b/libstdc++-v3/docs/html/ext/pb_assoc/lu_ds_tag.html
new file mode 100644
index 00000000000..e906de7e5f9
--- /dev/null
+++ b/libstdc++-v3/docs/html/ext/pb_assoc/lu_ds_tag.html
@@ -0,0 +1,74 @@
+
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
+
+
+<html>
+<head>
+<title>lu_ds_tag Interface
+</title>
+
+</head>
+
+<body>
+<h1>
+<tt>lu_ds_tag
+</tt>
+
+ Interface
+
+
+</h1>
+
+<p>List-update data-structure tag.
+</p>
+
+<ol>
+<li>
+<a href = "../../../../include/ext/pb_assoc/ds_trait.hpp"><tt>ds_trait.hpp</tt>
+</a>
+
+</li>
+
+<li>
+<a href = "#link1">Base classes.
+</a>
+
+</li>
+
+</ol>
+
+
+<h2>
+<a name = "link1">Base classes.
+</a>
+
+</h2>
+
+<table WIDTH = "100%" BORDER = "1">
+<TR><TD Width = "80%" ALIGN = "left"><b>Class</b></TD><TD Width = "20%" ALIGN = "left"><b>Derivation Type</b></TD></TR>
+
+
+<tr>
+<td>
+<pre><a href = "basic_ds_tag.html"><tt>basic_ds_tag</tt></a></pre>
+
+
+</td>
+
+<td>
+<p>public</p>
+
+
+</td>
+
+</tr>
+
+</table>
+
+
+
+</body>
+
+</html>
+
+
diff --git a/libstdc++-v3/docs/html/ext/pb_assoc/lu_ops.jpg b/libstdc++-v3/docs/html/ext/pb_assoc/lu_ops.jpg
new file mode 100644
index 00000000000..fa26e84d987
--- /dev/null
+++ b/libstdc++-v3/docs/html/ext/pb_assoc/lu_ops.jpg
Binary files differ
diff --git a/libstdc++-v3/docs/html/ext/pb_assoc/mmap_value_utils.html b/libstdc++-v3/docs/html/ext/pb_assoc/mmap_value_utils.html
new file mode 100644
index 00000000000..dd0846ea62a
--- /dev/null
+++ b/libstdc++-v3/docs/html/ext/pb_assoc/mmap_value_utils.html
@@ -0,0 +1,128 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
+<HTML>
+<HEAD>
+ <TITLE>Multimap Value-Type Utilities</TITLE>
+ <META NAME="Generator" content="Microsoft Visual Studio .NET 7.1">
+</HEAD>
+<BODY>
+
+<H1>Multimap Value-Type Utilities</H1>
+
+<p>
+ In <tt>pb_assoc</tt>, associative containers have a unique-key design.
+Multimaps, consequently are maps of sets, <i>e.g.</i>,
+a <a href = "cc_ht_multimap.html"><tt>cc_ht_multimap</a>&lt;<b>int</b>, <b>char</b>&gt;</tt>
+object maps <tt><b>int</b></tt>s to sets of <tt><b>char</b></tt>s.
+ It is often convenient to perform
+value-type operations on multimaps, <i>e.g.</i>, in this case, to find a specific
+<tt>std::pair&lt;<b>int</b>, <b>char</b>&gt;</tt> object (say, <tt>std::make_pair(2, 'b')</tt>)
+in a multimap object. These types of operations involve typically two steps: in the
+first step, some operation is performed on the multimap object itself, and in the second
+step, some operation is performed on the multimap's pertinent set object.
+(This is true for the STL's multimaps as well, except that the "set" is an implicit
+list.)
+</p>
+
+<p>
+ Coding these two-step operations is repetitious and error prone.
+ <tt>pb_assoc</tt> containers already maintain the invariant that they support
+a value-type method for any mapped-value-type method they support
+(hence any multimap of the above type supporsts a method for inserting
+ <tt>std::make_pair(2, 'b')</tt>). Following are some utility functions for
+ other common operations.
+</p>
+
+
+<pre>
+<b>template</b>&lt;
+ <b>class</b> MMap_Cntnr&gt;
+<b>inline</b> std::pair&lt;
+ <b>typename</b> MMap_Cntnr::mapped_data_type::find_iterator,
+ <b>bool</b>&gt;
+ mmap_value_find
+ (<b>const</b> MMap_Cntnr &r_mmap_cntnr,
+ <b>typename</b> MMap_Cntnr::const_reference r_val);
+</pre>
+
+<p>
+ Finds the (const reference to a) value-type
+<font color = "#666666"><tt>r_val</tt></font> in
+the multimap object
+<font color = "#666666"><tt>r_mmap_cntnr</tt></font>.
+</p>
+<p>
+ It
+returns a pair whose first entry is a find-type iterator
+of the multimap's set type, and whose second entry is a boolean
+indicating whether the value type was found (only in this
+case is the first entry in the pair valid).
+</p>
+
+<pre>
+<b>template</b>&lt;
+ <b>class</b> MMap_Cntnr&lt;
+<b>inline</b> <b>typename</b> MMap_Cntnr::size_type
+ mmap_value_erase
+ (MMap_Cntnr &r_mmap_cntnr,
+ <b>typename</b> MMap_Cntnr::const_reference r_val,
+ <b>bool</b> erase_entry_if_last);
+</pre>
+
+<p>
+ Transactionally erases the (const reference to the) value-type
+<font color = "#666666"><tt>r_val</tt></font> from
+the multimap object
+<font color = "#666666"><tt>r_mmap_cntnr</tt></font>, and
+erases the mapped value type
+with
+<font color = "#666666"><tt>r_val</tt></font>'s key
+if there are no more value types with this given key
+and
+<font color = "#666666"><tt>erase_entry_if_last</tt></font> <tt>= <b>true</b></tt>.
+<p>
+</p>
+ It
+returns 1 if a value type was actually erased, or 0 otherwise.
+</p>
+
+<pre>
+<b>template</b>&lt;
+ <b>class</b> MMap_Cntnr&gt;
+<b>inline</b> std::pair&lt;
+ <b>typename</b> MMap_Cntnr::mapped_data_type::find_iterator,
+ <b>bool</b>>
+ mmap_value_replace
+ (MMap_Cntnr &r_mmap_cntnr,
+ <b>typename</b> MMap_Cntnr::const_reference r_val,
+ <b>typename</b> MMap_Cntnr::const_data_reference r_data);
+</pre>
+
+<p>
+ Transactionally erases
+<font color = "#666666"><tt>r_val</tt></font>
+from
+<font color = "#666666"><tt>r_mmap_cntnr</tt></font>
+(if it such a value type exists) and
+inserts instead a value type whose key is
+<font color = "#666666"><tt>r_val</tt></font><tt>.first</tt>
+and whose data is
+<font color = "#666666"><tt>r_data</tt></font>.
+</p>
+<p>
+<p>
+ It
+returns a pair whose first entry is a find-type iterator
+of the multimap's set type, and whose second entry is a boolean
+indicating whether the new value type was inserted
+(it might have
+existed previously).
+</p>
+
+<p>
+(If the multimap type or its set type do not guarantee exception free
+erases, <tt>mmap_value_erase</tt> and <tt>mmap_value_replace</tt> will
+invalidate pointers, references, and iterators).
+</p>
+
+</BODY>
+</HTML>
diff --git a/libstdc++-v3/docs/html/ext/pb_assoc/motivation.html b/libstdc++-v3/docs/html/ext/pb_assoc/motivation.html
new file mode 100644
index 00000000000..11eca4a421f
--- /dev/null
+++ b/libstdc++-v3/docs/html/ext/pb_assoc/motivation.html
@@ -0,0 +1,281 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
+<html>
+ <head>
+ <title>Motivation</title>
+ <meta name="GENERATOR" content="Microsoft Visual Studio .NET 7.1">
+ <meta name="vs_targetSchema" content="http://schemas.microsoft.com/intellisense/ie5">
+ </head>
+<body bgcolor = "white">
+<h1>Motivation</h1>
+
+<p>
+ The <a href = "introduction.html">Introduction</a> Section described some challenges
+in designing associative containers. This section describes the STL's solution and motivation for an alternative solution. It is organized as follows.
+</p>
+
+<ol>
+ <li> <a href = "#stl">The STL's Associative-Container Design</a>
+ briefly describes the STL's solution.
+ </li>
+ <li> <a href = "#policies">Choice of Policies</a> discusses possible additional policies by which to parameterize data structures.
+ </li>
+ <li> <a href = "#ds_genericity">Data-Structure Genericity</a> discusses possible problems with generic manipulation of containers based on different underlying data-structures.
+ </li>
+ <li> <a href = "#mapping_semantics">Mapping Semantics</a> discusses scalability issues with the STL's non-unique-mapping associative containers.
+ </li>
+ <li> <a href = "#methods">Choice of Methods</a> discusses some reservations with the choice of methods in the STL.
+ </li>
+</ol>
+
+<h2><a name = "stl">The STL's Associative-Container Design</a></h2>
+
+<p>
+ The STL (or its extensions) currently offer associative containers based on underlying red-black trees or collision-chaining hash tables. For association, containers based on trees are parameterized by a comparison functor, and containers based on hash tables are parameterized by a hash functor and an equivalence functor.
+</p>
+
+<p>
+ For each underlying data-structure, the STL offers four containers with different mapping semantics. A map-type uniquely maps each key to some datum, a set-type stores uniquely keys, a multimap-type non-uniquely maps each key to some datum, and a multiset-type non-uniquely stores keys.
+</p>
+
+<p>
+ Containers contain various iterator-based methods. <i>E.g.</i>, all containers have constructors taking a pair of iterators, and transactionally construct an object containing all elements in the iterators' range. Additionally, it is possible to (non-transactionally) insert a range given by iterators, or erase such a range. Other methods are implicitly range-based, <i>e.g.</i>, it is possible to test the equivalence of two associative container objects via <tt><b>operator</b>==</tt>.
+</p>
+
+<h2><a name = "policies">Choice of Policies</a></h2>
+
+<p>
+ In order to function efficiently in various settings, associative containers require
+a wide variety of policies.
+</p>
+
+<p>
+ For example, a hash policy instructs how to transform a key object into some non-negative integral type; <i>e.g.</i>, a hash functor might transform <tt>"hello"</tt> into <tt>1123002298</tt>. A hash table, though, requires transforming each key object into some non-negative integral type in some specific domain; <i>e.g.</i>, a hash table with 128 entries might transform the <tt>"hello"</tt> into position 63. The policy by which the hash value is transformed into a position within the table can dramatically affect performance.
+</p>
+
+<p>
+ Additionally, most hash-table algorithms encounter collisions. To mitigate the cost of these collisions, it sometimes is beneficial to store the hash value along with each element
+[<a href = "references.html#clrs2001">clrs2001</a>, <a href = "references.html#austern01htprop">austern01htprop</a>]. While this improves performance for complex keys, it hampers performance for simple keys, and is best left as a policy.
+</p>
+
+<p>
+ Tree-based containers allow reasonable access while maintaining order between elements. In some cases, however, tree-based containers can be used for additional purposes. <i>E.g.</i>,consider Figure
+<a href = "#interval_invariants">
+Sets of line intervals
+</a>-A,
+which shows
+an example of a tree-based set storing
+half-open geometric line intervals. An <tt>std::set</tt> with this
+structure can efficiently answer whether <i>[20, 101)</i> is in the
+set, but it cannot efficiently answer whether any interval in the
+set overlaps <i>[20, 101)</i>, nor can it efficiently enumerate all
+intervals overlapping <i>[20, 101)</i>. A well-known augmentation to
+balanced trees can support efficient answers to such questions
+[<a href = "references.html#clrs2001">clrs2001</a>]. Namely,
+an invariant should be maintained whereby
+each node should contain also the
+maximal endpoint of any interval within its subtree, as in Figure
+<a href = "#interval_invariants">
+Sets of line intervals
+</a>-B. In order to maintain this ivariant, though, an invariant-restoring policy is
+required.
+</p>
+
+<h6 align = "center">
+<a name = "interval_invariants">
+<img src = "interval_node_invariants.jpg" width = "70%" alt = "no image">
+</a>
+</h6>
+<h6 align = "center">
+Sets of line intervals.
+</h6>
+
+
+<h2><a name = "ds_genericity">Data-Structure Genericity</a></h2>
+
+<p>
+ Consider a generic function manipulating an associative container, <i>e.g.</i>,
+</p>
+
+<pre>
+<b>template</b>&lt;
+ <b>class</b> Cntnr&gt;
+<b>int</b> some_op_sequence
+ (Cntnr &r_cnt)
+{
+ ...
+}
+</pre>
+
+<p>
+ The underlying data structure affects what the function can do with the container object.
+</p>
+
+<p>
+ For example, if <tt>Cntnr</tt> is <tt>std::map</tt>, then the function can
+use <tt>std::for_each(r_cnt.find(foo), r_cnt.find(bar), foobar)</tt>
+in order to apply <tt>foobar</tt> to all elements between <tt>foo</tt>
+and <tt>bar</tt>. If <tt>Cntnr</tt> is a hash-based container, then this call's results are undefined.
+</p>
+
+<p>
+ Also, if <tt>Cntnr</tt> is tree-based, the type and object of the comparison functor
+can be accessed. If <tt>Cntnr</tt> is hash based, these queries are nonsensical</p>
+
+<p>
+ These types of problems are excaberated when considering the wide variety of useful underlying data-structures. Figure
+<a href = "#different_underlying_data_structures">Different underlying data structures</a>
+shows different underlying data-structures (the ones
+currently supported in <tt>pb_assoc</tt>). A shows a collision-chaining hash-table; B shows a probing hash-table; C shows a red-black tree; D shows a splay tree; E shows a tree based on an ordered vector (the tree is implicit in the order of the elements); E shows a list-based container with update policies.
+</p>
+
+<h6 align = "center">
+<a name = "different_underlying_data_structures">
+<img src = "different_underlying_dss.jpg" width = "70%" alt = "no image">
+</a>
+</h6>
+<h6 align = "center">
+Different underlying data structures.
+</h6>
+
+<p>
+ These underlying data structures display different behavior. For one, they can be queried for different policies. Furthermore:
+</p>
+<ol>
+ <li>
+ Containers based on C, D, and E store eleents in a meaningful order; the others store elements in a meaningless (and probably time-varying) order. As a futher consequence, containers based on C, D, and E can support erase operations taking an iterator and returning an iterator to the following element; the others cannot.
+ </li>
+ <li>
+ Containers based on C, D, and E can be split and joined efficiently, while the others cannot. Containers based on C and D, futhermore, can guarantee that this is exception-free; containers based on E cannot guarantee this.
+ </li>
+ <li>
+ Containers based on all but E can guarantee that erasing an element is exception free; containers based on E cannot guarantee this. Containers based on all but B and E can guarantee that modifying an object of their type does not invalidate iterators or references to their elements, while contianers based on B and E cannot. Containers based on C, D, and E can futhermore make a stronger guarantee, namely that modifiying an object of their type does not affect the relation of iterators.
+ </li>
+</ol>
+
+<p>
+ A unified tag and traits system (as used for the STL's iterators, for example) can ease generic manipulation of associative containers based on different underlying data-structures.
+</p>
+
+<h2><a name = "mapping_semantics">Mapping Semantics</a></h2>
+
+ <p>
+ In some cases, map and set semantics are inappropriate. <i>E.g.</i>, consider
+an application monitoring user activity. Such an application might be designed to track a user, the machine(s) to which the user is logged, application(s) the user is running on the machine, and the start time of the application. In this case, since a user might run more than a single application, there can be no unique mapping from a user to specific datum.
+ </p>
+
+<p>
+ The STL's non-unique mapping containers (<i>e.g.</i>,
+<tt>std::multimap</tt> and <tt>std::multiset</tt>) can be used
+in this case. These types of containers can store store two or more equivalent, non-identical keys [<a href = "references.html#kleft00sets">kleft00sets</a>]. Figure
+<a href = "#embedded_lists_1">Non-unique mapping containers in the STL's design</a> shows possible structures of STL tree-based and hash-based containers, multisets, respectively; in this figure, equivalent-key nodes share the same shading.
+</p>
+
+<h6 align = "center">
+<a name = "embedded_lists_1">
+<img src = "embedded_lists_1.jpg" width = "70%" alt = "no image">
+</a>
+</h6>
+<h6 align = "center">
+Non-unique mapping containers in the STL's design.
+</h6>
+
+<p>
+ This design has several advantages. Foremost, it allows maps and multimaps, and sets and multisets, to share the same <tt>value_type</tt>, easing generic manipulation of containers with different mapping semantics.
+</p>
+
+
+<p>
+ Conversely, this design has possible scalability drawbacks, due to an implicit "embedding" of linked lists.
+Figure
+<a href = "#embedded_lists_2">
+Embedded lists in STL multimaps
+</a>-A shows a tree with shaded nodes sharing equivalent keys;
+Figure
+<a href = "#embedded_lists_2">
+Embedded lists in STL multimaps
+</a>-A explicitly shows the linked lists implicit in Figure
+<a href = "#embedded_lists_1">Non-unique mapping containers in the STL's design</a>. The drawbacks are the following.
+</p>
+
+<ol>
+ <li> As mentioned before, there are several underlying data-structures, each with its set of tradeoffs.
+The STL's design uses an associative linked-list to store all elements with equivalent primary
+key (<i>e.g.</i>, users). Searching for a secondary key (<i>e.g.</i>,
+a process) is inherently linear. While this works reasonably well when the number of distinct secondary
+keys is small, it does not scale well.
+ </li>
+ <li> Embedding linked lists can cause the entire structure to be inefficient.
+<i>E.g.</i>, Figure
+<a href = "#embedded_lists_1">
+Effect of embedded lists in STL multimaps
+</a>-A
+ shows a tree with several shaded nodes containing equivalent keys; note how unbalanced
+this tree would seem when considering all shaded nodes to be a single node.
+Figure
+<a href = "#embedded_lists_1">
+Effect of embedded lists in STL multimaps
+</a>-B shows a hash table with several shaded nodes containing equivalent keys; note
+that this can lengthen the search for other nodes as well.
+ </li>
+ <li> Embdedding linked lists is only possible for some data structures.
+Some data structures, <i>e.g.</i>, probing-hash tables, linear hash tables,
+and extendible hash tables, cannot support it.
+ </li>
+ <li> The embedded linked list design forgoes the abilitiy to treat
+all elements with the same primary key as a single entity. The ability to
+efficiently simultaneously insert (or erase) a larger number of elements with
+the same primary key is lost; the ability to utilize segmented iterators is lost
+[<a href = "references.html#austern98segmented">austern98segmented</a>].
+ </li>
+ <li> The linked-list design uses much space. For one, in the above example, the data identifying will must be duplicated for each application run by the user. Furthermore, the "links" in the linked list are supplied by the underlying data structure. In the case of tree-based containers, for example, the linked list utilizes the fact that each tree node contains pointers to its parent and its children; given that the order of equivalent keys is meaningless, the number of pointers exceeds the functionality supplied by a linked list.
+ </li>
+</ol>
+
+<h6 align = "center">
+<a name = "embedded_lists_2">
+<img src = "embedded_lists_2.jpg" width = "70d" alt = "no image">
+</a>
+</h6>
+<h6 align = "center">
+Embedded lists in STL multimaps.
+</h6>
+
+
+<h2><a name = "methods">Choice of Methods</a></h2>
+
+<p>
+ [<a href = "references.html#meyers02both">meyers02both</a>] points out
+that a class's methods should comprise only operations which depend on the class's internal structure; other operations are best designed as external functions. Possibly, therefore, the STL's associative containers lack some useful methods, and provide some redundant methods.
+</p>
+
+<ol>
+ <li>
+ Possibly missing methods:
+ </li>
+ <ol>
+ <li>
+ It is well-known that tree-based container objects can be efficiently split or joined
+ [<a href = "references.html#clrs2001">clrs2001</a>]. Externally splitting or joining trees is super-linear, and, furthermore, can throw exceptions. Split and join methods, consequently, seem good choices for tree-based container methods.
+ </li>
+ <li>
+ Suppose all elements which match a certain criteria need to be erased from an
+unordered container object, <i>e.g.</i>, all elements whos keys are in a given range. Externally erasing them from the container object is super-linear, since erasing an element might reorder all iterators. Conditional erasing, therefore, seems a good choice for associative containers.
+ </li>
+ </ol>
+ <li> Possibly redundant methods:</li>
+ <ol>
+ <li>
+ STL associative containers provide methods for inserting a range of elements given by a pair of iterators. At best, this can be implemented as an external function, or, even more efficiently, as a join operation (for the case of tree-based containers). Moreover, these methods seem similar to constructors taking a range given by a pair of iterators; the constructors, however, are transactional, whereas the insert methods are not; this is possibly confusing.
+ </li>
+ <li>
+ STL associative containers provide methods for erasing a range of elements given by a pair of iterators. At best, this can be implemented as an external function, or, even more efficiently, as a (small) sequence of split and join operations (for the case of tree-based containers). Moreover, the results of erasing a range is undefined for the case of containers based on unordered data-structures.
+ </li>
+ <li>
+ Associative containers are parameterized by policies allowing to test keys, but not data, for equivalence. When comparing two associative container objects, it is at least as reasonable to expect that they are equivalent if both keys and data are equivalent, as it is reasonable to expect that they are equivalent if their keys only are equivalent. Furthermore, in different settings it makes sense that two objects are equivalent if they store keys in the same order, whereas in other settings order does not matter. The operators <tt>operator==</tt> and <tt>operator!=</tt> are not descriptive enough for these considerations.
+ </li>
+ </ol>
+</ol>
+
+</body>
+
+</html>
diff --git a/libstdc++-v3/docs/html/ext/pb_assoc/move_to_front_update_metadata.html b/libstdc++-v3/docs/html/ext/pb_assoc/move_to_front_update_metadata.html
new file mode 100644
index 00000000000..8a73408016e
--- /dev/null
+++ b/libstdc++-v3/docs/html/ext/pb_assoc/move_to_front_update_metadata.html
@@ -0,0 +1,41 @@
+
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
+
+
+<html>
+<head>
+<title>move_to_front_update_metadata Interface
+</title>
+
+</head>
+
+<body>
+<h1>
+<tt>move_to_front_update_metadata
+</tt>
+
+ Interface
+
+
+</h1>
+
+<p>A list-update metadata type that unconditionally moves elements to the front of the list.
+</p>
+
+<ol>
+<li>
+<a href = "../../../../include/ext/pb_assoc/move_to_front_update_policy.hpp"><tt>move_to_front_update_policy.hpp</tt>
+</a>
+
+</li>
+
+</ol>
+
+
+
+
+</body>
+
+</html>
+
+
diff --git a/libstdc++-v3/docs/html/ext/pb_assoc/move_to_front_update_policy.html b/libstdc++-v3/docs/html/ext/pb_assoc/move_to_front_update_policy.html
new file mode 100644
index 00000000000..f9a47e3b221
--- /dev/null
+++ b/libstdc++-v3/docs/html/ext/pb_assoc/move_to_front_update_policy.html
@@ -0,0 +1,256 @@
+
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
+
+
+<html>
+<head>
+<title>move_to_front_update_policy Interface
+</title>
+
+</head>
+
+<body>
+<h1>
+<tt>move_to_front_update_policy
+</tt>
+
+ Interface
+
+
+</h1>
+
+<p>A list-update policy that unconditionally moves elements to the front of the list.
+</p>
+
+<ol>
+<li>
+<a href = "../../../../include/ext/pb_assoc/move_to_front_update_policy.hpp"><tt>move_to_front_update_policy.hpp</tt>
+</a>
+
+</li>
+
+<li>
+<a href = "#link1">Template parameters.
+</a>
+
+</li>
+
+<li>
+Public Methods:
+
+
+<ol>
+<li>
+<a href = "#link2">Constructors, destructor, and related.
+</a>
+
+</li>
+
+</ol>
+
+</li>
+
+<li>
+Protected Types and Constants:
+
+
+<ol>
+<li>
+<a href = "#link3">Metadata definitions.
+</a>
+
+</li>
+
+</ol>
+
+</li>
+
+<li>
+Protected Methods:
+
+
+<ol>
+<li>
+<a href = "#link4">Metadata operations.
+</a>
+
+</li>
+
+</ol>
+
+</li>
+
+</ol>
+
+
+<h2>
+<a name = "link1">Template parameters.
+</a>
+
+</h2>
+
+<table WIDTH = "100%" BORDER = "1">
+<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 = "Metadata_Reference3735929465">Metadata_Reference</a></pre>
+
+
+</td>
+
+<td>
+<p>Metadata reference type.</p>
+
+
+</td>
+
+<td>
+<pre>std::allocator&lt;
+ <a href = "move_to_front_update_metadata.html"><tt>move_to_front_update_metadata</tt></a>&gt;::
+ reference
+
+
+</td>
+
+</tr>
+
+</table>
+
+<h2>
+<a name = "link2">Constructors, destructor, and related.
+</a>
+
+</h2>
+
+<table WIDTH = "100%" BORDER = "1">
+<TR><TD Width = "45%" ALIGN = "left"><b>Method</b></TD><TD Width = "55%" ALIGN = "left"><b>Description</b></TD></TR>
+
+
+<tr>
+<td>
+<pre><b>void</b>
+ swap
+ (<font color = "olive">move_to_front_update_policy</font> &amp;r_other)</pre>
+
+
+</td>
+
+<td>
+<p>Swaps content.</p>
+
+
+</td>
+
+</tr>
+
+</table>
+
+<h2>
+<a name = "link3">Metadata definitions.
+</a>
+
+</h2>
+
+<table WIDTH = "100%" BORDER = "1">
+<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_type3735929937">metadata_type</a></pre>
+
+
+</td>
+
+<td>
+<pre><a href = "move_to_front_update_metadata.html"><tt>move_to_front_update_metadata</tt></a></pre>
+
+
+</td>
+
+<td>
+<p>Metadata on which this functor operates.</p>
+
+
+</td>
+
+</tr>
+
+<tr>
+<td>
+<pre><a name = "metadata_reference3735929497">metadata_reference</a></pre>
+
+
+</td>
+
+<td>
+<pre><a href = "#Metadata_Reference3735929465">Metadata_Reference</a></pre>
+
+
+</td>
+
+<td>
+<p>Reference to metadata on which this functor operates.</p>
+
+
+</td>
+
+</tr>
+
+</table>
+
+<h2>
+<a name = "link4">Metadata operations.
+</a>
+
+</h2>
+
+<table WIDTH = "100%" BORDER = "1">
+<TR><TD Width = "45%" ALIGN = "left"><b>Method</b></TD><TD Width = "55%" ALIGN = "left"><b>Description</b></TD></TR>
+
+
+<tr>
+<td>
+<pre><a href = "#metadata_type3735929937">metadata_type</a>
+ <b>operator</b>()
+ () <b>const</b></pre>
+
+
+</td>
+
+<td>
+<p>Creates a metadata object.</p>
+
+
+</td>
+
+</tr>
+
+<tr>
+<td>
+<pre><b>bool</b>
+ <b>operator</b>()
+ (<a href = "#metadata_reference3735929497">metadata_reference</a> r_data) <b>const</b></pre>
+
+
+</td>
+
+<td>
+<p>Decides whether a metadata object should be moved to the front of the list.</p>
+
+
+</td>
+
+</tr>
+
+</table>
+
+
+
+</body>
+
+</html>
+
+
diff --git a/libstdc++-v3/docs/html/ext/pb_assoc/ms_cd.jpg b/libstdc++-v3/docs/html/ext/pb_assoc/ms_cd.jpg
new file mode 100644
index 00000000000..885319daac8
--- /dev/null
+++ b/libstdc++-v3/docs/html/ext/pb_assoc/ms_cd.jpg
Binary files differ
diff --git a/libstdc++-v3/docs/html/ext/pb_assoc/ms_gen.html b/libstdc++-v3/docs/html/ext/pb_assoc/ms_gen.html
new file mode 100644
index 00000000000..468c121a70b
--- /dev/null
+++ b/libstdc++-v3/docs/html/ext/pb_assoc/ms_gen.html
@@ -0,0 +1,440 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
+<html>
+ <head>
+ <title>Mapping-Semantics Genericity</title>
+ <meta name="GENERATOR" content="Microsoft Visual Studio .NET 7.1">
+ <meta name="vs_targetSchema" content="http://schemas.microsoft.com/intellisense/ie5">
+ </head>
+<body bgcolor = "white">
+
+
+<h1>Mapping-Semantics</h1>
+
+<p>
+ This section describes genericity over different mapping-semantics. It is organized as follows.
+</p>
+<ol>
+ <li><a href = "#intro">Introduction</a></li>
+ <li><a href = "#ds_policy">Data Types as a Policy</a></li>
+ <li><a href = "#problem">The Basic Problem</a></li>
+ <li><a href = "#mapping_level">Mapping Levels</a></li>
+ <li><a href = "#ms_traits">Tags and Traits</a></li>
+ <li><a href = "#drawbacks">Drawbacks</a></li>
+</ol>
+
+
+<h2><a name = "intro">Introduction</a></h2>
+
+<p>
+<a href = "motivation.html#mapping_semantics">Motivation::Mapping Semantics</a> discussed scalability issues with the STL's non-unique-mapping associative containers; non-unique association inherently embeds linked-lists in associative containers resulting in scalability problems and other problems.
+</p>
+
+<p>
+ In <tt>pb_assoc</tt>, all containers have unique-key semantics. Each key is uniquely mapped to &quot;something&quot;.
+</p>
+
+
+<h2><a name = "ds_policy">Data Types as a Policy</a></h2>
+
+<p>
+ All associative-containers in <tt>pb_assoc</tt> are parameterized by a data type.
+<i>E.g.,</i> <a href = "cc_hash_assoc_cntnr.html">cc_hash_assoc_cntnr</a> is parameterized as
+</p>
+<pre>
+<b>template</b>&lt;
+ <b>typename</b> Key,
+ <b>typename</b> Data,
+ ...&gt;
+<b>class</b> <a href = "cc_hash_assoc_cntnr.html">cc_hash_assoc_cntnr</a>;
+</pre>
+
+<p>
+ There are no separate classes for maps, sets, multimaps, and multisets (as the STL has). Rather, the mapping-semantic is set by specifying the <tt>Key</tt> parameter.
+</p>
+
+<ol>
+ <li> If <tt>Data</tt> is any type (<i>e.g.</i>, <tt><b>int</b></tt> or
+<tt>std::string</tt>), then the container is a &quot;map&quot; - it maps each <tt>Key</tt> object to a <tt>Data</tt> object.
+ </li>
+ <li> If <tt>Data</tt> is
+<a href = "null_data_type.html"><tt>null_data_type</tt></a>,
+then the container is a &quot;set&quot; - it stores each <tt>Key</tt> object. In this case, each <tt>Key</tt> object is not really mapped to anything (except, implicitly, to the fact that it is stored in the container object).
+ </li>
+ <li>
+ If <tt>Data</tt> is
+<a href = "compound_data_type.html">compound_data_type</a><tt>&lt;Cntnr&gt;</tt>,
+then the container is a &quot;multimap&quot; - it maps each <tt>Key</tt> object into a <tt>Cntnr</tt> object. This structure is recursive - <tt>Cntnr</tt> itself can be a &quot;map&quot;, &quot;set&quot;, &quot;multimap&quot;, and so forth.
+ </li>
+</ol>
+
+<p>
+ Each container derives from one of the three containers
+in the oval of Figure
+<a href = "#ms_cd">
+Data-types as a policy
+</a>.
+</p>
+
+ <ol>
+ <li><a href = "basic_assoc_cntnr.html"><tt>basic_assoc_cntnr</tt></a>
+is the base for most instantiations of a container's <tt>Data</tt> paramter. This
+base includes the definition of <tt>data_type</tt>, and supports
+<tt><b>operator</b>[]</tt>.
+ </li>
+ <li><a href = "basic_assoc_cntnr_no_data.html"><tt>basic_assoc_cntnr</tt></a> is the base for a
+<a href = "null_data_type"><tt>null_data_type</tt></a> instantiation of a container's <tt>Data</tt> paramter. This
+base lacks the definition of <tt>data_type</tt>, and does not support
+<tt><b>operator</b>[]</tt>.
+ <li><a href = "basic_assoc_cntnr_compound_data.html"><tt>basic_assoc_cntnr</tt></a> is the base for a
+<a href = "compound_data_type.html"><tt>compound_data_type</tt></a><tt>&lt;Cntnr&gt;</tt> instantiation of a container's <tt>Data</tt> paramter. This
+base includes the definition of <tt>data_type</tt>, and supports
+<tt><b>operator</b>[]</tt>. It further supports some advanced functionality described in the remainder of this section.
+ </ol>
+
+
+<h6 align = "center">
+<a name = "ms_cd">
+<img src = "ms_cd.jpg" width = "70%" alt = "no image">
+</h6>
+</a>
+<h6 align = "center">
+Data-types as a policy.
+</h6>
+
+
+<h2><a name = "problem">The Basic Problem</a></h2>
+
+<p>
+ Consider a <tt>pb_assoc</tt> &quot;multimap&quot; mapping integers to characters.
+Since a <tt>pb_assoc</tt> &quot;multimap&quot; is a &quot;map&quot; of &quot;sets&quot;,
+if <tt>m</tt> is an object of this type, it is not possible to directly use
+<tt>m.insert(std::make_pair(2, 'b')</tt> (however, it is possible to directly use
+<tt>m[2].insert('b')</tt>). In would be nice if this method whould be supported.
+</p>
+
+<p>
+ Put differently, while the <tt>pb_assoc</tt> &quot;multimap&quot; can be viewed logically as the collection
+</p>
+<p>
+ { <tt><b>int</b></tt> &rarr; {<tt><b>char</b></tt>} },
+</p>
+<p>
+ It would be nice if it could simultaneously be viewed as the collection
+</p>
+<p>
+ { (<tt><b>int</b></tt>, <tt><b>char</b></tt>) },
+</p>
+<p><i>i.e.</i>, a &quot;set&quot; of pairs.</p>
+
+<p>
+ In more general terms, it would be nice to be able to simultaneously
+view a collection
+</p>
+<p>
+{ key_type_0 &rarr; { key_type_1 &rarr; { key_type_2 &rarr; { key_type_3 &rarr; { ... }}}}}
+</p>
+<p>
+as each of the following:
+</p>
+<p>
+{ (key_type_0, key_type_1) &rarr; { key_type_2 &rarr { key_type_e &rarr; { ... }}}},
+</p>
+<p>
+{ (key_type_0, key_type_1, key_type_2) &rarr { key_type_3 &rarr; { ... }}}
+</p>
+<p>
+{ (key_type_0, key_type_1, key_type_2, key_type_3 ) &rarr { }}
+</p>
+<p>
+...
+</p>
+
+
+<p>
+<a href = #mapping_level">Mapping_Levels</a> discusses the mechanism
+for these multiple views in <tt>pb_assoc</tt>
+</p>
+
+
+
+<h2><a name = "mapping_level">Mapping Levels</a></h2>
+
+<p>
+ Each associative container in <tt>pb_assoc</tt> has
+a <i>mapping level</i>. The mapping level is defined by
+the instantiation of a container's <tt>Data</tt>
+parameter:
+</p>
+
+<ol>
+ <li> If the <tt>Data</tt> parameter is instantiated
+by
+<a href = "null_data_type.html"><tt>null_data_type</tt></a> (<i>i.e.</i>,
+the container is a &quot;set&quot;), then the mapping level is 1.
+ </li>
+ <li> If the <tt>Data</tt> parameter is instantiated
+by
+<a href = "compound_data_type.html">compound_data_type</a><tt>&lt;Cntnr&gt;</tt>
+(<i>i.e.</i>, the container is a &quot;multimap&quot;), then the mapping level
+is 1 + the mapping level of <tt>Cntnr</tt>.
+ </li>
+ <li> If the <tt>Data</tt> parameter is instantiated
+by any other type, <i>e.g.</i>, <tt><b>char</b></tt> (<i>i.e.</i>,
+the container is a &quot;map&quot;), then the mapping level is 1.
+ </li>
+</ol>
+
+<p>
+ Containers can be rebound, at compile time, to different mapping levels.
+The compound data-type specialization <a href = "basic_assoc_cntnr_compound_data.html"><tt>basic_assoc_cntnr</tt></a>
+defines internally
+</p>
+<pre>
+<b>template</b>&lt;
+ <b>int</b> Mapping_Level&gt;
+<b>struct</b> rebind
+{
+ <b>typedef</b>
+ ...
+ other;
+};
+</pre>
+
+<p>
+(which is similar to the STL's allocator rebind mechanism).
+the type <tt>other</tt> is the view of the container with mapping
+level <tt>Mapping_Level</tt>. The container can be safely cast
+to <tt>other</tt>.
+</p>
+
+<p>
+ As an example, consider the type
+</p>
+
+<pre>
+<b>typedef</b>
+ <a href = "cc_hash_assoc_cntnr.html">cc_hash_assoc_cntnr</a>&lt;
+ <b>int</b>,
+ <a href = "compound_data_type.html">compound_data_type</a>&lt;
+ <a href = "tree_assoc_cntnr.html">tree_assoc_cntnr</a>&lt;
+ <b>char</b>,
+ <a href = "null_data_type.html"><tt>null_data_type</tt></a>&gt; &gt; &gt;
+ cntnr_t;
+</pre>
+<p>
+ which is a &quot;map&quot; mapping each <tt><b>int</b></tt> to
+a &quot;set&quot; of <tt><b>char</b></tt>s. In this case, <tt>cntnr_t</tt> has mapping level 2.
+</p>
+
+<p>
+ An object of type <tt>cntnr_t</tt> cannot support <tt>insert(std::make_pair(2, 'b'));</tt>. On the other hand, the following code snippet shows how to do so:
+</p>
+
+<pre>
+cntnr_t c;
+
+<b>typedef</b>
+ t::rebind<1>::other
+ t_;
+
+((t_ &)c).insert(std::make_pair(2, 'b'));
+</pre>
+
+
+<p>
+<a href = "../example/mapping_level_example.cpp"><tt>mapping_level_example.cpp</tt></a> shows a more detailed example.
+</p>
+
+
+
+<h2><a name = "ms_traits">Tags and Traits</a></h2>
+
+<p>
+ It is, of course, beneficial to query types for their mapping semantics.
+</p>
+
+<p>
+ Each container defines internally the type <tt>ms_category</tt>
+as its mapping-semantics tag (hopefully this name is not copyrighted
+by some major corporation). The possible tags, shown in Figure
+
+are the following:
+</p>
+
+<ol>
+ <li>
+ <a href = "basic_ms_tag.html"><tt>basic_ms_tag</tt></a>
+is a basic mapping-semantics tag. It is the type defined by &quot;set&quot;s.
+ </li>
+ <li>
+ <a href = "data_enabled_ms_tag.html"><tt>data_enabled_ms_tag</tt></a>
+is a mapping-semantics tag of types that have data. It is the type defined by &quot;map&quot;s.
+ </li>
+ <li>
+ <a href = "compound_data_enabled_ms_tag.html"><tt>compound_data_enabled_ms_tag</tt></a>
+is a mapping-semantics tag of types that have compound data. It is the type defined by &quot;multimap&quot;s.
+ </li>
+</ol>
+
+<p>
+ Additionally, a container's mapping semantics can be queried by traits. For any
+container <tt>Cntnr</tt>,
+</p>
+
+<pre>
+<a href = "ms_traits.html">ms_traits</a>&lt;Cntnr&gt;::mapping_level
+</pre>
+
+<p>
+ indicates the mapping level of the container, for example.
+</p>
+
+
+
+<h2><a name = "drawbacks">Drawbacks</a></h2>
+
+<tt>pb_assoc</tt>'s mapping-semantics design has some drawbacks compared to that of the STL.
+
+
+<h3>Equivalent, Non-Identical Keys</h3>
+
+<p>
+ The STL's multimaps and multisets allow storing equivalent, non-identical keys
+[<a href = "references.html#kleft00sets">kleft00sets</a>]. For example, assume a bank maintains a data structure monitoring the accounts opened by each person. This could be modeled as the following:
+</p>
+
+<pre>
+<i>// Name type.</i>
+<b>typedef</b>
+ std::string
+ name;
+
+<i>// Account-id type.</i>
+<b>typedef</b>
+ <b>unsigned long</b>
+ account_id;
+
+<i>// Association between a name and an account id.</i>
+<b>class</b> opened_info
+{
+<b>public</b>:
+ ...
+
+ <i>// Comparison operator.</i>
+ <b>bool</b>
+ <b></b>operator&lt;</b>
+ (<b>const</b> opened_info &r_other)
+ {
+ <i>Comparison is defined as the comparison of the names.</i>
+ <b>return</b> m_name < r_other.m_name;
+ }
+
+
+<b>private</b>:
+ name m_name;
+
+ account_id m_acc_id;
+};
+
+<i>// A multiset of opened accounts.</i>
+<b>typedef</b>
+ std::multiset&lt;
+ opened_info&gt;
+ all_opened_info;
+</pre>
+
+<p>
+ <tt>std::multiset</tt> can accomodate multiple equivalent, non-identical <tt>opened_info</tt> - those with the same name but different account id.
+</p>
+
+<p>
+ In <tt>pb_assoc</tt>, however, non-unique mapping is unsupported. The equivalent to the above could be
+</p>
+
+<pre>
+<b>typedef</b>
+ tree_assoc_cntnr&lt;
+ name,
+ compound_data_type&lt;
+ cc_hash_assoc_cntnr&lt;
+ account_id&gt; &gt; &gt;
+ all_opened_info;
+</pre>
+
+<p>
+ The drawback lies in the fact that the data stored in
+<tt>all_opened_info</tt> is less encapsulated - an <tt>opened_info</tt>
+object needs to be constructed when a specific name and account are found, and
+an <tt>opened_info</tt> object needs to be decomposed into <tt>name</tt> and
+<tt>account_id</tt> objects when it is inserted into a <tt>all_opened_info</tt>
+object.
+</p>
+
+<p>
+ It should be noticed however, that the above drawbacks - construction and decomposition are constant-time additive drawbacks. The drawbacks of the
+STL's associative containers are in terms of orders of growth.
+</p>
+
+<h3>Definition of <tt>value_type</tt></h3>
+
+<p>
+ The STL's associative containers contain a pleasingly uniform definition of
+the <tt>value_type</tt> of a container.
+If a container is parameterized by <tt>key</tt> as its <tt>Key</tt>, and <tt>data</tt> as its <tt>Data</tt>, then its <tt>value_type</tt> is
+<tt>std::pair&lt;<b>const</b> key, data&gt;</tt>;
+for example, the <tt>value_type</tt> of <tt>std::map&lt;<b>int</b>, <b>char</b>&gt;</tt> is
+<tt>std::pair&lt;<b>const int</b>, <b>char</b>&gt;</tt>. Futhermore, the <tt>value_type</tt> of a container and the <tt>value_type</tt> of the container's iterators are identical.
+</p>
+
+<p>
+ In <tt>pb_assoc</tt>, conversely, the rules are more complex.
+</p>
+
+<p> For one, a container's
+<tt>value_type</tt> is, in general
+<tt>std::pair&lt;<b>const</b> Key, Data&gt;</tt>,
+but if <tt>Data</tt> is <tt>null_data_type</tt>, then the <tt>value_type</tt>
+is
+<tt>Key</tt>,
+and if
+<tt>Data</tt> is
+<tt>compound_data_type&lt;Cntnr&gt;</tt>, then the <tt>value_type</tt> is
+<tt>std::pair&lt;<b>const</b> Key, Cntnr&gt;</tt>.
+</p>
+
+<p>
+ Futhermore, assume that <tt>Cntnr</tt> is an associative container with more than a single mapping level, and let <tt>Cntnr_</tt> be defined as
+</p>
+
+<pre>
+<b>typedef</b>
+ <b>typename</b> Cntnr::<b>template</b> rebind&lt;i&gt;::other</tt>
+ Cntnr_;
+</pre>
+<p>
+<i>i.e.</i>, the container rebound to a different mapping level.
+In this case, the <tt>value_type</tt> of the rebound container is not the <tt>value_type</tt>
+of the rebound container's iterators. <i>I.e.</i>, it is <emph>not</emph> true that
+<tt><b>typename</b> Cntnr_::value_type</tt> is the same as
+<tt><b>typename</b> Cntnr_::iterator::value_type</tt>. This complication never exists for the STL's container.
+</p>
+
+<h6 align = "center">
+<a name = "reference_iterator">
+<img src = "reference_iterator.jpg" width = "70%" alt = "no image">
+</h6>
+</a>
+<h6 align = "center">
+Iterator of a rebound type.
+</h6>
+
+
+<h3>Multisets</h3>
+
+<p>
+ <tt>pb_assoc</tt> does not contain a &quot;multiset&quot; type. The closest equivalent is mapping keys to non-negative integral types, <i>e.g.</i>, <tt>size_t</tt>.
+</p>
+
+</body>
+
+</html>
diff --git a/libstdc++-v3/docs/html/ext/pb_assoc/ms_tag_cd.jpg b/libstdc++-v3/docs/html/ext/pb_assoc/ms_tag_cd.jpg
new file mode 100644
index 00000000000..b114d935798
--- /dev/null
+++ b/libstdc++-v3/docs/html/ext/pb_assoc/ms_tag_cd.jpg
Binary files differ
diff --git a/libstdc++-v3/docs/html/ext/pb_assoc/ms_traits.html b/libstdc++-v3/docs/html/ext/pb_assoc/ms_traits.html
new file mode 100644
index 00000000000..93369930769
--- /dev/null
+++ b/libstdc++-v3/docs/html/ext/pb_assoc/ms_traits.html
@@ -0,0 +1,131 @@
+
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
+
+
+<html>
+<head>
+<title>ms_traits Interface
+</title>
+
+</head>
+
+<body>
+<h1>
+<tt>ms_traits
+</tt>
+
+ Interface
+
+
+</h1>
+
+<p>Traits of a container based on its mapping semantics.
+</p>
+
+<ol>
+<li>
+<a href = "../../../../include/ext/pb_assoc/ms_trait.hpp"><tt>ms_trait.hpp</tt>
+</a>
+
+</li>
+
+<li>
+Public Types and Constants:
+
+
+<ol>
+<li>
+<a href = "#link1">Container attribues.
+</a>
+
+</li>
+
+</ol>
+
+</li>
+
+</ol>
+
+
+<h2>
+<a name = "link1">Container attribues.
+</a>
+
+</h2>
+
+<table WIDTH = "100%" BORDER = "1">
+<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 = "has_data3735929380">has_data</a></pre>
+
+
+</td>
+
+<td>
+<pre>True only if the container is not a &quot;set&quot type.</pre>
+
+
+</td>
+
+<td>
+<p>Data indicator.</p>
+
+
+</td>
+
+</tr>
+
+<tr>
+<td>
+<pre><a name = "has_compound_data3735929399">has_compound_data</a></pre>
+
+
+</td>
+
+<td>
+<pre>True only if the container is not a &quot;set&quot type or &quot;map&quot; type.</pre>
+
+
+</td>
+
+<td>
+<p>Compound-data indicator.</p>
+
+
+</td>
+
+</tr>
+
+<tr>
+<td>
+<pre><a name = "mapping_level3735929938">mapping_level</a></pre>
+
+
+</td>
+
+<td>
+<pre>The number of mapping-levels the container supports (1 for &quot;set&quot types or &quot;map&quot; types).</pre>
+
+
+</td>
+
+<td>
+<p>Mapping-level indicator.</p>
+
+
+</td>
+
+</tr>
+
+</table>
+
+
+
+</body>
+
+</html>
+
+
diff --git a/libstdc++-v3/docs/html/ext/pb_assoc/node_invariant_invalidations.jpg b/libstdc++-v3/docs/html/ext/pb_assoc/node_invariant_invalidations.jpg
new file mode 100644
index 00000000000..ea03b42be4d
--- /dev/null
+++ b/libstdc++-v3/docs/html/ext/pb_assoc/node_invariant_invalidations.jpg
Binary files differ
diff --git a/libstdc++-v3/docs/html/ext/pb_assoc/node_invariants.html b/libstdc++-v3/docs/html/ext/pb_assoc/node_invariants.html
new file mode 100644
index 00000000000..9d23841402f
--- /dev/null
+++ b/libstdc++-v3/docs/html/ext/pb_assoc/node_invariants.html
@@ -0,0 +1,154 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
+<html>
+ <head>
+ <title>Node Invariants</title>
+ <meta name="GENERATOR" content="Microsoft Visual Studio .NET 7.1">
+ <meta name="vs_targetSchema" content="http://schemas.microsoft.com/intellisense/ie5">
+ </head>
+<body bgcolor = "white">
+<h1>Node Invariants</h1>
+
+<p>
+ Figure
+<a href = "#node_invariants">Some node invariants</a>
+shows some node invariants. A shows
+a tree whose each node contains, asides from an <tt>double</tt> key, the number
+of nodes at the subtree rooted at the node; B shows a tree whose each node
+contains, asides from a line-interval key, the maximal endpoint of the interval
+of any node in the subtree rooted at the node.
+ The first tree allows querying efficiently what is the order statistic
+of any element; the second tree allows querying efficiently if any, or which,
+intervals overlap a given interval.
+</p>
+
+<h6 align = "center">
+<a name = "node_invariants">
+<img src = "node_invariants.jpg" width = "50%" alt = "no image">
+</a>
+</h6>
+<h6 align = "center">
+Some node invariants.
+</h6>
+
+
+<p>
+ Maintaining such trees is difficult, for two reasons:
+</p>
+<ol>
+ <li> Various operations can invalidate node invariants.
+<i>E.g.</i>, Figure
+<a href = "#node_invariant_invalidations">Invalidation of node invariants</a>
+shows how a right rotation, performed on A, results in B, with nodes <i>x</i>
+and <i>y</i> having corrupted invariants (the greyed nodes in C);
+Figure
+<a href = "#node_invariant_invalidations">Invalidation of node invariants</a>
+shows how an insert, performed on D, results in E, with nodes <i>x</i>
+and <i>y</i> having corrupted invariants (the greyed nodes in F).
+ It is not feasible to know outside the tree the effect of an operation on the
+nodes of the tree.
+ </li>
+ <li>
+ Even if node invariants are maintained, it is not possible to know
+in advance which search paths are required (<i>e.g.</i>, searching for all
+line intervals overlapping some interval might require several search paths).
+ </li>
+</ol>
+
+
+<h6 align = "center">
+<a name = "node_invariant_invalidations">
+<img src = "node_invariant_invalidations.jpg" width = "80%" alt = "no image">
+</a>
+</h6>
+<h6 align = "center">
+Invalidation of node invariants.
+</h6>
+
+<p>
+ These problems are solved by a combination of two means:
+</p>
+
+<ol>
+ <li>
+ The tree-based containers are parameterized by a <tt>Node_Updator</tt>
+parameter. When a tree operation might invalidate some node invariant,
+a <tt>Node_Updator</tt> object is invoked to restore the invariant. This object is
+always invoked with three nodes: some node, say <i>x</i> in
+Figure
+<a href = "#restoring_node_invariants">Invalidation of node invariants</a>-A
+has an invalid invariant, but its children, <i>y</i> and <i>z</i> hav valid invariants.
+After the invocation, all three nodes have valid invariants, as
+in
+Figure
+<a href = "#restoring_node_invariants">Invalidation of node invariants</a>-B.
+It is well known that any <tt>insert</tt>, <tt>erase</tt>,
+<tt>split</tt> or <tt>join</tt>, can restore
+all node invariants by a small number of node invariant updates
+[<a href = "references.html#clrs2001">clrs2001</a>].
+For example, Figure
+<a href = "#update_seq_diagram">
+Insert update sequence diagram
+</a>
+shows an <tt>insert</tt> operation (point A); the tree performs some operations, and
+calls the update functor three times (points B, C, and D).
+ </li>
+ <li>
+ The tree based containers all define internally <tt>node_iterator</tt>
+ and <tt>const_node_iterator</tt>, iterators which can be used to traverse
+ from a node to any of its children or parent.
+ </li>
+</ol>
+
+<h6 align = "center">
+<a name = "restoring_node_invariants">
+<img src = "restoring_node_invariants.jpg" width = "80%" alt = "no image">
+</a>
+</h6>
+<h6 align = "center">
+Invalidation of node invariants.
+</h6>
+
+<h6 align = "center">
+<a name = "update_seq_diagram">
+<img src = "update_seq_diagram.jpg" width = "50%" alt = "no image">
+</a>
+</h6>
+<h6 align = "center">
+Insert update sequence diagram.
+</h6>
+
+
+<p>
+ In
+<a href = "concepts.html#concepts_null_policies">Null Policy Classes</a>
+a distinction was made between <i>redundant policies</i>
+and <i>null policies</i>.
+</p>
+
+<p>
+ Seemingly, in this case a redundant policy - a policy which doesn't
+affect nodes' contents would suffice in this case. This, however, would
+lead to performance loss.
+Figure
+<a href = "#rationale_null_node_updator">
+Rationale for null node-invariant functors
+</a>
+shows a typical case where invariants are restored (in this case, to the
+shaded node). In most cases, tree operations such as rotations affect only
+the lower levels of the tree. A null policy allows to know that there
+is no need to traverse the tree to the root.
+</p>
+
+<h6 align = "center">
+<a name = "rationale_null_node_updator">
+<img src = "rationale_null_node_updator.jpg" width = "50%" alt = "no image">
+</a>
+</h6>
+<h6 align = "center">
+Rationale for null node-invariant functors.
+</h6>
+
+
+</body>
+
+</html>
diff --git a/libstdc++-v3/docs/html/ext/pb_assoc/node_invariants.jpg b/libstdc++-v3/docs/html/ext/pb_assoc/node_invariants.jpg
new file mode 100644
index 00000000000..d9b96ddecb0
--- /dev/null
+++ b/libstdc++-v3/docs/html/ext/pb_assoc/node_invariants.jpg
Binary files differ
diff --git a/libstdc++-v3/docs/html/ext/pb_assoc/non_unique_mapping.html b/libstdc++-v3/docs/html/ext/pb_assoc/non_unique_mapping.html
new file mode 100644
index 00000000000..866ea5229c6
--- /dev/null
+++ b/libstdc++-v3/docs/html/ext/pb_assoc/non_unique_mapping.html
@@ -0,0 +1,404 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
+<html>
+<head>
+ <title>Non-Unique Mapping Containers</title>
+ <meta name="GENERATOR" content="Microsoft Visual Studio .NET 7.1">
+ <meta name="vs_targetSchema" content="http://schemas.microsoft.com/intellisense/ie5">
+</head>
+<body bgcolor="white">
+
+<h1>Non-Unique Mapping Containers</h1>
+
+<p>
+ This section describes the design of non-unique mapping containers
+(multimaps and multisets). It is organized as follows:
+</p>
+<ol>
+ <li> The <a href = "#general">Main Points</a> Section describes the main points.
+ </li>
+ <li>
+ The <a href = "#types">Mapped Data Types and Mapped Value Types</a> Section
+ describes some additional types that each associative container defines.
+ </li>
+ <li> The <a href = "generics">Generics</a> Section describes some classes for
+ generic programming.
+ </li>
+ <li> The <a href = "#compound_keys">Compound Keys</a> Section describes an
+ alternative to the STL's design of using equivalent, non-identical, keys.
+ </li>
+</ol>
+
+<h2><a name = "general">Main Points</a></h2>
+
+<p>
+ In <tt>pb_assoc</tt>, all associative containers have a unique-key design;
+each container can have at most one entry for any given key. Multimaps
+are designed as maps from keys to sets; multisets are designed as maps from
+keys to non-negative integral types.
+</p>
+
+
+
+<h2><a name = "types">Mapped Data Types and Mapped Value Types</a></h2>
+
+<p>
+ The STL's design of associative containers elegantly allows
+generic manipulation of containers: each container defines
+<tt>data_type</tt> as the domain of its data;
+<tt>value_type</tt> as the domain of its relationship. This is not
+directly applicable in <tt>pb_assoc</tt>. Consider
+a multimap mapping <tt>Key</tt> objects to
+<tt>Data_Coll</tt> objects, where
+<tt>Data_Coll</tt> is some set-type of <tt>Data</tt>.
+Then should the multimap's <tt>value_type</tt> should be
+<tt>std::pair&lt;Key, Data&gt;</tt> or
+<tt>std::pair&lt;Key, Data_Coll&gt;</tt>, for example?.
+</p>
+
+<p>
+ <tt>pb_assoc</tt> addresses this by differentiating
+between the <i>domain</i> and the <i>type</i> of relationship.
+All associative containers define <tt>value_type</tt> as
+the relationship's <i>domain</i>, and <tt>mapped_value_type</tt> as its
+<i>type</i>. <i>E.g.</i>, both
+map types and multimap types may share the same <tt>value_type</tt>,
+if they map from the same key domain to
+the same data domain. In this case, however, they will not share
+the same <tt>mapped_value_type</tt>, since the multimap type maps from the
+key domain to the domain of collections of data. The same
+differentiation exists between the domain and type of mapped data.
+</p>
+
+<p>
+ In general, the following types describe the relationships
+of each associative container:
+</p>
+<ol>
+ <li>
+ <tt>key_type</tt>- This describes the domain of the keys of the container. All
+ associative containers define this type.
+ </li>
+ <li>
+ <tt>data_type</tt>- This describes the <i>domain</i> of the data mapped by a
+ key. It is identical to the <tt>data_type</tt> defined by <tt>std::map</tt>, <tt>std::set</tt>,
+ <tt>std::multimap</tt>, and <tt>std::multiset</tt>. Sets and multisets do not
+ define this type, since they map each key to the abstract fact that the key is
+ stored by them.
+ </li>
+ <li>
+ <tt>mapped_data_type</tt>- This describes the <i>type</i> of the data mapped by
+ a key. For maps, this is the same as <tt>data_type</tt>. For multimaps, this is
+ not the same as <tt>data_type</tt>; The <tt>mapped_data_type</tt> describes the
+ collection of <tt>data_type</tt>s used. Sets do not define this type. For
+ multisets, the <tt>mapped_data_type</tt> describes the unsigned integral type
+ used to indicate the number of occurrences of a key.
+ </li>
+ <li>
+ <tt>value_type</tt>- This describes the <i>domain</i> of relationships store in
+ a container. It is identical to the <tt>value_type</tt> defined by <tt>std::map</tt>,
+ <tt>std::set</tt>, <tt>std::multimap</tt>, and <tt>std::multiset</tt>.
+ </li>
+ <li>
+ <tt>mapped_value_type</tt>- This describes the <i>type</i> of relationships
+ store in a container. It consists of information on the <tt>key_type</tt> and <tt>mapped_data_type</tt>
+ (except for sets).
+ </li>
+</ol>
+
+<p>
+ The following table defines the above types for a map
+mapping from <tt>Key</tt> types to <tt>Data</tt> types:
+</p>
+<TABLE WIDTH="100%" BORDER="1" ID="Table1">
+ <TR>
+ <TD Width="50%" ALIGN="left"><b>type</b></TD>
+ <TD Width="50%" ALIGN="left"><b>Description / Definition</b></TD>
+ </TR>
+ <TR>
+ <TD ALIGN="left"><pre>key_type</pre>
+ </TD>
+ <TD ALIGN="left"><pre>Key</pre>
+ </TD>
+ </TR>
+ <TR>
+ <TD ALIGN="left"><pre>data_type</pre>
+ </TD>
+ <TD ALIGN="left"><pre>Data</pre>
+ </TD>
+ </TR>
+ <TR>
+ <TD ALIGN="left"><pre>mapped_data_type</pre>
+ </TD>
+ <TD ALIGN="left"><pre>Data</pre>
+ </TD>
+ </TR>
+ <TR>
+ <TD ALIGN="left"><pre>value_type</pre>
+ </TD>
+ <TD ALIGN="left"><pre>std::pair&lt;<b>const</b> Key, Data&gt;</pre>
+ </TD>
+ </TR>
+ <TR>
+ <TD ALIGN="left"><pre>mapped_value_type</pre>
+ </TD>
+ <TD ALIGN="left"><pre>std::pair&lt;<b>const</b> Key, Data&gt;</pre>
+ </TD>
+ </TR>
+</TABLE>
+
+
+<p>The following table defines the above types for a
+set storing <tt>Key</tt> types:</p>
+<TABLE WIDTH="100%" BORDER="1" ID="Table2">
+ <TR>
+ <TD Width="50%" ALIGN="left"><b>type</b></TD>
+ <TD Width="50%" ALIGN="left"><b>Description / Definition</b></TD>
+ </TR>
+ <TR>
+ <TD ALIGN="left"><pre>key_type</pre>
+ </TD>
+ <TD ALIGN="left"><pre>Key</pre>
+ </TD>
+ </TR>
+ <TR>
+ <TD ALIGN="left"><pre>data_type</pre>
+ </TD>
+ <TD ALIGN="left">-</TD>
+ </TR>
+ <TR>
+ <TD ALIGN="left"><pre>mapped_data_type</pre>
+ </TD>
+ <TD ALIGN="left">-</TD>
+ </TR>
+ <TR>
+ <TD ALIGN="left"><pre>value_type</pre>
+ </TD>
+ <TD ALIGN="left"><pre><b>const</b> Key</pre>
+ </TD>
+ </TR>
+ <TR>
+ <TD ALIGN="left"><pre>mapped_value_type</pre>
+ </TD>
+ <TD ALIGN="left"><pre><b>const</b> Key</pre>
+ </TD>
+ </TR>
+</TABLE>
+
+<p>The following table defines the above types for a multimap
+mapping from <tt>Key</tt> types to <tt>Data_Coll&lt;Data&gt;</tt>
+types, where <tt>Data_Coll&lt;Data&gt;</tt>
+is a set of <tt>Data</tt> types:</p>
+<TABLE WIDTH="100%" BORDER="1" ID="Table3">
+ <TR>
+ <TD Width="50%" ALIGN="left"><b>type</b></TD>
+ <TD Width="50%" ALIGN="left"><b>Description / Definition</b></TD>
+ </TR>
+ <TR>
+ <TD ALIGN="left"><pre>key_type</pre>
+ </TD>
+ <TD ALIGN="left"><pre>Key</pre>
+ </TD>
+ </TR>
+ <TR>
+ <TD ALIGN="left"><pre>data_type</pre>
+ </TD>
+ <TD ALIGN="left"><pre>Data</pre>
+ </TD>
+ </TR>
+ <TR>
+ <TD ALIGN="left"><pre>mapped_data_type</pre>
+ </TD>
+ <TD ALIGN="left"><pre>Data_Coll&lt;Data&gt;</pre>
+ </TD>
+ </TR>
+ <TR>
+ <TD ALIGN="left"><pre>value_type</pre>
+ </TD>
+ <TD ALIGN="left"><pre>std::pair&lt;<b>const</b> Key, Data&gt;</pre>
+ </TD>
+ </TR>
+ <TR>
+ <TD ALIGN="left"><pre>mapped_value_type</pre>
+ </TD>
+ <TD ALIGN="left"><pre>std::pair&lt;<b>const</b> Key, Data_Coll&lt;Data&gt; &gt;</pre>
+ </TD>
+ </TR>
+</TABLE>
+
+<p>The following table defines the above types for a multiset
+storing <tt>Key</tt> types:</p>
+<TABLE WIDTH="100%" BORDER="1" ID="Table4">
+ <TR>
+ <TD Width="50%" ALIGN="left"><b>type</b></TD>
+ <TD Width="50%" ALIGN="left"><b>Description / Definition</b></TD>
+ </TR>
+ <TR>
+ <TD ALIGN="left"><pre>key_type</pre>
+ </TD>
+ <TD ALIGN="left"><pre>Key</pre>
+ </TD>
+ </TR>
+ <TR>
+ <TD ALIGN="left"><pre>data_type</pre>
+ </TD>
+ <TD ALIGN="left">-</TD>
+ </TR>
+ <TR>
+ <TD ALIGN="left"><pre>mapped_data_type</pre>
+ </TD>
+ <TD ALIGN="left"><pre>size_type</pre>
+ </TD>
+ </TR>
+ <TR>
+ <TD ALIGN="left"><pre>value_type</pre>
+ </TD>
+ <TD ALIGN="left"><pre>std::pair&lt;<b>const</b> Key, size_type&gt;</pre>
+ </TD>
+ </TR>
+ <TR>
+ <TD ALIGN="left"><pre>mapped_value_type</pre>
+ </TD>
+ <TD ALIGN="left"><pre><b>const</b> Key</pre>
+ </TD>
+ </TR>
+</TABLE>
+
+<p>
+ The above types allow to define simple invariants on the interfaces of
+containers. For example, each container defines both an <tt>insert</tt> method
+which takes a const reference to a <tt>value_type</tt>, and an <tt>insert</tt> method
+which takes a const reference to a <tt>mapped_value_type</tt>. Containers for
+which both these types are synonymous (<i>i.e.</i>, maps and sets), consequently
+have a
+single <tt>insert</tt> method. Containers for which these types are distinct (<i>i.e.</i>,
+multimaps and multisets), use overloading.
+</p>
+
+
+
+
+
+<h2><a name="generics">Generics</a></h2>
+<p>
+ <tt>pb_assoc</tt> contains a number of utility classes to ease generic
+programming.
+</p>
+
+<p>
+ There are four container-type identifiers, <a href="is_map_type.html"><tt>is_map_type</tt></a>,
+<a href="is_set_type.html"><tt>is_set_type</tt></a>, <a href="is_multimap_type.html">
+ <tt>is_multimap_type</tt></a>, and <a href="is_multiset_type.html"><tt>is_multiset_type</tt></a>.
+Given a container <tt>T</tt>, for example, it is possible to query at compile
+time whether it is a a multimap type by writing <tt>is_multimap_type&lt;T&gt;::value</tt>.
+(This is probably very similar to [<a href="references.html#boost_concept_check">boost_concept_check</a>]
+and [<a href="references.html#boost_type_traits">boost_type_traits</a>].)
+</p>
+
+<p>
+ In some cases, it is necessary, given a container and an iterator, to query the
+iterator' <tt>value_type</tt> to the container's <tt>value_type</tt> and <tt>mapped_value_type</tt>.
+The classes
+<a href="is_mapped_value_iterator.html"><tt>is_mapped_value_iterator</tt></a>
+and <a href="iterator_key.html"><tt>iterator_key</tt></a> can be used for this.
+</p>
+
+<p>
+ The STL's <tt>std::multimap</tt> and <tt>std::multiset</tt> allow iterating
+over all <tt>value_type</tt>s stored in them, which is convenient. The library
+provides a <a href="value_iterators.html"><tt>value_iterator</tt></a> for this.
+This is an iterator adapter over the containers' native iterators.
+</p>
+
+
+
+
+<h2><a name = "compound_keys">Compound Keys</a></h2>
+
+<p>
+ The STL allows using equivalent, non-identical, keys.
+For example, let <tt>interval</tt> be a line-interval class,
+<tt>color</tt> be a
+color type, <tt>thickness</tt> be a thickness type, and <tt>colored_interval</tt>
+be a class composed of an <tt>interval</tt> and a <tt>color</tt>.
+</p>
+
+<p>
+ Suppose one wants to store <tt>colored_interval</tt>
+objects using a comparison predicate ignoring colors. Then
+in the STL's design, one would use
+<tt>multiset&lt;colored_interval&gt;</tt>; in <tt>pb_assoc</tt>'s design,
+one would use one of the following:
+</p>
+<ol>
+ <li>
+ A map mapping <tt>interval</tt> objects to
+<tt>color</tt> objects. This, however, assumes that
+<tt>colored_interval</tt> is decomposable to, and constructible from,
+<tt>interval</tt> and <tt>color</tt>.
+ </li>
+ <li>
+ A map mapping <tt>colored_interval</tt> objects to
+<tt>color</tt> objects. In this (less efficient) case, a <tt>colored_interval</tt> object
+is a "representative" of all colored intervals with the same endpoints.
+ </li>
+</ol>
+
+<p>
+ Suppose one wants to map <tt>colored_interval</tt>
+objects to <tt>thickness</tt> objects
+using a comparison predicate ignoring colors. Then
+in the STL's design, one would use
+<tt>multimap&lt;colored_interval, thickness&gt;</tt>; in <tt>pb_assoc</tt>'s design,
+one would use one of the following:
+</p>
+<ol>
+ <li> A map mapping <tt>interval</tt> objects to
+<tt>std::pair&lt;color, thickness&gt;</tt> objects. This, however, assumes that
+<tt>colored_interval</tt> is decomposable to, and constructible from,
+<tt>interval</tt> and <tt>color</tt>.
+ </li>
+ <li> A map mapping <tt>colored_interval</tt> objects to
+<tt>std::pair&lt;color, thickness&gt;</tt> objects. In this (less efficient) case, a <tt>colored_interval</tt> object
+is a "representative" of all colored intervals with the same endpoints.
+ </li>
+</ol>
+
+<p>
+(From the above, it is apparent that the STL's design has an advantage
+over <tt>pb_assoc</tt>'s design in terms of convenience. Nonethless, there
+are efficiency limitation in the STL's design (see
+<a href = "motivation.html#unique_key">Unique-Key Design for Multimaps and Multisets</a>).)
+</p>
+
+<p>
+ The above example, using intervals, colors and thicknesses, can be generalized.
+Let
+<tt>key_unique_part</tt> be a unique part of some key
+(<i>e.g.</i>, <tt>interval</tt> in the above),
+<tt>key_non_unique_part</tt> be a non-unique part of some key
+(<i>e.g.</i>, <tt>color</tt> in the above),
+<tt>key</tt> be some key composed of unique and non-uniqe parts
+(<i>e.g.</i>, <tt>colored_interval</tt> in the above),
+and
+<tt>data</tt> be some data
+(<i>e.g.</i>, <tt>thickness</tt> in the above).
+Then the <a href = "#stl_to_pb_assoc_non_unique_mapping">
+figure shows some
+STL containers and the <tt>pb_assoc</tt> counterparts.
+</a>
+
+</p>
+
+
+<h6 align = "center">
+<a name = "stl_to_pb_assoc_non_unique_mapping">
+<img src = "stl_to_pb_assoc_non_unique_mapping.jpg" alt = "no-image" width = "60%">
+</a>
+</h6>
+<h6 align = "center">
+STL containers and <tt>pb_assoc</tt> counterparts.
+</h6>
+
+
+</body>
+</html>
diff --git a/libstdc++-v3/docs/html/ext/pb_assoc/non_unique_mapping_containers.jpg b/libstdc++-v3/docs/html/ext/pb_assoc/non_unique_mapping_containers.jpg
new file mode 100644
index 00000000000..3bdacd005fa
--- /dev/null
+++ b/libstdc++-v3/docs/html/ext/pb_assoc/non_unique_mapping_containers.jpg
Binary files differ
diff --git a/libstdc++-v3/docs/html/ext/pb_assoc/null_data_type.html b/libstdc++-v3/docs/html/ext/pb_assoc/null_data_type.html
new file mode 100644
index 00000000000..b5d0120c88c
--- /dev/null
+++ b/libstdc++-v3/docs/html/ext/pb_assoc/null_data_type.html
@@ -0,0 +1,41 @@
+
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
+
+
+<html>
+<head>
+<title>null_data_type Interface
+</title>
+
+</head>
+
+<body>
+<h1>
+<tt>null_data_type
+</tt>
+
+ Interface
+
+
+</h1>
+
+<p>A data-policy indicating that an associative container is a &quot;set&quot;
+</p>
+
+<ol>
+<li>
+<a href = "../../../../include/ext/pb_assoc/data_type.hpp"><tt>data_type.hpp</tt>
+</a>
+
+</li>
+
+</ol>
+
+
+
+
+</body>
+
+</html>
+
+
diff --git a/libstdc++-v3/docs/html/ext/pb_assoc/null_hash_fn.html b/libstdc++-v3/docs/html/ext/pb_assoc/null_hash_fn.html
new file mode 100644
index 00000000000..083de7efb54
--- /dev/null
+++ b/libstdc++-v3/docs/html/ext/pb_assoc/null_hash_fn.html
@@ -0,0 +1,44 @@
+
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
+
+
+<html>
+<head>
+<title>null_hash_fn Interface
+</title>
+
+</head>
+
+<body>
+<h1>
+<tt>null_hash_fn
+</tt>
+
+ Interface
+
+
+</h1>
+
+<p>A &quot;null&quot; hash function, indicating that the combining hash function is actually a ranged-hash function.
+</p>
+
+<p><a href = "concepts.html#concepts_null_policies">Null Policy Classes</a> explains the concept ofa null policy.
+</p>
+
+<ol>
+<li>
+<a href = "../../../../include/ext/pb_assoc/hash_policy.hpp"><tt>hash_policy.hpp</tt>
+</a>
+
+</li>
+
+</ol>
+
+
+
+
+</body>
+
+</html>
+
+
diff --git a/libstdc++-v3/docs/html/ext/pb_assoc/null_probe_fn.html b/libstdc++-v3/docs/html/ext/pb_assoc/null_probe_fn.html
new file mode 100644
index 00000000000..1088b6bfd7b
--- /dev/null
+++ b/libstdc++-v3/docs/html/ext/pb_assoc/null_probe_fn.html
@@ -0,0 +1,44 @@
+
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
+
+
+<html>
+<head>
+<title>null_probe_fn Interface
+</title>
+
+</head>
+
+<body>
+<h1>
+<tt>null_probe_fn
+</tt>
+
+ Interface
+
+
+</h1>
+
+<p>A &quot;null&quot; probe function, indicating that the combining probe function is actually a ranged probe function.
+</p>
+
+<p><a href = "concepts.html#concepts_null_policies">Null Policy Classes</a> explains the concept ofa null policy.
+</p>
+
+<ol>
+<li>
+<a href = "../../../../include/ext/pb_assoc/hash_policy.hpp"><tt>hash_policy.hpp</tt>
+</a>
+
+</li>
+
+</ol>
+
+
+
+
+</body>
+
+</html>
+
+
diff --git a/libstdc++-v3/docs/html/ext/pb_assoc/order_by_key.html b/libstdc++-v3/docs/html/ext/pb_assoc/order_by_key.html
new file mode 100644
index 00000000000..0b37f5399b5
--- /dev/null
+++ b/libstdc++-v3/docs/html/ext/pb_assoc/order_by_key.html
@@ -0,0 +1,254 @@
+
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
+
+
+<html>
+<head>
+<title>order_by_key Interface
+</title>
+
+</head>
+
+<body>
+<h1>
+<tt>order_by_key
+</tt>
+
+ Interface
+
+
+</h1>
+
+<p>Finds an order corresponding to an entry within the sequence.
+</p>
+
+<ol>
+<li>
+<a href = "../../../../include/ext/pb_assoc/order_statistics_key.hpp"><tt>order_statistics_key.hpp</tt>
+</a>
+
+</li>
+
+<li>
+<a href = "#link1">Template parameters.
+</a>
+
+</li>
+
+<li>
+Public Types and Constants:
+
+
+<ol>
+<li>
+<a href = "#link2">Key-type definitions.
+</a>
+
+</li>
+
+<li>
+<a href = "#link3">Container definitions.
+</a>
+
+</li>
+
+</ol>
+
+</li>
+
+<li>
+Public Methods:
+
+
+<ol>
+<li>
+<a href = "#link4">Operators.
+</a>
+
+</li>
+
+</ol>
+
+</li>
+
+</ol>
+
+
+<h2>
+<a name = "link1">Template parameters.
+</a>
+
+</h2>
+
+<table WIDTH = "100%" BORDER = "1">
+<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 = "Cntnr3735929076">Cntnr</a></pre>
+
+
+</td>
+
+<td>
+<p>Container type.</p>
+
+
+</td>
+
+<td>
+-
+
+
+</td>
+
+</tr>
+
+</table>
+
+<h2>
+<a name = "link2">Key-type definitions.
+</a>
+
+</h2>
+
+<table WIDTH = "100%" BORDER = "1">
+<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 = "order_statistics_key_type3735929828">order_statistics_key_type</a></pre>
+
+
+</td>
+
+<td>
+<pre><b>typename</b> <a href = "#Cntnr3735929076">Cntnr</a>::key_type</pre>
+
+
+</td>
+
+<td>
+<p>Order-statistics key type.</p>
+
+
+</td>
+
+</tr>
+
+<tr>
+<td>
+<pre><a name = "underlying_key_type3735929533">underlying_key_type</a></pre>
+
+
+</td>
+
+<td>
+<pre><b>typename</b> <a href = "#order_statistics_key_type3735929828">order_statistics_key_type</a>::key_type</pre>
+
+
+</td>
+
+<td>
+<p>Underlying key type.</p>
+
+
+</td>
+
+</tr>
+
+</table>
+
+<h2>
+<a name = "link3">Container definitions.
+</a>
+
+</h2>
+
+<table WIDTH = "100%" BORDER = "1">
+<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 = "cntnr3735929108">cntnr</a></pre>
+
+
+</td>
+
+<td>
+<pre><a href = "#Cntnr3735929076">Cntnr</a></pre>
+
+
+</td>
+
+<td>
+<p>Container type.</p>
+
+
+</td>
+
+</tr>
+
+<tr>
+<td>
+<pre><a name = "size_type3735929547">size_type</a></pre>
+
+
+</td>
+
+<td>
+<pre><b>typename</b> <a href = "#cntnr3735929108">cntnr</a>::size_type</pre>
+
+
+</td>
+
+<td>
+<p>Container's size type.</p>
+
+
+</td>
+
+</tr>
+
+</table>
+
+<h2>
+<a name = "link4">Operators.
+</a>
+
+</h2>
+
+<table WIDTH = "100%" BORDER = "1">
+<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> <a href = "#size_type3735929547">size_type</a>
+ <b>operator</b>()
+ (<b>const</b> <a href = "#Cntnr3735929076">Cntnr</a> &amp;r_c,
+ <b>const</b> <a href = "#underlying_key_type3735929533">underlying_key_type</a> &amp;r_key) <b>const</b></pre>
+
+
+</td>
+
+<td>
+<p>Returns the order of a key within a sequence. For exapmle, if <font color = "#666666"><tt>r_key</tt></font> is the smallest key in <font color = "#666666"><tt>r_c</tt></font>, this method will return 0; if <font color = "#666666"><tt>r_key</tt></font> is a key between the smallest and next key in <font color = "#666666"><tt>r_c</tt></font>, this method will return 1; if <font color = "#666666"><tt>r_key</tt></font> is a key larger than the largest key in <font color = "#666666"><tt>r_c</tt></font>, this method will return the size of <font color = "#666666"><tt>r_c</tt></font>.</p>
+
+
+</td>
+
+</tr>
+
+</table>
+
+
+
+</body>
+
+</html>
+
+
diff --git a/libstdc++-v3/docs/html/ext/pb_assoc/order_statistics_key.html b/libstdc++-v3/docs/html/ext/pb_assoc/order_statistics_key.html
new file mode 100644
index 00000000000..74179105d26
--- /dev/null
+++ b/libstdc++-v3/docs/html/ext/pb_assoc/order_statistics_key.html
@@ -0,0 +1,373 @@
+
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
+
+
+<html>
+<head>
+<title>order_statistics_key Interface
+</title>
+
+</head>
+
+<body>
+<h1>
+<tt>order_statistics_key
+</tt>
+
+ Interface
+
+
+</h1>
+
+<p>A &quot;key&quot; type using rank metadata for order statistics.
+</p>
+
+<p>The class is composed of the logical key and the rank of the element (the number of elements in its subtree).
+</p>
+
+<ol>
+<li>
+<a href = "../../../../include/ext/pb_assoc/order_statistics_key.hpp"><tt>order_statistics_key.hpp</tt>
+</a>
+
+</li>
+
+<li>
+<a href = "#link1">Template parameters.
+</a>
+
+</li>
+
+<li>
+Public Types and Constants:
+
+
+<ol>
+<li>
+<a href = "#link2">Policy definitions.
+</a>
+
+</li>
+
+<li>
+<a href = "#link3">Key-type definitions.
+</a>
+
+</li>
+
+<li>
+<a href = "#link4">Misc.
+</a>
+
+</li>
+
+</ol>
+
+</li>
+
+<li>
+Public Methods:
+
+
+<ol>
+<li>
+<a href = "#link5">Constructors, destructor, and related.
+</a>
+
+</li>
+
+<li>
+<a href = "#link6">Conversions.
+</a>
+
+</li>
+
+</ol>
+
+</li>
+
+</ol>
+
+
+<h2>
+<a name = "link1">Template parameters.
+</a>
+
+</h2>
+
+<table WIDTH = "100%" BORDER = "1">
+<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 = "Key3735928856">Key</a></pre>
+
+
+</td>
+
+<td>
+<p>Key type.</p>
+
+
+</td>
+
+<td>
+-
+
+
+</td>
+
+</tr>
+
+<tr>
+<td>
+<pre><a name = "Allocator3735929488">Allocator</a></pre>
+
+
+</td>
+
+<td>
+<p>Allocator type.</p>
+
+
+<p>The allocator is only used for definitions, e.g., size_type, pointer, and reference.</p>
+
+
+</td>
+
+<td>
+<pre>std::allocator&lt;<b>char</b>&gt;</pre>
+
+
+</td>
+
+</tr>
+
+</table>
+
+<h2>
+<a name = "link2">Policy definitions.
+</a>
+
+</h2>
+
+<table WIDTH = "100%" BORDER = "1">
+<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 = "allocator3735929520">allocator</a></pre>
+
+
+</td>
+
+<td>
+<pre><a href = "#Allocator3735929488">Allocator</a></pre>
+
+
+</td>
+
+<td>
+<p>Allocator type.</p>
+
+
+</td>
+
+</tr>
+
+</table>
+
+<h2>
+<a name = "link3">Key-type definitions.
+</a>
+
+</h2>
+
+<table WIDTH = "100%" BORDER = "1">
+<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_type3735929433">key_type</a></pre>
+
+
+</td>
+
+<td>
+<pre><a href = "#Key3735928856">Key</a></pre>
+
+
+</td>
+
+<td>
+<p>Key type.</p>
+
+
+</td>
+
+</tr>
+
+<tr>
+<td>
+<pre><a name = "const_key_reference3735929552">const_key_reference</a></pre>
+
+
+</td>
+
+<td>
+<pre><b>typename</b> <a href = "#Allocator3735929488">Allocator</a>::<b>template</b> rebind&lt;
+ <a href = "#Key3735928856">Key</a> &gt;::other::const_reference</pre>
+
+
+</td>
+
+<td>
+<p>Const key reference type.</p>
+
+
+</td>
+
+</tr>
+
+<tr>
+<td>
+<pre><a name = "key_reference3735929926">key_reference</a></pre>
+
+
+</td>
+
+<td>
+<pre><b>typename</b> <a href = "#Allocator3735929488">Allocator</a>::<b>template</b> rebind&lt;
+ <a href = "#Key3735928856">Key</a> &gt;::other::reference</pre>
+
+
+</td>
+
+<td>
+<p>Key reference type.</p>
+
+
+</td>
+
+</tr>
+
+</table>
+
+<h2>
+<a name = "link4">Misc.
+</a>
+
+</h2>
+
+<table WIDTH = "100%" BORDER = "1">
+<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_type3735929547">size_type</a></pre>
+
+
+</td>
+
+<td>
+<pre><b>typename</b> <a href = "#allocator3735929520">allocator</a>::size_type</pre>
+
+
+</td>
+
+<td>
+<p>Size type.</p>
+
+
+</td>
+
+</tr>
+
+</table>
+
+<h2>
+<a name = "link5">Constructors, destructor, and related.
+</a>
+
+</h2>
+
+<table WIDTH = "100%" BORDER = "1">
+<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>explicit</b>
+ order_statistics_key
+ (<a href = "#const_key_reference3735929552">const_key_reference</a> r_key = <a href = "#Key3735928856">Key</a>())</pre>
+
+
+</td>
+
+<td>
+<p>Constructor which takes a logical key.</p>
+
+
+</td>
+
+</tr>
+
+</table>
+
+<h2>
+<a name = "link6">Conversions.
+</a>
+
+</h2>
+
+<table WIDTH = "100%" BORDER = "1">
+<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>operator</b> <a href = "#key_reference3735929926">key_reference</a>
+ ()</pre>
+
+
+</td>
+
+<td>
+<p>Conversion to logical key.</p>
+
+
+</td>
+
+</tr>
+
+<tr>
+<td>
+<pre> <b>inline</b>
+ <b>operator</b> <a href = "#key_type3735929433">key_type</a>
+ () <b>const</b></pre>
+
+
+</td>
+
+<td>
+<p>Conversion to logical key.</p>
+
+
+</td>
+
+</tr>
+
+</table>
+
+
+
+</body>
+
+</html>
+
+
diff --git a/libstdc++-v3/docs/html/ext/pb_assoc/order_statistics_key_cmp.html b/libstdc++-v3/docs/html/ext/pb_assoc/order_statistics_key_cmp.html
new file mode 100644
index 00000000000..d85f4fa9900
--- /dev/null
+++ b/libstdc++-v3/docs/html/ext/pb_assoc/order_statistics_key_cmp.html
@@ -0,0 +1,422 @@
+
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
+
+
+<html>
+<head>
+<title>order_statistics_key_cmp Interface
+</title>
+
+</head>
+
+<body>
+<h1>
+<tt>order_statistics_key_cmp
+</tt>
+
+ Interface
+
+
+</h1>
+
+<p>A comparison functor. Transforms any comparison functor operating on logical keys to a comparison functor operating on order statistics keys.
+</p>
+
+<ol>
+<li>
+<a href = "../../../../include/ext/pb_assoc/order_statistics_key.hpp"><tt>order_statistics_key.hpp</tt>
+</a>
+
+</li>
+
+<li>
+<a href = "#link1">Template parameters.
+</a>
+
+</li>
+
+<li>
+<a href = "#link2">Base classes.
+</a>
+
+</li>
+
+<li>
+Public Types and Constants:
+
+
+<ol>
+<li>
+<a href = "#link3">Policy definitions.
+</a>
+
+</li>
+
+<li>
+<a href = "#link4">Key-type definitions.
+</a>
+
+</li>
+
+</ol>
+
+</li>
+
+<li>
+Public Methods:
+
+
+<ol>
+<li>
+<a href = "#link5">Constructors, destructor, and related.
+</a>
+
+</li>
+
+<li>
+<a href = "#link6">Operators.
+</a>
+
+</li>
+
+<li>
+<a href = "#link7">Policy access methods.
+</a>
+
+</li>
+
+</ol>
+
+</li>
+
+</ol>
+
+
+<h2>
+<a name = "link1">Template parameters.
+</a>
+
+</h2>
+
+<table WIDTH = "100%" BORDER = "1">
+<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 = "Cmp_Fn3735929122">Cmp_Fn</a></pre>
+
+
+</td>
+
+<td>
+<p>Comparison functor.</p>
+
+
+</td>
+
+<td>
+<pre>std::less&lt;<a href = "#Key3735928856">Key</a>&gt;</pre>
+
+
+</td>
+
+</tr>
+
+<tr>
+<td>
+<pre><a name = "Allocator3735929488">Allocator</a></pre>
+
+
+</td>
+
+<td>
+<p>Allocator type.</p>
+
+
+<p>The allocator is only used for definitions, e.g., size_type, pointer, and reference.</p>
+
+
+</td>
+
+<td>
+<pre>std::allocator&lt;<b>char</b>&gt;</pre>
+
+
+</td>
+
+</tr>
+
+</table>
+
+<h2>
+<a name = "link2">Base classes.
+</a>
+
+</h2>
+
+<table WIDTH = "100%" BORDER = "1">
+<TR><TD Width = "80%" ALIGN = "left"><b>Class</b></TD><TD Width = "20%" ALIGN = "left"><b>Derivation Type</b></TD></TR>
+
+
+<tr>
+<td>
+<pre>std::binary_function&lt;
+ order_statistics_key&lt;
+ <b>typename</b> <a href = "#Cmp_Fn3735929122">Cmp_Fn</a>::first_argument_type, <a href = "#Allocator3735929488">Allocator</a>&gt;,
+ order_statistics_key&lt;
+ <b>typename</b> <a href = "#Cmp_Fn3735929122">Cmp_Fn</a>::second_argument_type, <a href = "#Allocator3735929488">Allocator</a>&gt;,
+ <b>bool</b>&gt;</pre>
+
+
+</td>
+
+<td>
+<p>public</p>
+
+
+</td>
+
+</tr>
+
+</table>
+
+<h2>
+<a name = "link3">Policy definitions.
+</a>
+
+</h2>
+
+<table WIDTH = "100%" BORDER = "1">
+<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 = "allocator3735929520">allocator</a></pre>
+
+
+</td>
+
+<td>
+<pre><a href = "#Allocator3735929488">Allocator</a></pre>
+
+
+</td>
+
+<td>
+<p>Allocator type.</p>
+
+
+</td>
+
+</tr>
+
+<tr>
+<td>
+<pre><a name = "cmp_fn3735929186">cmp_fn</a></pre>
+
+
+</td>
+
+<td>
+<pre><a href = "#Cmp_Fn3735929122">Cmp_Fn</a></pre>
+
+
+</td>
+
+<td>
+<p>Comparison functor type.</p>
+
+
+</td>
+
+</tr>
+
+</table>
+
+<h2>
+<a name = "link4">Key-type definitions.
+</a>
+
+</h2>
+
+<table WIDTH = "100%" BORDER = "1">
+<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_type3735929433">key_type</a></pre>
+
+
+</td>
+
+<td>
+<pre>order_statistics_key&lt;
+ <b>typename</b> <a href = "#Cmp_Fn3735929122">Cmp_Fn</a>::first_argument_type, <a href = "#Allocator3735929488">Allocator</a>&gt;</pre>
+
+
+</td>
+
+<td>
+<p>Key type.</p>
+
+
+</td>
+
+</tr>
+
+<tr>
+<td>
+<pre><a name = "const_key_reference3735929552">const_key_reference</a></pre>
+
+
+</td>
+
+<td>
+<pre><b>typename</b> <a href = "#allocator3735929520">allocator</a>::<b>template</b> rebind&lt;
+ <a href = "#key_type3735929433">key_type</a>&gt;::other::const_reference</pre>
+
+
+</td>
+
+<td>
+<p>Const key reference type.</p>
+
+
+</td>
+
+</tr>
+
+</table>
+
+<h2>
+<a name = "link5">Constructors, destructor, and related.
+</a>
+
+</h2>
+
+<table WIDTH = "100%" BORDER = "1">
+<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>
+ order_statistics_key_cmp
+ ()</pre>
+
+
+</td>
+
+<td>
+<p>Default constructor.</p>
+
+
+</td>
+
+</tr>
+
+<tr>
+<td>
+<pre><b>inline</b>
+ order_statistics_key_cmp
+ (<b>const</b> <a href = "#Cmp_Fn3735929122">Cmp_Fn</a> &amp;r_cmp_fn)</pre>
+
+
+</td>
+
+<td>
+<p>Constructor taking a comparison functor.</p>
+
+
+</td>
+
+</tr>
+
+</table>
+
+<h2>
+<a name = "link6">Operators.
+</a>
+
+</h2>
+
+<table WIDTH = "100%" BORDER = "1">
+<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>bool</b>
+ <b>operator</b>()
+ (<a href = "#const_key_reference3735929552">const_key_reference</a> r_lhs_key,
+ <a href = "#const_key_reference3735929552">const_key_reference</a> r_rhs_key) <b>const</b></pre>
+
+
+</td>
+
+<td>
+<p>Compares two keys.</p>
+
+
+</td>
+
+</tr>
+
+</table>
+
+<h2>
+<a name = "link7">Policy access methods.
+</a>
+
+</h2>
+
+<table WIDTH = "100%" BORDER = "1">
+<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> <a href = "#cmp_fn3735929186">cmp_fn</a> &amp;
+ get_cmp_fn
+ ()</pre>
+
+
+</td>
+
+<td>
+<p>Access to the comparison functor object used.</p>
+
+
+</td>
+
+</tr>
+
+<tr>
+<td>
+<pre><b>inline</b> <b>const</b> <a href = "#cmp_fn3735929186">cmp_fn</a> &amp;
+ get_cmp_fn
+ () <b>const</b></pre>
+
+
+</td>
+
+<td>
+<p>Const access to the comparison functor object used.</p>
+
+
+</td>
+
+</tr>
+
+</table>
+
+
+
+</body>
+
+</html>
+
+
diff --git a/libstdc++-v3/docs/html/ext/pb_assoc/order_statistics_node_updator.html b/libstdc++-v3/docs/html/ext/pb_assoc/order_statistics_node_updator.html
new file mode 100644
index 00000000000..a9acbb40867
--- /dev/null
+++ b/libstdc++-v3/docs/html/ext/pb_assoc/order_statistics_node_updator.html
@@ -0,0 +1,278 @@
+
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
+
+
+<html>
+<head>
+<title>order_statistics_node_updator Interface
+</title>
+
+</head>
+
+<body>
+<h1>
+<tt>order_statistics_node_updator
+</tt>
+
+ Interface
+
+
+</h1>
+
+<p>Functor updating ranks of entries.
+</p>
+
+<ol>
+<li>
+<a href = "../../../../include/ext/pb_assoc/order_statistics_key.hpp"><tt>order_statistics_key.hpp</tt>
+</a>
+
+</li>
+
+<li>
+<a href = "#link1">Template parameters.
+</a>
+
+</li>
+
+<li>
+Public Types and Constants:
+
+
+<ol>
+<li>
+<a href = "#link2">Policy definitions.
+</a>
+
+</li>
+
+<li>
+<a href = "#link3">Key-type definitions.
+</a>
+
+</li>
+
+</ol>
+
+</li>
+
+<li>
+Public Methods:
+
+
+<ol>
+<li>
+<a href = "#link4">Constructors, destructor, and related.
+</a>
+
+</li>
+
+</ol>
+
+</li>
+
+</ol>
+
+
+<h2>
+<a name = "link1">Template parameters.
+</a>
+
+</h2>
+
+<table WIDTH = "100%" BORDER = "1">
+<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 = "Key3735928856">Key</a></pre>
+
+
+</td>
+
+<td>
+<p>Key type.</p>
+
+
+</td>
+
+<td>
+-
+
+
+</td>
+
+</tr>
+
+<tr>
+<td>
+<pre><a name = "Allocator3735929488">Allocator</a></pre>
+
+
+</td>
+
+<td>
+<p>Allocator type.</p>
+
+
+<p>The allocator is only used for definitions, e.g., size_type, pointer, and reference.</p>
+
+
+</td>
+
+<td>
+<pre>std::allocator&lt;<b>char</b>&gt;</pre>
+
+
+</td>
+
+</tr>
+
+</table>
+
+<h2>
+<a name = "link2">Policy definitions.
+</a>
+
+</h2>
+
+<table WIDTH = "100%" BORDER = "1">
+<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 = "allocator3735929520">allocator</a></pre>
+
+
+</td>
+
+<td>
+<pre><a href = "#Allocator3735929488">Allocator</a></pre>
+
+
+</td>
+
+<td>
+<p>Allocator type.</p>
+
+
+</td>
+
+</tr>
+
+</table>
+
+<h2>
+<a name = "link3">Key-type definitions.
+</a>
+
+</h2>
+
+<table WIDTH = "100%" BORDER = "1">
+<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_type3735929433">key_type</a></pre>
+
+
+</td>
+
+<td>
+<pre>order_statistics_key&lt;
+ <a href = "#Key3735928856">Key</a>,
+ <a href = "#Allocator3735929488">Allocator</a>&gt;</pre>
+
+
+</td>
+
+<td>
+<p>Key-type on which this functor operates.</p>
+
+
+</td>
+
+</tr>
+
+<tr>
+<td>
+<pre><a name = "const_key_pointer3735929445">const_key_pointer</a></pre>
+
+
+</td>
+
+<td>
+<pre><b>typename</b> <a href = "#Allocator3735929488">Allocator</a>::<b>template</b> rebind&lt;
+ <a href = "#key_type3735929433">key_type</a>&gt;::other::const_pointer</pre>
+
+
+</td>
+
+<td>
+<p>Key pointer-type on which this functor operates.</p>
+
+
+</td>
+
+</tr>
+
+</table>
+
+<h2>
+<a name = "link4">Constructors, destructor, and related.
+</a>
+
+</h2>
+
+<table WIDTH = "100%" BORDER = "1">
+<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>
+ swap
+ (<font color = "olive">order_statistics_node_updator</font> &amp;r_other)</pre>
+
+
+</td>
+
+<td>
+<p>Swaps content.</p>
+
+
+</td>
+
+</tr>
+
+<tr>
+<td>
+<pre><b>inline</b> <b>void</b>
+ <b>operator</b>()
+ (<a href = "#const_key_pointer3735929445">const_key_pointer</a> p_key,
+ <a href = "#const_key_pointer3735929445">const_key_pointer</a> p_l_child_key,
+ <a href = "#const_key_pointer3735929445">const_key_pointer</a> p_r_child_key)</pre>
+
+
+</td>
+
+<td>
+<p>Updates the rank of a key given its child keys.</p>
+
+
+</td>
+
+</tr>
+
+</table>
+
+
+
+</body>
+
+</html>
+
+
diff --git a/libstdc++-v3/docs/html/ext/pb_assoc/ov_tree_ds_tag.html b/libstdc++-v3/docs/html/ext/pb_assoc/ov_tree_ds_tag.html
new file mode 100644
index 00000000000..38878b6e0ae
--- /dev/null
+++ b/libstdc++-v3/docs/html/ext/pb_assoc/ov_tree_ds_tag.html
@@ -0,0 +1,74 @@
+
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
+
+
+<html>
+<head>
+<title>ov_tree_ds_tag Interface
+</title>
+
+</head>
+
+<body>
+<h1>
+<tt>ov_tree_ds_tag
+</tt>
+
+ Interface
+
+
+</h1>
+
+<p>Ordered-vector tree data-structure tag.
+</p>
+
+<ol>
+<li>
+<a href = "../../../../include/ext/pb_assoc/ds_trait.hpp"><tt>ds_trait.hpp</tt>
+</a>
+
+</li>
+
+<li>
+<a href = "#link1">Base classes.
+</a>
+
+</li>
+
+</ol>
+
+
+<h2>
+<a name = "link1">Base classes.
+</a>
+
+</h2>
+
+<table WIDTH = "100%" BORDER = "1">
+<TR><TD Width = "80%" ALIGN = "left"><b>Class</b></TD><TD Width = "20%" ALIGN = "left"><b>Derivation Type</b></TD></TR>
+
+
+<tr>
+<td>
+<pre><a href = "basic_tree_ds_tag.html"><tt>basic_tree_ds_tag</tt></a></pre>
+
+
+</td>
+
+<td>
+<p>public</p>
+
+
+</td>
+
+</tr>
+
+</table>
+
+
+
+</body>
+
+</html>
+
+
diff --git a/libstdc++-v3/docs/html/ext/pb_assoc/overview.html b/libstdc++-v3/docs/html/ext/pb_assoc/overview.html
new file mode 100644
index 00000000000..0caa3708fd7
--- /dev/null
+++ b/libstdc++-v3/docs/html/ext/pb_assoc/overview.html
@@ -0,0 +1,139 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
+<html>
+ <head>
+ <title>Overview</title>
+ <meta name="GENERATOR" content="Microsoft Visual Studio .NET 7.1">
+ <meta name="vs_targetSchema" content="http://schemas.microsoft.com/intellisense/ie5">
+ </head>
+<body bgcolor = "white">
+
+
+<h1>Overview</h1>
+
+<p>
+ The <a href = "introduction.html">Introduction</a> Section described some challenges
+in designing associative containers. This section describes the <tt>pb_assoc</tt>'s solution.
+</p>
+
+
+<p>
+Figure
+<a href = "#cd">Class hierarchy</a>
+shows a class diagram of <tt>pb_assoc's associative containers.</tt>
+Associative container classes subclass other associative container classes such that
+base classes capture common types and methods
+[<a href = "references.html#stroustrup97cpp">stroustrup97cpp</a>]. The type <tt>hash_fn</tt> is defined in <a href = "basic_hash_assoc_cntnr.html"><tt>basic_hash_assoc_cntnr</tt></a>, for example, since all hash-based containers employ a hash function;
+<a href = "cc_hash_assoc_cntnr.html"><tt>cc_hash_assoc_cntnr</tt></a>
+and
+<a href = "gp_hash_assoc_cntnr.html"><tt>gp_hash_assoc_cntnr</tt></a>,
+subclasses encapsulating a collision-chaining and (general) probing hash table, respectively, each define other types specific for their underlying data-structure.
+This is described further in
+<a href = "ds_gen.html">Data-Structure Genericity</a>.
+</p>
+
+<h6 align = "center">
+<a name = "cd">
+<img src = "cd.jpg" width = "70%" alt = "no image">
+</h6>
+</a>
+<h6 align = "center">
+Class hierarchy.
+</h6>
+
+<p>
+ It is sometimes useful to know the underlying data-structure.
+Associative containers internally define <tt>ds_category</tt> as a class describing this. Two classes might be different instantiations
+of
+<a href = "tree_assoc_cntnr.html"><tt>tree_assoc_cntnr</tt></a>, but one might be based on a red-black tree while another might be based on a splay tree. (This might affect the way tree objects should be manipulated.) <tt><b>typename</b> Cntnr::ds_category</tt>
+yields a &quot;tag&quot; class for the underlying data-structure of some type
+<tt>Cntnr</tt>.
+This is described further in
+<a href = "ds_gen.html">Data-Structure Genericity</a>.
+</p>
+
+<p>
+ When manipulating generic containers, it is useful to know which types, methods, and guarantees they support. For example, tree-based containers can support split and join operations, while containers based on most other underlying data-structures cannot.
+These questions can be answered in compile time through a traits mechanism.
+<a href = "ds_traits.html"><tt>ds_traits</tt>&lt;Cntnr&gt;::split_join</a>, for example, answers the above question.
+This is described further in
+<a href = "ds_gen.html">Data-Structure Genericity</a>;
+<a href = "../example/ds_traits_example.cpp"><tt>ds_traits_example.cpp</tt></a>-
+shows an example.
+</p>
+
+<p>
+ <tt>pb_assoc</tt> does not contain separate containers for different mapping semantics,
+as the STL does (<i>e.g.</i>, <tt>std::map</tt> and <tt>std::multimap</tt>). Rather, containers are parameterized by a <tt>Data</tt> parameter, and this parameter is a policy for the mapping semantics.
+</p>
+<ol>
+ <li>
+ Instantiating a container's <tt>Data</tt> parameter by all but two distingished types, will make a &quot;map&quot;. Thus
+<pre>
+<a href = "cc_hash_assoc_cntnr.html">cc_hash_assoc_cntnr</a>&lt;
+ <b>int</b>,
+ <b>char</b>&gt;
+</pre> is a type mapping each <tt><b>int</b></tt> value to a <tt><b>char</b></tt>
+ value.
+ <a href = "../example/basic_map_example.cpp"><tt>basic_map_example.cpp</tt></a>
+ shows an example.
+ </li>
+ <li>
+ Instantiating a container's <tt>Data</tt> parameter by <a href = "null_data_type.html"><tt>null_data_type</tt></a> will make a &quot;set&quot;. Thus
+<pre>
+<a href = "cc_hash_assoc_cntnr.html">cc_hash_assoc_cntnr</a>&lt;
+ <b>int</b>,
+ <a href = "null_data_type.html">null_data_type</a>&gt;
+</pre>
+is a type storing unique <tt><b>int</b></tt> values.
+<a href = "../example/basic_set_example.cpp"><tt>basic_set_example.cpp</tt></a> shows an example.
+ </li>
+ <li>
+ Instantiating a container's <tt>Data</tt> parameter by <a href = "compound_data_type.html"><tt>compound_data_type</tt></a><tt>&lt;Cntnr&gt;</tt>, where <tt>Cntnr</tt> is a different associative container, will make a &quot;(multi)+map&quot;. Thus
+<pre>
+<a href = "cc_hash_assoc_cntnr.html">cc_hash_assoc_cntnr</a>&lt;
+ <b>int</b>,
+ <a href = "compound_data_type.html">compound_data_type</a>&lt;
+ <a href = "cc_hash_assoc_cntnr.html">cc_hash_assoc_cntnr</a>&lt;
+ <b>char</b>,
+ <a href = "null_data_type.html">null_data_type</a>&gt; &gt; &gt;
+</pre>
+ is a type
+mapping each <tt><b>int</b></tt> value to a &quot;set&quot; of <tt><b>char</b></tt>
+values.
+<a href = "../example/basic_multimap_example.cpp"><tt>basic_multimap_example.cpp</tt></a> shows an example.
+This composition is recursive, however, and more complex relationships can be built.
+<a href = "../example/mapping_level_example.cpp"><tt>mapping_level_example.cpp</tt></a> shows an example.
+ </li>
+</ol>
+
+<p>
+ The associative-container classes derive each from one of the three
+<a href = "basic_assoc_cntnr.html"><tt>basic_assoc_cntnr</tt></a> classes, depending
+on the data policy. These three base classes define different types and methods. For example, the &quot;map&quot; specialization of
+<a href = "basic_assoc_cntnr.html"><tt>basic_assoc_cntnr</tt></a>
+defines <tt><b>operator</b>[]</tt>, wherase the &quot;set&quot; specialization does not.
+This is described further in
+<a href = "ms_gen.html">Mapping-Semantic Genericity</a>.
+</p>
+
+<p>
+ <tt>pb_assoc</tt>'s design contains the concept of a <i>mapping level</i>. &quot;Map&quot; and &quot;set&quot; types have a single mapping level; A container
+mapping integers to &quot;maps&quot; mapping characters to floats has two mapping levels, since it can be viewed as a type mapping each integer to a &quot;map&quot;, or as a type mapping each pair of integer and character to a float. <tt>pb_assoc</tt> contains traits and rebind mechanisms for querying and altering the mapping levels.
+This is described further in
+<a href = "ms_gen.html">Mapping-Semantic Genericity</a>.
+</p>
+
+<p>
+ The leaf classes in Figure
+<a href = "#cd">Class hierarchy</a>
+are each parameterized by policies, easing configuring containers for different settings.
+<a href = "hash_based_containers.html">Hash-Based Containers</a> describes the design and policies of hash-based containers,
+ <a href = "tree_based_containers.html">Tree-Based Containers</a> describes the design and policies of tree-based containers, and
+ <a href = "lu_based_containers.html">List-Based Containers</a> describes the design and policies of list-based containers with update policies.
+
+</p>
+
+
+</body>
+
+</html>
diff --git a/libstdc++-v3/docs/html/ext/pb_assoc/pb_assoc_ex.html b/libstdc++-v3/docs/html/ext/pb_assoc/pb_assoc_ex.html
new file mode 100644
index 00000000000..8895bc263a0
--- /dev/null
+++ b/libstdc++-v3/docs/html/ext/pb_assoc/pb_assoc_ex.html
@@ -0,0 +1,74 @@
+
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
+
+
+<html>
+<head>
+<title>pb_assoc_ex Interface
+</title>
+
+</head>
+
+<body>
+<h1>
+<tt>pb_assoc_ex
+</tt>
+
+ Interface
+
+
+</h1>
+
+<p>Base class for pb_assoc's exceptions.
+</p>
+
+<ol>
+<li>
+<a href = "../../../../include/ext/pb_assoc/pb_assoc_ex.hpp"><tt>pb_assoc_ex.hpp</tt>
+</a>
+
+</li>
+
+<li>
+<a href = "#link1">Base classes.
+</a>
+
+</li>
+
+</ol>
+
+
+<h2>
+<a name = "link1">Base classes.
+</a>
+
+</h2>
+
+<table WIDTH = "100%" BORDER = "1">
+<TR><TD Width = "80%" ALIGN = "left"><b>Class</b></TD><TD Width = "20%" ALIGN = "left"><b>Derivation Type</b></TD></TR>
+
+
+<tr>
+<td>
+<pre>std::logic_error</pre>
+
+
+</td>
+
+<td>
+<p>public</p>
+
+
+</td>
+
+</tr>
+
+</table>
+
+
+
+</body>
+
+</html>
+
+
diff --git a/libstdc++-v3/docs/html/ext/pb_assoc/portability.html b/libstdc++-v3/docs/html/ext/pb_assoc/portability.html
new file mode 100644
index 00000000000..ab7e9c85ef7
--- /dev/null
+++ b/libstdc++-v3/docs/html/ext/pb_assoc/portability.html
@@ -0,0 +1,26 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
+<html>
+<head>
+<title>Portability</title>
+<meta name="GENERATOR" content="Microsoft Visual Studio .NET 7.1">
+<meta name="vs_targetSchema" content="http://schemas.microsoft.com/intellisense/ie5">
+</head>
+<body bgcolor = "white">
+<h1>Portability</h1>
+
+<h2>Sucessfully Tested Compilers</h2>
+<ol>
+ <li>g++ 3.3.1</li>
+ <li>g++ 3.4.4</li>
+ <li>g++ 4</li>
+ <li>icc 8.1</li>
+ <li>Visual C++ .Net 7.1</li>
+</ol>
+
+<h2>Unsucessfully Tested Compilers</h2>
+<ol>
+ <li>g++ 2.9.6</li>
+ <li>Visual C++ 6</li>
+</ol>
+</body>
+</html>
diff --git a/libstdc++-v3/docs/html/ext/pb_assoc/quadratic_probe_fn.html b/libstdc++-v3/docs/html/ext/pb_assoc/quadratic_probe_fn.html
new file mode 100644
index 00000000000..1e3dea17c01
--- /dev/null
+++ b/libstdc++-v3/docs/html/ext/pb_assoc/quadratic_probe_fn.html
@@ -0,0 +1,238 @@
+
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
+
+
+<html>
+<head>
+<title>quadratic_probe_fn Interface
+</title>
+
+</head>
+
+<body>
+<h1>
+<tt>quadratic_probe_fn
+</tt>
+
+ Interface
+
+
+</h1>
+
+<p>A probe sequence policy using square increments.
+</p>
+
+<ol>
+<li>
+<a href = "../../../../include/ext/pb_assoc/hash_policy.hpp"><tt>hash_policy.hpp</tt>
+</a>
+
+</li>
+
+<li>
+<a href = "#link1">Template parameters.
+</a>
+
+</li>
+
+<li>
+Public Types and Constants:
+
+
+<ol>
+<li>
+<a href = "#link2">General definitions.
+</a>
+
+</li>
+
+</ol>
+
+</li>
+
+<li>
+Public Methods:
+
+
+<ol>
+<li>
+<a href = "#link3">Constructors, destructor, and related.
+</a>
+
+</li>
+
+</ol>
+
+</li>
+
+<li>
+Protected Methods:
+
+
+<ol>
+<li>
+<a href = "#link4">Offset methods.
+</a>
+
+</li>
+
+</ol>
+
+</li>
+
+</ol>
+
+
+<h2>
+<a name = "link1">Template parameters.
+</a>
+
+</h2>
+
+<table WIDTH = "100%" BORDER = "1">
+<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_Key_Ref3735929850">Const_Key_Ref</a></pre>
+
+
+</td>
+
+<td>
+<p>Const key reference type.</p>
+
+
+</td>
+
+<td>
+-
+
+
+</td>
+
+</tr>
+
+<tr>
+<td>
+<pre><a name = "Size_Type3735929483">Size_Type</a></pre>
+
+
+</td>
+
+<td>
+<p>Size type.</p>
+
+
+</td>
+
+<td>
+size_t
+
+
+</td>
+
+</tr>
+
+</table>
+
+<h2>
+<a name = "link2">General definitions.
+</a>
+
+</h2>
+
+<table WIDTH = "100%" BORDER = "1">
+<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_type3735929547">size_type</a></pre>
+
+
+</td>
+
+<td>
+<pre><a href = "#Size_Type3735929483">Size_Type</a></pre>
+
+
+</td>
+
+<td>
+<p>Size type.</p>
+
+
+</td>
+
+</tr>
+
+</table>
+
+<h2>
+<a name = "link3">Constructors, destructor, and related.
+</a>
+
+</h2>
+
+<table WIDTH = "100%" BORDER = "1">
+<TR><TD Width = "45%" ALIGN = "left"><b>Method</b></TD><TD Width = "55%" ALIGN = "left"><b>Description</b></TD></TR>
+
+
+<tr>
+<td>
+<pre><b>void</b>
+ swap
+ (<font color = "olive">quadratic_probe_fn</font> &amp;r_other)</pre>
+
+
+</td>
+
+<td>
+<p>Swaps content.</p>
+
+
+</td>
+
+</tr>
+
+</table>
+
+<h2>
+<a name = "link4">Offset methods.
+</a>
+
+</h2>
+
+<table WIDTH = "100%" BORDER = "1">
+<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> <a href = "#size_type3735929547">size_type</a>
+ <b>operator</b>()
+ (<a href = "#Const_Key_Ref3735929850">Const_Key_Ref</a> r_key,
+ <a href = "#size_type3735929547">size_type</a> i) <b>const</b></pre>
+
+
+</td>
+
+<td>
+<p>Returns the <font color = "#666666"><tt>i</tt></font>-th offset from the hash value.</p>
+
+
+</td>
+
+</tr>
+
+</table>
+
+
+
+</body>
+
+</html>
+
+
diff --git a/libstdc++-v3/docs/html/ext/pb_assoc/range_invalidation_guarantee.html b/libstdc++-v3/docs/html/ext/pb_assoc/range_invalidation_guarantee.html
new file mode 100644
index 00000000000..f91e45227ed
--- /dev/null
+++ b/libstdc++-v3/docs/html/ext/pb_assoc/range_invalidation_guarantee.html
@@ -0,0 +1,74 @@
+
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
+
+
+<html>
+<head>
+<title>range_invalidation_guarantee Interface
+</title>
+
+</head>
+
+<body>
+<h1>
+<tt>range_invalidation_guarantee
+</tt>
+
+ Interface
+
+
+</h1>
+
+<p>Signifies an invalidation guarantee that includes all those of its base, and additionally, that any range-type iterator (including the returns of begin() and end()) is in the correct relative positions to other range-type iterators as long as its corresponding entry has not be erased, regardless of modifications to the container object.
+</p>
+
+<ol>
+<li>
+<a href = "../../../../include/ext/pb_assoc/ds_trait.hpp"><tt>ds_trait.hpp</tt>
+</a>
+
+</li>
+
+<li>
+<a href = "#link1">Base classes.
+</a>
+
+</li>
+
+</ol>
+
+
+<h2>
+<a name = "link1">Base classes.
+</a>
+
+</h2>
+
+<table WIDTH = "100%" BORDER = "1">
+<TR><TD Width = "80%" ALIGN = "left"><b>Class</b></TD><TD Width = "20%" ALIGN = "left"><b>Derivation Type</b></TD></TR>
+
+
+<tr>
+<td>
+<pre><a href = "find_invalidation_guarantee.html"><tt>find_invalidation_guarantee</tt></a></pre>
+
+
+</td>
+
+<td>
+<p>public</p>
+
+
+</td>
+
+</tr>
+
+</table>
+
+
+
+</body>
+
+</html>
+
+
diff --git a/libstdc++-v3/docs/html/ext/pb_assoc/rank_node_invariants.jpg b/libstdc++-v3/docs/html/ext/pb_assoc/rank_node_invariants.jpg
new file mode 100644
index 00000000000..ea01b0a0794
--- /dev/null
+++ b/libstdc++-v3/docs/html/ext/pb_assoc/rank_node_invariants.jpg
Binary files differ
diff --git a/libstdc++-v3/docs/html/ext/pb_assoc/rationale_null_node_updator.jpg b/libstdc++-v3/docs/html/ext/pb_assoc/rationale_null_node_updator.jpg
new file mode 100644
index 00000000000..c798ec1451b
--- /dev/null
+++ b/libstdc++-v3/docs/html/ext/pb_assoc/rationale_null_node_updator.jpg
Binary files differ
diff --git a/libstdc++-v3/docs/html/ext/pb_assoc/rb_tree_ds_tag.html b/libstdc++-v3/docs/html/ext/pb_assoc/rb_tree_ds_tag.html
new file mode 100644
index 00000000000..5c594144927
--- /dev/null
+++ b/libstdc++-v3/docs/html/ext/pb_assoc/rb_tree_ds_tag.html
@@ -0,0 +1,74 @@
+
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
+
+
+<html>
+<head>
+<title>rb_tree_ds_tag Interface
+</title>
+
+</head>
+
+<body>
+<h1>
+<tt>rb_tree_ds_tag
+</tt>
+
+ Interface
+
+
+</h1>
+
+<p>Red-black tree data-structure tag.
+</p>
+
+<ol>
+<li>
+<a href = "../../../../include/ext/pb_assoc/ds_trait.hpp"><tt>ds_trait.hpp</tt>
+</a>
+
+</li>
+
+<li>
+<a href = "#link1">Base classes.
+</a>
+
+</li>
+
+</ol>
+
+
+<h2>
+<a name = "link1">Base classes.
+</a>
+
+</h2>
+
+<table WIDTH = "100%" BORDER = "1">
+<TR><TD Width = "80%" ALIGN = "left"><b>Class</b></TD><TD Width = "20%" ALIGN = "left"><b>Derivation Type</b></TD></TR>
+
+
+<tr>
+<td>
+<pre><a href = "basic_tree_ds_tag.html"><tt>basic_tree_ds_tag</tt></a></pre>
+
+
+</td>
+
+<td>
+<p>public</p>
+
+
+</td>
+
+</tr>
+
+</table>
+
+
+
+</body>
+
+</html>
+
+
diff --git a/libstdc++-v3/docs/html/ext/pb_assoc/reference_iterator.jpg b/libstdc++-v3/docs/html/ext/pb_assoc/reference_iterator.jpg
new file mode 100644
index 00000000000..a9cc63e5d20
--- /dev/null
+++ b/libstdc++-v3/docs/html/ext/pb_assoc/reference_iterator.jpg
Binary files differ
diff --git a/libstdc++-v3/docs/html/ext/pb_assoc/references.html b/libstdc++-v3/docs/html/ext/pb_assoc/references.html
new file mode 100644
index 00000000000..17e6790f186
--- /dev/null
+++ b/libstdc++-v3/docs/html/ext/pb_assoc/references.html
@@ -0,0 +1,94 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
+
+<html>
+<head>
+ <title>References</title>
+</head>
+
+<body bgcolor = "white">
+<h1>References</h1>
+<ol>
+ <li> [<a name="abrahams97exception">abrahams97exception</a>] Dave Abrahams,
+ STL Exception Handling Contract,
+ <a href="http://anubis.dkuug.dk/jtc1/sc22/wg21/docs/papers/1997/N1075.pdf">http://anubis.dkuug.dk/jtc1/sc22/wg21/docs/papers/1997/N1075.pdf</a>
+
+ <li> [<a name = "alexandrescu01modern">alexandrescu01modern</a>] Andrei Alexandrescu, <i>Modern C++ Design: Generic Programming and Design Patterns Applied</i>, Addison-Wesley Publishing Company, 2001 </li>
+
+ <li> [<a name = "andrew04mtf">andrew04mtf</a>] K. Andrew and D. Gleich, "MTF, Bit, and COMB: A Guide to Deterministic and Randomized Algorithms for the List Update Problem"</li>
+
+ <li> [<a name = "austern00noset">austern00noset</a>] Matthew Austern, "Why You shouldn't use <tt>set</tt> - and What You Should Use Instead", C++ Report, April, 2000 </li>
+
+ <li> [<a name = "austern01htprop">austern01htprop</a>] Matthew Austern, "A Proposal to Add Hashtables to the Standard Library", <a href= "http://anubis.dkuug.dk/jtc1/sc22/wg21/docs/papers/2001/n1326l.html">http://anubis.dkuug.dk/jtc1/sc22/wg21/docs/papers/2001/n1326l.html</a> </li>
+
+ <li> [<a name = "austern98segmented">austern98segmented</a>] Matthew Austern, "Segmented iterators and hierarchical algorithms", Generic Programming, April 1998, pp. 80-90 </li>
+
+ <li> [<a name = "boost_timer">boost_timer</a>], "Boost <tt>timer</tt> library", <a href = "http://www.boost.org/">http://www.boost.org</a> by Beman Dawes </li>
+
+ <li> [<a name = "boost_type_traits">boost_type_traits</a>], "Boost <tt>type_traits</tt> library", <a href = "http://www.boost.org/">http://www.boost.org</a> by John Maddock, Steve Cleary, <i>et. al.</i> </li>
+
+ <li> [<a name = "bulka99efficient">bulka99efficient</a>] D. Bulka, and D. Mayhew, "Efficient C++ Programming Techniques.", Addison-Wesley Publishing Company, Addison-Wesley, 1997 </li>
+
+ <li> [<a name = "clrs2001">clrs2001</a>] T. H. Cormen, C. E., Leiserson, R. L. Rivest, C. and Stein, "Introduction to Algorithms, 2nd ed.", MIT Press, 2001 </li>
+
+ <li> [<a name = "dinkumware_stl">dinkumware_stl</a>], "Dinkumware C++ Library Reference", <a href = "http://www.dinkumware.com/htm_cpl/index.html">http://www.dinkumware.com/htm_cpl/index.html</a> </li>
+
+ <li> [<a name = "dubhashi98neg">dubhashi98neg</a>] D. Dubashi, and D. Ranjan, "Balls and bins: A study in negative dependence.", Random Structures and Algorithms 13, 2 (1998), 99-124 </li>
+
+ <li> [<a name = "fagin79extendible">fagin79extendible</a>] R. Fagin, J. Nievergelt, N. Pippenger, and H. R. Strong, "Extendible hashing — a fast access method for dynamic files", ACM Trans. Database Syst. 4, 3 (1979), 315-344 </li>
+
+ <li> [<a name = "gamma95designpatterns">gamma95designpatterns</a>] E. Gamma, R. Helm, R. Johnson, and J. Vlissides, "Design Patterns - Elements of Reusable Object-Oriented Software", Addison-Wesley Publishing Company, Addison-Wesley, 1995 </li>
+
+ <li> [<a name = "garg86order">garg86order</a>] A. K. Garg and C. C. Gotlieb, "Order-preserving key transformations", Trans. Database Syst. 11, 2 (1986), 213-234 </li>
+
+ <li> [<a name = "genome_dna">genome_dna</a>], "Whole Genome Shotgun entries", <a href = "ftp://ftp.ebi.ac.uk/pub/databases/embl/wgs/wgs_aady01.dat.gz">ftp://ftp.ebi.ac.uk/pub/databases/embl/wgs/wgs/_aady01.dat.gz</a> </li>
+
+ <li> [<a name = "hyslop02making">hyslop02making</a>] J. Hyslop, and H. Sutter, "Making a real hash of things", C++ Report, May 2002 </li>
+
+ <li> [<a name = "jossutis01stl">jossutis01stl</a>] N. M. Jossutis, "The C++ Standard Library - A Tutorial and Reference", Addison-Wesley Publishing Company, Addison-Wesley, 2001 </li>
+
+ <li> [<a name = "kleft00sets">kleft00sets</a>] Klaus Kleft and Angelika Langer, "Are Set Iterators Mutable or Immutable?", C/C++ Users Jornal, October 2000 </li>
+
+ <li> [<a name = "knuth98sorting">knuth98sorting</a>] D. E. Knuth, "The Art of Computer Programming - Sorting and Searching", Addison-Wesley Publishing Company, Addison-Wesley, 1998 </li>
+
+ <li> [<a name = "liskov98data">liskov98data</a>] B. Liskov, "Data abstraction and hierarchy", SIGPLAN Notices 23, 5 (May 1998) </li>
+
+ <li> [<a name = "litwin80lh">litwin80lh</a>] W. Litwin, "Linear hashing: A new tool for file and table addressing", Proceedings of International Conference on Very Large Data Bases (June 1980), pp. 212-223 </li>
+
+ <li> [<a name = "metrowerks_stl">metrowerks_stl</a>], "Metrowerks CodeWarrior Pro 7 MSL C++ Reference Manual", </li>
+
+ <li> [<a name = "meyers96more">meyers96more</a>] S. Meyers, "More Effective C++: 35 New Ways to Improve Your Programs and Designs - 2nd ed.", Addison-Wesley Publishing Company, Addison-Wesley, 1996 </li>
+
+ <li> [<a name = "meyers00nonmember">meyers00nonmember</a>] S. Meyers, "How Non-Member Functions Improve Encapsulation", C/C++ Users Journal, 2000 </li>
+
+ <li> [<a name = "meyers01stl">meyers01stl</a>] S. Meyers, "Effective STL: 50 Specific Ways to Improve Your Use of the Standard Template Library", Addison-Wesley Publishing Company, Addison-Wesley, 2001 </li>
+
+ <li> [<a name = "meyers02both">meyers02both</a>] S. Meyers, "Class Template, Member Template - or Both?", C/C++ Users Journal, 2003 </li>
+
+ <li> [<a name = "motwani95random">motwani95random</a>] R. Motwani, and P. Raghavan, "Randomized Algorithms", Cambridge University Press </li>
+
+ <li> [<a name = "mscom">mscom</a>] <a href = "http://www.microsoft.com/com">COM: Component Model Object Technologies</a> </li>
+
+ <li> [<a name = "musser95rationale">musser95rationale</a>], David R. Musser, "Rationale for Adding Hash Tables to the C++ Standard Template Library" </li>
+
+ <li> [<a name = "musser96stltutorial">musser96stltutorial</a>] D. R. Musser and A. Saini, "STL Tutorial and Reference Guide", Addison-Wesley Publishing Company, Addison-Wesley, 1996 </li>
+
+ <li> [<a name = "sgi_stl">sgi_stl</a>] SGI, "Standard Template Library Programmer's Guide", <a href = "http://www.sgi.com/tech/stl">http://www.sgi.com/tech/stl</a> </li>
+
+ <li> [<a name = "sleator84amortized">sleator84amortized</a>] D. D. Sleator and R. E. Tarjan, "Amortized Efficiency of List Update Problems", ACM Symposium on Theory of Computing, 1984 </li>
+
+ <li> [<a name = "sleator85self">sleator85self</a>] D. D. Sleator and R. E. Tarjan, "Self-Adjusting Binary Search Trees", ACM Symposium on Theory of Computing, 1985 </li>
+
+ <li> [<a name = "stepanov94standard">stepanov94standard</a>] A. A. Stepanov and M. Lee", "The Standard Template Library" </li>
+
+ <li> [<a name = "stroustrup97cpp">stroustrup97cpp</a>] Bjarne Stroustrup, <i>The C++ Programming Langugage -3rd ed.</i>, Addison-Wesley Publishing Company,Reading, MA, USA, 1997 </li>
+
+ <li> [<a name = "vandevoorde2002cpptemplates">vandevoorde2002cpptemplates</a>] D. Vandevoorde, and N. M. Josuttis, "C++ Templates: The Complete Guide", Addison-Wesley Publishing Company, Addison-Wesley, 2002 </li>
+
+ <li> [<a name = "wickland96thirty">wickland96thirty</a>] C. A. Wickland, "Thirty Years Among the Dead", National Psychological Institute, Los Angeles, 1996,<a href = "http://myweb.wvnet.edu/~gsa00121/books/amongdead30.zip">http://myweb.wvnet.edu/gsa00121/books/amongdead30.zip</a></li>
+
+</ol>
+
+<HR>
+
+</body>
+</html>
diff --git a/libstdc++-v3/docs/html/ext/pb_assoc/regression_tests.html b/libstdc++-v3/docs/html/ext/pb_assoc/regression_tests.html
new file mode 100644
index 00000000000..491be1ffc0f
--- /dev/null
+++ b/libstdc++-v3/docs/html/ext/pb_assoc/regression_tests.html
@@ -0,0 +1,25 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
+<html>
+<head>
+<title>Regression Tests</title>
+<meta name="GENERATOR" content="Microsoft Visual Studio .NET 7.1">
+<meta name="vs_targetSchema" content="http://schemas.microsoft.com/intellisense/ie5">
+</head>
+<body bgcolor = "white">
+<h1>Regression Tests</h1>
+
+
+<h2>Basic Regression</h2>
+
+
+<h2>Tree-Based Regression Tests</h2>
+
+<h3>Order-Statistics</h3>
+
+<p>
+Source code:
+<a href = "../testsuite/regression/tree_order_statistics_regression_test.cpp"><tt>tree_order_statistics_regression_test.cpp</tt></a>.
+</p>
+
+</body>
+</html>
diff --git a/libstdc++-v3/docs/html/ext/pb_assoc/resize_general.html b/libstdc++-v3/docs/html/ext/pb_assoc/resize_general.html
new file mode 100644
index 00000000000..118e07529ac
--- /dev/null
+++ b/libstdc++-v3/docs/html/ext/pb_assoc/resize_general.html
@@ -0,0 +1,28 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
+<html>
+<head>
+<title>Resize Policies</title>
+<meta name="GENERATOR" content="Microsoft Visual Studio .NET 7.1">
+<meta name="vs_targetSchema" content="http://schemas.microsoft.com/intellisense/ie5">
+</head>
+<body>
+<h1>Resize Policies</h1>
+
+<p>
+ A resize policy, say <tt>res_pol</tt>, should support the types and
+methods below.
+<ol>
+ <li><a href = "resize_policy_types.html">Types</a></li>
+ <li> Methods:
+ <ol>
+ <li><a href = "resize_policy_constr_dest.html">Constructors, destructor, and related</a></li>
+ <li><a href = "resize_policy_notification_methods.html">Notification methods</a></li>
+ <li><a href = "resize_policy_size_methods.html">Size methods</a></li>
+ <li><a href = "resize_policy_trigger_methods.html">Trigger methods</a></li>
+ </ol>
+ </li>
+</ol>
+</p>
+
+</body>
+</html>
diff --git a/libstdc++-v3/docs/html/ext/pb_assoc/resize_policies.html b/libstdc++-v3/docs/html/ext/pb_assoc/resize_policies.html
new file mode 100644
index 00000000000..dbd306ecf45
--- /dev/null
+++ b/libstdc++-v3/docs/html/ext/pb_assoc/resize_policies.html
@@ -0,0 +1,487 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
+<html>
+ <head>
+ <title>Resize Policies</title>
+ <meta name="GENERATOR" content="Microsoft Visual Studio .NET 7.1">
+ <meta name="vs_targetSchema" content="http://schemas.microsoft.com/intellisense/ie5">
+ </head>
+<body bgcolor = "white">
+<h1>Hash-Based Continers' Resize Policies</h1>
+
+<p>
+ This subsection describes resize policies. It is organized as follows:
+</p>
+
+<ol>
+ <li> The <a href = "#general">General Terms</a> Subsection describes general
+ terms.
+ </li>
+ <li> The <a href = "#size_policies">Size Policies</a> Subsection describes size
+ policies.
+ </li>
+ <li> The <a href = "#trigger_policies">Trigger Policies</a> Subsection describes trigger
+ policies.
+ </li> <li> The <a href = "#imp_pb_assoc">Implementation in <tt>pb_assoc</tt></a>
+ Subsection describes the implementation of these concepts in <tt>pb_assoc</tt>.
+ </li>
+</ol>
+
+
+<h2><a name = "general">General Terms</a></h2>
+
+<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.
+</p>
+
+<p>
+ In general, resize policies can be decomposed into (probably 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>
+
+
+
+<h2><a name = "size_policies">Size Policies</a></h2>
+
+<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 the <a href = "hash_policies.html#hash_policies_range_hashing_policies">Range-Hashing Policies</a> subsection),
+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 the <a href = "hash_policies.html#hash_policies_range_hashing_policies">Range-Hashing Policies</a> subsection),
+and is the
+hard-wired policy used by SGI's implementation
+[<a href = "references.html#sgi_stl">sgi_stl</a>].
+</p>
+
+
+
+
+<h2><a name = "trigger_policies">Trigger Policies</a></h2>
+
+<p>
+ Trigger policies determine when a hash table changes size.
+Following is a description of two polcies: <i>load-check</i>
+policies, and a 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 = "eqn: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 shortest
+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 align = "center">
+<a name = "balls_and_bins">
+<img src = "balls_and_bins.jpg" width = "60%" alt = "no image">
+</a>
+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 = "eqn:prob_of_p1">
+ <i>p<sub>1</sub>
+ = </i>(3)
+ </a>
+ </p>
+ <p>
+ <i>
+ <b>P</b>(l<sub>1</sub> &ge; k)
+ =
+ </i>
+ </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>
+ <a name = "eqn: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>
+ <i>
+ <b>P</b>
+ (
+ &sum; <sub>i = 1</sub><sup>m</sup>
+ <b>I</b>(l<sub>i</sub> &ge; k) &ge; 1
+ )
+ =
+ </i>
+ </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>
+ <i>
+ e
+ ^
+ (
+ (
+ -
+ m p<sub>1</sub>
+ (
+ 1 / (m p<sub>1</sub>) - 1
+ )
+ <sup>2</sup>
+ )
+ /
+ 2
+ )
+ ,
+ </i>
+ </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>
+
+
+
+
+
+
+
+
+
+<h2><a name = "imp_pb_assoc">Implementation in <tt>pb_assoc</tt></a></h2>
+
+<p>
+ The resize policies in the previous subsection are conceptually straightforward. The design
+of hash-based containers' size-related interface is complicated by some factors.
+</p>
+<ol>
+ <li> Most containers, <i>i.e.</i> lists, trees, and vectors, have a single "size" concept. There is no
+distinction between the number of entries the container holds and the number of entries it is using. This,
+of course, is not the case for hash-based containers. Moreover, even describing the
+"actual" size of a hash-based container (as opposed to its logical size) is difficult - a probing-based container
+holds entries to elements, even those it does not use, while a chaining-based container holds pointers to entries.
+ </li>
+ <li>
+ The policies mentioned above operate in terms of invariants. <i>E.g.</i> a load-check trigger policy
+maintains an invariant concerning the load factor of a container object. This is sometimes too rigid:
+ <ol>
+ <li>In some cases it is desirable to allow controlled override of an entire policy, <i>e.g.</i> by externally resizing a container object (or giving it an initial size, which is a special case of externally resizing the container).
+ </li>
+ <li>
+ In other cases it is desirable to allow changing the specifics of a policy in runtime, <i>e.g.</i>, changing the load factors of a load-check policy.
+ </li>
+ </ol>
+ </li>
+ <li>
+ Resize policies interact strongly with hash policies. Performance-wise, for example, it is undesirable to use an exponential size policy of powers of two with a modulo range-hashing function, and it is undesirable to use a prime size policy with a mask range-hashing function. In other cases, the effects are more dramatic. For example, using a quadratic probe function with an exponential size policy will probably cause cases where the container object has available entries which are never reached by the probe function. (<a href = "hash_policies.html">Hash Policies</a>
+discusses the previous concepts.)
+ </li>
+</ol>
+
+<p>
+ Clearly, the more of these points an interface addresses, the greater its flexibility but the lower its encapsulation and uniformity between associative containers.
+</p>
+
+
+
+<p>
+ This library attempts to address these types of problems by delegating all size-related functionality to
+policy classes. Hash-based containers
+are parameterized by a resize-policy class (among others), and derive publicly from
+the resize-policy class
+[<a href = "references.html#alexandrescu01modern">alexandrescu01modern</a>]
+ <i>E.g.</i>, a collision-chaining
+hash table is defined as follows:
+</p>
+<pre>
+cc_ht_map&lt;
+ <b>class</b> Key,
+ <b>class</b> Data,
+ ...
+ <b>class</b> Resize_Policy
+ ...&gt; :
+ <b>public</b> Resize_Policy
+</pre>
+
+<p>
+ The containers themselves lack any functionality or public interface for manipulating sizes. A container
+object merely forwards events to its resize policy object and queries it for needed actions.
+</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 align = "center">
+<a name = "insert_resize_sequence_diagram1">
+<img src = "insert_resize_sequence_diagram1.jpg" width = "50%" alt = "no image">
+</a>
+</h6>
+<h6 align = "center">
+Insert resize sequence diagram.
+</h6>
+
+<p>
+ This addresses, to some extent, the problems mentioned above:
+</p>
+<ol>
+ <li>
+ Different instantiations of range-hashing policies can be met with different instantiations of
+ resize policies.
+ </li>
+ <li>
+ Questions on size-related interface are avoided, since the containers have no size-related methods. Thus
+ a container has no method for querying its actual size. It merely continuously forwards enough information to
+ its resize policy to answer such queries; the designer of the resize policy can decide whether, or how, to design the appropriate method. Also, a container has no methods for setting its size. It merely queries its
+resize policy for an initial size, queries it on a new size (if the resize policy indicates a resize is needed), and
+supports a <tt><b>protected virtual</b></tt> function for external resize.
+ </li>
+</ol>
+
+<p>
+ The library contains a single class for instantiating a resize policy,
+<tt>pb_assoc</tt> contains
+a standard resize policy,
+<a href = "ht_standard_resize_policy.html"><tt>ht_standard_resize_policy</tt></a> (the name is explained shortly).
+In terms of interface, it is parameterized by a boolean constant indicating whether its public interface supports
+queries of actual size and external resize operations (the inclusion and exclusion of these methods in the interface have obvious tradeoffs in terms of encapsulation and flexibility).
+([<a href = "references.html#alexandrescu01modern">alexandrescu01modern</a>] shows many techniques for
+changing between alternative interfaces at compile time.)
+</p>
+
+<p>
+As noted before,
+ size and trigger policies are usually orthogonal.
+<a href = "ht_standard_resize_policy.html"><tt>ht_standard_resize_policy</tt></a>
+is parameterized by size and trigger policies. For example,
+a collision-chaining hash table
+is typically be defined as follows:
+</p>
+<pre>
+cc_ht_map&lt;
+ key,
+ data,
+ ...
+ ht_standard_resize_policy&lt;
+ some_trigger_policy,
+ some_size_policy,
+ ...&gt; &gt;
+</pre>
+
+<p>
+ The sole function of
+<a href = "ht_standard_resize_policy.html"><tt>ht_standard_resize_policy</tt></a>
+ is to
+act as a standard delegator
+[<a href = "references.html#gamma95designpatterns">gamma95designpatterns</a>] for these
+policies.
+
+<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 align = "center">
+<a name = "insert_resize_sequence_diagram2">
+<img src = "insert_resize_sequence_diagram2.jpg" width = "50%" alt = "no image">
+</a>
+</h6>
+<h6 align = "center">
+Standard resize policy trigger sequence diagram.
+</h6>
+
+<h6 align = "center">
+<a name = "insert_resize_sequence_diagram3">
+<img src = "insert_resize_sequence_diagram3.jpg" width = "50%" alt = "no image">
+</a>
+</h6>
+<h6 align = "center">
+Standard resize policy size sequence diagram.
+</h6>
+
+<p>
+ The library (currently) supports the following instantiations of size
+and trigger policies:
+</p>
+
+<ol>
+ <li>
+ <a href = "ht_load_check_trigger.html"><tt>ht_load_check_trigger</tt></a> implements
+ a load check trigger policy.
+ </li>
+ <li>
+ <a href = "ht_max_collision_check_grow_resize_trigger.html"><tt>ht_max_collision_check_grow_resize_trigger</tt></a>
+ implements a collision check trigger policy.
+ </li>
+ <li>
+<a href = "ht_exponential_size_policy.html"><tt>ht_exponential_size_policy</tt></a> implemens
+an exponential-size policy (which should be used with mask range hashing).
+ </li>
+ <li>
+<a href = "ht_prime_size_policy.html"><tt>ht_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>
+ The trigger policies also support interfaces for changing their specifics which depend on compile time constants.
+</p>
+
+
+<p>
+ Figure
+<a href = "#resize_policy_cd">Resize policy class diagram</a> gives an overall picture
+of the resize-related classes.
+<tt>Container</tt> (which stands for any of the hash-based containers) is parameterized
+by <tt>Resize_Policy</tt>, from which it subclasses publicly
+[<a href = "references.html#alexandrescu01modern">alexandrescu01modern</a>].
+This class is currently instantiated only by
+<a href = "ht_standard_resize_policy.html"><tt>ht_standard_resize_policy</tt></a>.
+<a href = "ht_standard_resize_policy.html"><tt>ht_standard_resize_policy</tt></a> itself
+is parameterized by <tt>Trigger_Policy</tt> and <tt>Size_Policy</tt>.
+Currently, <tt>Trigger_Policy</tt> is instantiated by
+<a href = "ht_load_check_trigger.html"><tt>ht_load_check_trigger</tt></a>,
+or
+<a href = "ht_max_collision_check_grow_resize_trigger.html"><tt>ht_max_collision_check_grow_resize_trigger</tt></a>; <tt>Size_Policy</tt> is instantiated by
+<a href = "ht_exponential_size_policy.html"><tt>ht_exponential_size_policy</tt></a>,
+or
+<a href = "ht_prime_size_policy.html"><tt>ht_prime_size_policy</tt></a>.
+</p>
+
+
+<h6 align = "center">
+<a name = "resize_policy_cd">
+<img src = "resize_policy_cd.jpg" width = "40%" alt = "no image">
+</a>
+</h6>
+<h6 align = "center">
+Resize policy class diagram.
+</h6>
+
+
+</body>
+
+</html>
diff --git a/libstdc++-v3/docs/html/ext/pb_assoc/resize_policy_cd.jpg b/libstdc++-v3/docs/html/ext/pb_assoc/resize_policy_cd.jpg
new file mode 100644
index 00000000000..1d85438a174
--- /dev/null
+++ b/libstdc++-v3/docs/html/ext/pb_assoc/resize_policy_cd.jpg
Binary files differ
diff --git a/libstdc++-v3/docs/html/ext/pb_assoc/restoring_node_invariants.jpg b/libstdc++-v3/docs/html/ext/pb_assoc/restoring_node_invariants.jpg
new file mode 100644
index 00000000000..626b730c1aa
--- /dev/null
+++ b/libstdc++-v3/docs/html/ext/pb_assoc/restoring_node_invariants.jpg
Binary files differ
diff --git a/libstdc++-v3/docs/html/ext/pb_assoc/sample_node_updator.hpp b/libstdc++-v3/docs/html/ext/pb_assoc/sample_node_updator.hpp
new file mode 100644
index 00000000000..f862353bc1e
--- /dev/null
+++ b/libstdc++-v3/docs/html/ext/pb_assoc/sample_node_updator.hpp
@@ -0,0 +1,116 @@
+/*
+* @file sample_node_updator.hpp
+* Contains a samle node update functor.
+*
+* Copyright Ami Tavory, IBM-HRL, 2004.
+*
+* 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.
+**/
+
+
+#ifndef SAMPLE_NODE_UPDATOR_HPP
+#define SAMPLE_NODE_UPDATOR_HPP
+
+
+/**
+* <class
+* description = "A sample node updator."
+* comment = "This class serves to show the interface a node update functor
+* needs to support.">
+**/
+class sample_node_updator
+{
+/**
+*******************************************************************************
+*******************************************************************************
+* <public_methods_group>
+**/
+public:
+
+ /**
+ ***************************************************************************
+ ***************************************************************************
+ ** <group description = "Conclassors, declassor, and related.">
+ **/
+
+ /*
+ * <fn description = "Default constructor."
+ * comment = "Must be default constructible.">
+ **/
+ sample_node_updator
+ ();
+ /** </fn> **/
+
+ /*
+ * <fn description = "Copy constructor."
+ * comment = "Must be copy constructible.">
+ **/
+ sample_node_updator
+ (const sample_node_updator &r_other);
+ /** </fn> **/
+
+ /*
+ * <fn description = "Swaps content."
+ * comment = "Must be swappable (if there is such a word).">
+ **/
+ inline void
+ swap
+ (sample_node_updator &r_other);
+ /** </fn> **/
+
+ /*
+ ***************************************************************************
+ ***************************************************************************
+ * </group>
+ **/
+
+
+ /**
+ ***************************************************************************
+ ***************************************************************************
+ ** <group description = "Operators.">
+ **/
+
+ /**
+ * <fn description = "This method is called by the superclass container
+ * object to update the key of a node whose invariants have been
+ * violated. p_key is a pointer to the key being updated;
+ * p_l_child_key is a pointer to the key of the left-child node of
+ * the node being updated (and is NULL if there is no such child node);
+ * p_r_child_key is a pointer to the key of the right-child node of
+ * the node being updated (and is NULL if there is no such child node)."
+ * comment = "@@sample_node_updator_const_key_pointer_comment">
+ **/
+ void
+ operator()
+ (const_key_pointer p_key,
+ const_key_pointer p_l_child_key,
+ const_key_pointer p_r_child_key);
+ /** </fn> **/
+
+ /*
+ ***************************************************************************
+ ***************************************************************************
+ * </group>
+ **/
+
+
+/**
+*******************************************************************************
+*******************************************************************************
+* </public_methods_group>
+**/
+};
+/**
+* </class>
+**/
+
+
+#endif // #ifndef SAMPLE_NODE_UPDATOR_HPP
diff --git a/libstdc++-v3/docs/html/ext/pb_assoc/sample_probe_fn.hpp b/libstdc++-v3/docs/html/ext/pb_assoc/sample_probe_fn.hpp
new file mode 100644
index 00000000000..1117418e224
--- /dev/null
+++ b/libstdc++-v3/docs/html/ext/pb_assoc/sample_probe_fn.hpp
@@ -0,0 +1,121 @@
+/**
+* @file sample_probe_fn.hpp
+* Contains a sample probe policy.
+*
+* Copyright Ami Tavory, IBM-HRL, 2004.
+*
+* 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.
+**/
+
+
+#ifndef SAMPLE_PROBE_FN_HPP
+#define SAMPLE_PROBE_FN_HPP
+
+
+/**
+* <class
+* description = "A sample probe policy."
+* comment = "This class serves to show the interface a probe functor
+* needs to support.">
+**/
+class sample_probe_fn
+{
+/**
+*******************************************************************************
+*******************************************************************************
+* <public_methods_group>
+**/
+public:
+ /**
+ ***************************************************************************
+ ***************************************************************************
+ ** <group description = "Constructors, destructor, and related.">
+ **/
+
+ /*
+ * <fn description = "Default constructor."
+ * comment = "Must be default constructible.">
+ **/
+ sample_probe_fn
+ ();
+ /** </fn> **/
+
+ /*
+ * <fn description = "Copy constructor."
+ * comment = "Must be copy constructible.">
+ **/
+ sample_probe_fn
+ (const sample_probe_fn &r_other);
+ /** </fn> **/
+
+ /*
+ * <fn description = "Swaps content."
+ * comment = "Must be swappable (if there is such a word).">
+ **/
+ inline void
+ swap
+ (sample_probe_fn &r_other);
+ /** </fn> **/
+
+ /*
+ ***************************************************************************
+ ***************************************************************************
+ * </group>
+ **/
+
+
+/**
+*******************************************************************************
+*******************************************************************************
+* </public_methods_group>
+**/
+
+
+/**
+*******************************************************************************
+*******************************************************************************
+* <protected_methods_group>
+**/
+protected:
+ /**
+ ***************************************************************************
+ ***************************************************************************
+ ** <group description = "Offset methods.">
+ **/
+
+ /*
+ * <fn description = "Returns the i-th offset from the hash value
+ * of some key r_key."
+ * comment = "@@sample_range_hashing_size_type_comment">
+ **/
+ inline size_type
+ operator()
+ (const_key_reference r_key,
+ size_type i) const;
+ /** </fn> **/
+
+ /**
+ ***************************************************************************
+ ***************************************************************************
+ ** </group">
+ **/
+
+/**
+*******************************************************************************
+*******************************************************************************
+* </protected_methods_group>
+**/
+};
+/**
+* </class>
+**/
+
+
+#endif // #ifndef SAMPLE_PROBE_FN_HPP
diff --git a/libstdc++-v3/docs/html/ext/pb_assoc/sample_probe_fn.html b/libstdc++-v3/docs/html/ext/pb_assoc/sample_probe_fn.html
new file mode 100644
index 00000000000..2d4306da432
--- /dev/null
+++ b/libstdc++-v3/docs/html/ext/pb_assoc/sample_probe_fn.html
@@ -0,0 +1,177 @@
+
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
+
+
+<html>
+<head>
+<title>sample_probe_fn Interface
+</title>
+
+</head>
+
+<body>
+<h1>
+<tt>sample_probe_fn
+</tt>
+
+ Interface
+
+
+</h1>
+
+<p>A sample probe policy.
+</p>
+
+<p>This class serves to show the interface a probe functor needs to support.
+</p>
+
+<ol>
+<li>
+<a href = "../doc/sample_probe_fn.hpp"><tt>sample_probe_fn.hpp</tt>
+</a>
+
+</li>
+
+<li>
+Public Methods:
+
+
+<ol>
+<li>
+<a href = "#link1">Constructors, destructor, and related.
+</a>
+
+</li>
+
+</ol>
+
+</li>
+
+<li>
+Protected Methods:
+
+
+<ol>
+<li>
+<a href = "#link2">Offset methods.
+</a>
+
+</li>
+
+</ol>
+
+</li>
+
+</ol>
+
+
+<h2>
+<a name = "link1">Constructors, destructor, and related.
+</a>
+
+</h2>
+
+<table WIDTH = "100%" BORDER = "1">
+<TR><TD Width = "45%" ALIGN = "left"><b>Method</b></TD><TD Width = "55%" ALIGN = "left"><b>Description</b></TD></TR>
+
+
+<tr>
+<td>
+<pre> sample_probe_fn
+ ()</pre>
+
+
+</td>
+
+<td>
+<p>Default constructor.</p>
+
+
+<p>Must be default constructible.</p>
+
+
+</td>
+
+</tr>
+
+<tr>
+<td>
+<pre> sample_probe_fn
+ (<b>const</b> sample_probe_fn &amp;r_other)</pre>
+
+
+</td>
+
+<td>
+<p>Copy constructor.</p>
+
+
+<p>Must be copy constructible.</p>
+
+
+</td>
+
+</tr>
+
+<tr>
+<td>
+<pre><b>inline</b> <b>void</b>
+ swap
+ (sample_probe_fn &amp;r_other)</pre>
+
+
+</td>
+
+<td>
+<p>Swaps content.</p>
+
+
+<p>Must be swappable (if there is such a word).</p>
+
+
+</td>
+
+</tr>
+
+</table>
+
+<h2>
+<a name = "link2">Offset methods.
+</a>
+
+</h2>
+
+<table WIDTH = "100%" BORDER = "1">
+<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> size_type
+ <b>operator</b>()
+ (const_key_reference r_key,
+ size_type i) <b>const</b></pre>
+
+
+</td>
+
+<td>
+<p>Returns the <font color = "#666666"><tt>i</tt></font>-th offset from the hash value of some key <font color = "#666666"><tt>r_key</tt></font>.</p>
+
+
+<p><p><tt>size_type</tt> is the size type on which the functor operates.</p></p>
+
+
+</td>
+
+</tr>
+
+</table>
+
+
+
+</body>
+
+</html>
+
+
diff --git a/libstdc++-v3/docs/html/ext/pb_assoc/sample_range_hashing.hpp b/libstdc++-v3/docs/html/ext/pb_assoc/sample_range_hashing.hpp
new file mode 100644
index 00000000000..d22f8e23d1c
--- /dev/null
+++ b/libstdc++-v3/docs/html/ext/pb_assoc/sample_range_hashing.hpp
@@ -0,0 +1,147 @@
+/**
+* @file sample_range_hashing.hpp
+* Contains a range hashing policy.
+*
+* Copyright Ami Tavory, IBM-HRL, 2004.
+*
+* 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.
+**/
+
+
+#ifndef SAMPLE_RANGE_HASHING_HPP
+#define SAMPLE_RANGE_HASHING_HPP
+
+
+/**
+* <class
+* description = "A sample range-hashing functor."
+* comment = "This class serves to show the interface a range-hashing
+* functor needs to support.">
+**/
+class sample_range_hashing
+{
+/**
+*******************************************************************************
+*******************************************************************************
+* <public_methods_group>
+**/
+public:
+ /**
+ ***************************************************************************
+ ***************************************************************************
+ ** <group description = "Constructors, destructor, and related.">
+ **/
+
+ /*
+ * <fn description = "Default constructor."
+ * comment = "Must be default constructible.">
+ **/
+ sample_range_hashing
+ ();
+ /** </fn> **/
+
+ /*
+ * <fn description = "Copy constructor."
+ * comment = "Must be copy constructible.">
+ **/
+ sample_range_hashing
+ (const sample_range_hashing &r_other);
+ /** </fn> **/
+
+ /*
+ * <fn description = "Swaps content."
+ * comment = "Must be swappable (if there is such a word).">
+ **/
+ inline void
+ swap
+ (sample_range_hashing &r_other);
+ /** </fn> **/
+
+ /*
+ ***************************************************************************
+ ***************************************************************************
+ * </group>
+ **/
+
+/**
+*******************************************************************************
+*******************************************************************************
+* </public_methods_group>
+**/
+
+
+/**
+*******************************************************************************
+*******************************************************************************
+* <protected_methods_group>
+**/
+protected:
+
+ /**
+ ***************************************************************************
+ ***************************************************************************
+ ** <group
+ * description = "Notification methods.">
+ **/
+
+ /*
+ * <fn
+ * description = "Notifies the policy object that the container's
+ * __size has changed to size."
+ * comment = "@@sample_range_hashing_size_type_comment">
+ **/
+ void
+ notify_resized
+ (size_type size);
+ /** </fn> **/
+
+ /**
+ ***************************************************************************
+ ***************************************************************************
+ ** </group>
+ **/
+
+
+ /**
+ ***************************************************************************
+ ***************************************************************************
+ ** <group
+ * description = "Operators.">
+ **/
+
+ /*
+ * <fn description = "Transforms the __hash value hash into a
+ * ranged-hash value.">
+ * comment = "@@sample_range_hashing_size_type_comment">
+ **/
+ inline size_type
+ operator()
+ (size_type hash) const;
+ /** </fn> **/
+
+ /**
+ ***************************************************************************
+ ***************************************************************************
+ ** </group>
+ **/
+
+
+/**
+*******************************************************************************
+*******************************************************************************
+* </protected_methods_group>
+**/
+};
+/**
+* </class>
+**/
+
+
+#endif // #ifndef SAMPLE_RANGE_HASHING_HPP
diff --git a/libstdc++-v3/docs/html/ext/pb_assoc/sample_range_hashing.html b/libstdc++-v3/docs/html/ext/pb_assoc/sample_range_hashing.html
new file mode 100644
index 00000000000..d65b6b77f00
--- /dev/null
+++ b/libstdc++-v3/docs/html/ext/pb_assoc/sample_range_hashing.html
@@ -0,0 +1,213 @@
+
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
+
+
+<html>
+<head>
+<title>sample_range_hashing Interface
+</title>
+
+</head>
+
+<body>
+<h1>
+<tt>sample_range_hashing
+</tt>
+
+ Interface
+
+
+</h1>
+
+<p>A sample range-hashing functor.
+</p>
+
+<p>This class serves to show the interface a range-hashing functor needs to support.
+</p>
+
+<ol>
+<li>
+<a href = "../doc/sample_range_hashing.hpp"><tt>sample_range_hashing.hpp</tt>
+</a>
+
+</li>
+
+<li>
+Public Methods:
+
+
+<ol>
+<li>
+<a href = "#link1">Constructors, destructor, and related.
+</a>
+
+</li>
+
+</ol>
+
+</li>
+
+<li>
+Protected Methods:
+
+
+<ol>
+<li>
+<a href = "#link2">Notification methods.
+</a>
+
+</li>
+
+<li>
+<a href = "#link3">Operators.
+</a>
+
+</li>
+
+</ol>
+
+</li>
+
+</ol>
+
+
+<h2>
+<a name = "link1">Constructors, destructor, and related.
+</a>
+
+</h2>
+
+<table WIDTH = "100%" BORDER = "1">
+<TR><TD Width = "45%" ALIGN = "left"><b>Method</b></TD><TD Width = "55%" ALIGN = "left"><b>Description</b></TD></TR>
+
+
+<tr>
+<td>
+<pre> sample_range_hashing
+ ()</pre>
+
+
+</td>
+
+<td>
+<p>Default constructor.</p>
+
+
+<p>Must be default constructible.</p>
+
+
+</td>
+
+</tr>
+
+<tr>
+<td>
+<pre> sample_range_hashing
+ (<b>const</b> sample_range_hashing &amp;r_other)</pre>
+
+
+</td>
+
+<td>
+<p>Copy constructor.</p>
+
+
+<p>Must be copy constructible.</p>
+
+
+</td>
+
+</tr>
+
+<tr>
+<td>
+<pre><b>inline</b> <b>void</b>
+ swap
+ (sample_range_hashing &amp;r_other)</pre>
+
+
+</td>
+
+<td>
+<p>Swaps content.</p>
+
+
+<p>Must be swappable (if there is such a word).</p>
+
+
+</td>
+
+</tr>
+
+</table>
+
+<h2>
+<a name = "link2">Notification methods.
+</a>
+
+</h2>
+
+<table WIDTH = "100%" BORDER = "1">
+<TR><TD Width = "45%" ALIGN = "left"><b>Method</b></TD><TD Width = "55%" ALIGN = "left"><b>Description</b></TD></TR>
+
+
+<tr>
+<td>
+<pre><b>void</b>
+ notify_resized
+ (size_type size)</pre>
+
+
+</td>
+
+<td>
+<p>Notifies the policy object that the container's size has changed to <font color = "#666666"><tt>size</tt></font>.</p>
+
+
+<p><p><tt>size_type</tt> is the size type on which the functor operates.</p></p>
+
+
+</td>
+
+</tr>
+
+</table>
+
+<h2>
+<a name = "link3">Operators.
+</a>
+
+</h2>
+
+<table WIDTH = "100%" BORDER = "1">
+<TR><TD Width = "45%" ALIGN = "left"><b>Method</b></TD><TD Width = "55%" ALIGN = "left"><b>Description</b></TD></TR>
+
+
+<tr>
+<td>
+<pre>* comment = "@@sample_range_hashing_size_type_comment"&gt;
+**/
+<b>inline</b> size_type
+ <b>operator</b>()
+ (size_type hash) <b>const</b></pre>
+
+
+</td>
+
+<td>
+<p>Transforms the hash value <font color = "#666666"><tt>hash</tt></font> into a ranged-hash value.</p>
+
+
+</td>
+
+</tr>
+
+</table>
+
+
+
+</body>
+
+</html>
+
+
diff --git a/libstdc++-v3/docs/html/ext/pb_assoc/sample_ranged_hash_fn.hpp b/libstdc++-v3/docs/html/ext/pb_assoc/sample_ranged_hash_fn.hpp
new file mode 100644
index 00000000000..32c5a49859b
--- /dev/null
+++ b/libstdc++-v3/docs/html/ext/pb_assoc/sample_ranged_hash_fn.hpp
@@ -0,0 +1,141 @@
+/**
+* @file sample_ranged_hash_fn.hpp
+* Contains a ranged hash policy.
+*
+* Copyright Ami Tavory, IBM-HRL, 2004.
+*
+* 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.
+**/
+
+
+#ifndef SAMPLE_RANGED_HASH_FN_HPP
+#define SAMPLE_RANGED_HASH_FN_HPP
+
+
+/**
+* <class
+* description = "A sample ranged-hash functor."
+* comment = "This class serves to show the interface a ranged-hash
+* functor needs to support.">
+**/
+class sample_ranged_hash_fn
+{
+/**
+*******************************************************************************
+*******************************************************************************
+* <public_methods_group>
+**/
+public:
+ /**
+ ***************************************************************************
+ ***************************************************************************
+ ** <group description = "Constructors, destructor, and related.">
+ **/
+
+ /*
+ * <fn description = "Default constructor."
+ * comment = "Must be default constructible.">
+ **/
+ sample_ranged_hash_fn
+ ();
+ /** </fn> **/
+
+ /*
+ * <fn description = "Copy constructor."
+ * comment = "Must be copy constructible.">
+ **/
+ sample_ranged_hash_fn
+ (const sample_ranged_hash_fn &r_other);
+ /** </fn> **/
+
+ /*
+ * <fn description = "Swaps content."
+ * comment = "Must be swappable (if there is such a word).">
+ **/
+ inline void
+ swap
+ (sample_ranged_hash_fn &r_other);
+ /** </fn> **/
+
+ /*
+ ***************************************************************************
+ ***************************************************************************
+ * </group>
+ **/
+
+/**
+*******************************************************************************
+*******************************************************************************
+* </public_methods_group>
+**/
+
+
+/**
+*******************************************************************************
+*******************************************************************************
+* <protected_methods_group>
+**/
+protected:
+
+ /**
+ ***************************************************************************
+ ***************************************************************************
+ ** <group
+ * description = "Notification methods.">
+ **/
+
+ /*
+ * <fn
+ * description = "Notifies the policy object that the container's
+ * __size has changed to size."
+ * comment = "@@sample_ranged_hash_fn_size_type_comment">
+ **/
+ void
+ notify_resized
+ (size_type size);
+ /** </fn> **/
+
+ /**
+ ***************************************************************************
+ ***************************************************************************
+ ** </group>
+ **/
+
+
+ /**
+ ***************************************************************************
+ ***************************************************************************
+ ** <group
+ * description = "Operators.">
+ **/
+
+ /*
+ * <fn description = "Transforms the const key reference
+ * r_key into a position
+ * within the table.">
+ * comment = "@@sample_ranged_hash_fn_size_type_comment">
+ **/
+ inline size_type
+ operator()
+ (const_key_reference r_key) const;
+ /** </fn> **/
+
+ /**
+ ***************************************************************************
+ ***************************************************************************
+ ** </group>
+ **/
+};
+/**
+* </class>
+**/
+
+
+#endif // #ifndef SAMPLE_RANGED_HASH_FN_HPP
diff --git a/libstdc++-v3/docs/html/ext/pb_assoc/sample_ranged_hash_fn.html b/libstdc++-v3/docs/html/ext/pb_assoc/sample_ranged_hash_fn.html
new file mode 100644
index 00000000000..d3675216d96
--- /dev/null
+++ b/libstdc++-v3/docs/html/ext/pb_assoc/sample_ranged_hash_fn.html
@@ -0,0 +1,129 @@
+
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
+
+
+<html>
+<head>
+<title>sample_ranged_hash_fn Interface
+</title>
+
+</head>
+
+<body>
+<h1>
+<tt>sample_ranged_hash_fn
+</tt>
+
+ Interface
+
+
+</h1>
+
+<p>A sample ranged-hash functor.
+</p>
+
+<p>This class serves to show the interface a ranged-hash functor needs to support.
+</p>
+
+<ol>
+<li>
+<a href = "../doc/sample_ranged_hash_fn.hpp"><tt>sample_ranged_hash_fn.hpp</tt>
+</a>
+
+</li>
+
+<li>
+Public Methods:
+
+
+<ol>
+<li>
+<a href = "#link1">Constructors, destructor, and related.
+</a>
+
+</li>
+
+</ol>
+
+</li>
+
+</ol>
+
+
+<h2>
+<a name = "link1">Constructors, destructor, and related.
+</a>
+
+</h2>
+
+<table WIDTH = "100%" BORDER = "1">
+<TR><TD Width = "45%" ALIGN = "left"><b>Method</b></TD><TD Width = "55%" ALIGN = "left"><b>Description</b></TD></TR>
+
+
+<tr>
+<td>
+<pre> sample_ranged_hash_fn
+ ()</pre>
+
+
+</td>
+
+<td>
+<p>Default constructor.</p>
+
+
+<p>Must be default constructible.</p>
+
+
+</td>
+
+</tr>
+
+<tr>
+<td>
+<pre> sample_ranged_hash_fn
+ (<b>const</b> sample_ranged_hash_fn &amp;r_other)</pre>
+
+
+</td>
+
+<td>
+<p>Copy constructor.</p>
+
+
+<p>Must be copy constructible.</p>
+
+
+</td>
+
+</tr>
+
+<tr>
+<td>
+<pre><b>inline</b> <b>void</b>
+ swap
+ (sample_ranged_hash_fn &amp;r_other)</pre>
+
+
+</td>
+
+<td>
+<p>Swaps content.</p>
+
+
+<p>Must be swappable (if there is such a word).</p>
+
+
+</td>
+
+</tr>
+
+</table>
+
+
+
+</body>
+
+</html>
+
+
diff --git a/libstdc++-v3/docs/html/ext/pb_assoc/sample_ranged_probe_fn.hpp b/libstdc++-v3/docs/html/ext/pb_assoc/sample_ranged_probe_fn.hpp
new file mode 100644
index 00000000000..2aaab0e3d47
--- /dev/null
+++ b/libstdc++-v3/docs/html/ext/pb_assoc/sample_ranged_probe_fn.hpp
@@ -0,0 +1,143 @@
+/**
+* @file sample_ranged_probe_fn.hpp
+* Contains a ranged probe policy.
+*
+* Copyright Ami Tavory, IBM-HRL, 2004.
+*
+* 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.
+**/
+
+
+#ifndef SAMPLE_RANGED_PROBE_FN_HPP
+#define SAMPLE_RANGED_PROBE_FN_HPP
+
+
+/**
+* <class
+* description = "A sample ranged-probe functor."
+* comment = "This class serves to show the interface a ranged-probe
+* functor needs to support.">
+**/
+class sample_ranged_probe_fn
+{
+/**
+*******************************************************************************
+*******************************************************************************
+* <public_methods_group>
+**/
+public:
+ /**
+ ***************************************************************************
+ ***************************************************************************
+ ** <group description = "Constructors, destructor, and related.">
+ **/
+
+ /*
+ * <fn description = "Default constructor."
+ * comment = "Must be default constructible.">
+ **/
+ sample_ranged_probe_fn
+ ();
+ /** </fn> **/
+
+ /*
+ * <fn description = "Copy constructor."
+ * comment = "Must be copy constructible.">
+ **/
+ sample_ranged_probe_fn
+ (const sample_ranged_probe_fn &r_other);
+ /** </fn> **/
+
+ /*
+ * <fn description = "Swaps content."
+ * comment = "Must be swappable (if there is such a word).">
+ **/
+ inline void
+ swap
+ (sample_ranged_probe_fn &r_other);
+ /** </fn> **/
+
+ /*
+ ***************************************************************************
+ ***************************************************************************
+ * </group>
+ **/
+
+/**
+*******************************************************************************
+*******************************************************************************
+* </public_methods_group>
+**/
+
+
+/**
+*******************************************************************************
+*******************************************************************************
+* <protected_methods_group>
+**/
+protected:
+
+ /**
+ ***************************************************************************
+ ***************************************************************************
+ ** <group
+ * description = "Notification methods.">
+ **/
+
+ /*
+ * <fn
+ * description = "Notifies the policy object that the container's
+ * __size has changed to size."
+ * comment = "@@sample_ranged_probe_fn_size_type_comment">
+ **/
+ void
+ notify_resized
+ (size_type size);
+ /** </fn> **/
+
+ /**
+ ***************************************************************************
+ ***************************************************************************
+ ** </group>
+ **/
+
+
+ /**
+ ***************************************************************************
+ ***************************************************************************
+ ** <group
+ * description = "Operators.">
+ **/
+
+ /*
+ * <fn description = "Transforms the const key reference
+ * r_key into the i-th position
+ * within the table. This method is called for
+ * each collision within the probe sequence.">
+ * comment = "@@sample_ranged_probe_fn_size_type_comment">
+ **/
+ inline size_type
+ operator()
+ (const_key_reference r_key,
+ size_type i) const;
+ /** </fn> **/
+
+ /**
+ ***************************************************************************
+ ***************************************************************************
+ ** </group>
+ **/
+};
+/**
+* </class>
+**/
+
+
+#endif // #ifndef SAMPLE_RANGED_PROBE_FN_HPP
diff --git a/libstdc++-v3/docs/html/ext/pb_assoc/sample_ranged_probe_fn.html b/libstdc++-v3/docs/html/ext/pb_assoc/sample_ranged_probe_fn.html
new file mode 100644
index 00000000000..95eee87542f
--- /dev/null
+++ b/libstdc++-v3/docs/html/ext/pb_assoc/sample_ranged_probe_fn.html
@@ -0,0 +1,129 @@
+
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
+
+
+<html>
+<head>
+<title>sample_ranged_probe_fn Interface
+</title>
+
+</head>
+
+<body>
+<h1>
+<tt>sample_ranged_probe_fn
+</tt>
+
+ Interface
+
+
+</h1>
+
+<p>A sample ranged-probe functor.
+</p>
+
+<p>This class serves to show the interface a ranged-probe functor needs to support.
+</p>
+
+<ol>
+<li>
+<a href = "../doc/sample_ranged_probe_fn.hpp"><tt>sample_ranged_probe_fn.hpp</tt>
+</a>
+
+</li>
+
+<li>
+Public Methods:
+
+
+<ol>
+<li>
+<a href = "#link1">Constructors, destructor, and related.
+</a>
+
+</li>
+
+</ol>
+
+</li>
+
+</ol>
+
+
+<h2>
+<a name = "link1">Constructors, destructor, and related.
+</a>
+
+</h2>
+
+<table WIDTH = "100%" BORDER = "1">
+<TR><TD Width = "45%" ALIGN = "left"><b>Method</b></TD><TD Width = "55%" ALIGN = "left"><b>Description</b></TD></TR>
+
+
+<tr>
+<td>
+<pre> sample_ranged_probe_fn
+ ()</pre>
+
+
+</td>
+
+<td>
+<p>Default constructor.</p>
+
+
+<p>Must be default constructible.</p>
+
+
+</td>
+
+</tr>
+
+<tr>
+<td>
+<pre> sample_ranged_probe_fn
+ (<b>const</b> sample_ranged_probe_fn &amp;r_other)</pre>
+
+
+</td>
+
+<td>
+<p>Copy constructor.</p>
+
+
+<p>Must be copy constructible.</p>
+
+
+</td>
+
+</tr>
+
+<tr>
+<td>
+<pre><b>inline</b> <b>void</b>
+ swap
+ (sample_ranged_probe_fn &amp;r_other)</pre>
+
+
+</td>
+
+<td>
+<p>Swaps content.</p>
+
+
+<p>Must be swappable (if there is such a word).</p>
+
+
+</td>
+
+</tr>
+
+</table>
+
+
+
+</body>
+
+</html>
+
+
diff --git a/libstdc++-v3/docs/html/ext/pb_assoc/sample_resize_policy.hpp b/libstdc++-v3/docs/html/ext/pb_assoc/sample_resize_policy.hpp
new file mode 100644
index 00000000000..4101a70fb3c
--- /dev/null
+++ b/libstdc++-v3/docs/html/ext/pb_assoc/sample_resize_policy.hpp
@@ -0,0 +1,310 @@
+/**
+* @file sample_resize_policy.hpp
+* Contains a sample resize policy for hash tables.
+*
+* Copyright Ami Tavory, IBM-HRL, 2004.
+*
+* 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.
+**/
+
+
+#ifndef SAMPLE_RESIZE_POLICY_HPP
+#define SAMPLE_RESIZE_POLICY_HPP
+
+
+/**
+* <class
+* description = "A sample resize policy."
+* comment = "This class serves to show the interface a resize policy
+* needs to support.">
+**/
+class sample_resize_policy
+{
+/**
+*******************************************************************************
+*******************************************************************************
+* <public_methods_group>
+**/
+public:
+ /**
+ ***************************************************************************
+ ***************************************************************************
+ ** <group description = "Constructors, destructor, and related.">
+ **/
+
+ /*
+ * <fn description = "Default constructor."
+ * comment = "Must be default constructible.">
+ **/
+ sample_resize_policy
+ ();
+ /** </fn> **/
+
+ /*
+ * <fn description = "Copy constructor."
+ * comment = "Must be copy constructible.">
+ **/
+ sample_range_hashing
+ (const sample_resize_policy &r_other);
+ /** </fn> **/
+
+ /*
+ * <fn description = "Swaps content."
+ * comment = "Must be swappable (if there is such a word).">
+ **/
+ inline void
+ swap
+ (sample_resize_policy &r_other);
+ /** </fn> **/
+
+ /*
+ ***************************************************************************
+ ***************************************************************************
+ * </group>
+ **/
+
+
+/**
+*******************************************************************************
+*******************************************************************************
+* </public_methods_group>
+**/
+
+
+/**
+*******************************************************************************
+*******************************************************************************
+* <protected_methods_group>
+**/
+protected:
+ /**
+ ***************************************************************************
+ ***************************************************************************
+ ** <group description = "Insert search notifications."
+ ** comment = "Notifications called during an insert operation.">
+ **/
+
+ /*
+ * <fn description = "Notifies a search started.">
+ **/
+ inline void
+ notify_insert_search_start
+ ();
+ /** </fn> **/
+
+ /*
+ * <fn description = "Notifies a search encountered a collision.">
+ **/
+ inline void
+ notify_insert_search_collision
+ ();
+ /** </fn> **/
+
+ /*
+ * <fn description = "Notifies a search ended.">
+ **/
+ inline void
+ notify_insert_search_end
+ ();
+ /** </fn> **/
+
+ /*
+ ***************************************************************************
+ ***************************************************************************
+ * </group>
+ **/
+
+
+ /**
+ ***************************************************************************
+ ***************************************************************************
+ ** <group description = "Find search notifications."
+ ** comment = "Notifications called during a find operation.">
+ **/
+
+ /*
+ * <fn description = "Notifies a search started.">
+ **/
+ inline void
+ notify_find_search_start
+ ();
+ /** </fn> **/
+
+ /*
+ * <fn description = "Notifies a search encountered a collision.">
+ **/
+ inline void
+ notify_find_search_collision
+ ();
+ /** </fn> **/
+
+ /*
+ * <fn description = "Notifies a search ended.">
+ **/
+ inline void
+ notify_find_search_end
+ ();
+ /** </fn> **/
+
+ /*
+ ***************************************************************************
+ ***************************************************************************
+ * </group>
+ **/
+
+
+ /**
+ ***************************************************************************
+ ***************************************************************************
+ ** <group description = "Erase search notifications."
+ ** comment = "Notifications called during an insert operation.">
+ **/
+
+ /*
+ * <fn description = "Notifies a search started.">
+ **/
+ inline void
+ notify_erase_search_start
+ ();
+ /** </fn> **/
+
+ /*
+ * <fn description = "Notifies a search encountered a collision.">
+ **/
+ inline void
+ notify_erase_search_collision
+ ();
+ /** </fn> **/
+
+ /*
+ * <fn description = "Notifies a search ended.">
+ **/
+ inline void
+ notify_erase_search_end
+ ();
+ /** </fn> **/
+
+ /*
+ ***************************************************************************
+ ***************************************************************************
+ * </group>
+ **/
+
+
+ /**
+ ***************************************************************************
+ ***************************************************************************
+ ** <group description = "Content change notifications."
+ ** comment = "Notifications called when the content of the table
+ ** changes in a way that can affect the resize policy.">
+ **/
+
+ /*
+ * <fn description = "Notifies an element was inserted.">
+ **/
+ inline void
+ notify_inserted
+ (size_type num_e);
+ /** </fn> **/
+
+ /*
+ * <fn description = "Notifies an element was erased.">
+ **/
+ inline void
+ notify_erased
+ (size_type num_e);
+ /** </fn> **/
+
+ /*
+ * <fn description = "Notifies the table was cleared.">
+ **/
+ void
+ notify_cleared
+ ();
+ /** </fn> **/
+
+ /*
+ ***************************************************************************
+ ***************************************************************************
+ * </group>
+ **/
+
+
+ /**
+ ***************************************************************************
+ ***************************************************************************
+ ** <group description = "Size change notifications."
+ ** comment = "Notifications called when the table changes size.">
+ **/
+
+ /*
+ * <fn description = "Notifies the table was resized to new_size.">
+ **/
+ void
+ notify_resized
+ (size_type new_size);
+ /** </fn> **/
+
+ /*
+ ***************************************************************************
+ ***************************************************************************
+ * </group>
+ **/
+
+
+ /**
+ ***************************************************************************
+ ***************************************************************************
+ ** <group description = "Queries."
+ ** comment = "Called to query whether/how to resize.">
+ **/
+
+ /*
+ * <fn description = "Queries initial size.">
+ **/
+ size_type
+ get_init_size
+ () const;
+ /** </fn> **/
+
+ /*
+ * <fn description = "Queries whether a resize is needed.">
+ **/
+ inline bool
+ is_resize_needed
+ () const;
+ /** </fn> **/
+
+ /*
+ * <fn description = "Queries what the new size should be.">
+ **/
+ size_type
+ get_new_size
+ (size_type size, size_type num_used_e) const;
+ /** </fn> **/
+
+ /*
+ ***************************************************************************
+ ***************************************************************************
+ * </group>
+ **/
+
+/**
+*******************************************************************************
+*******************************************************************************
+* </protected_methods_group>
+**/
+};
+/**
+* </class>
+**/
+
+
+#endif // #ifndef SAMPLE_RESIZE_POLICY_HPP
diff --git a/libstdc++-v3/docs/html/ext/pb_assoc/sample_resize_policy.html b/libstdc++-v3/docs/html/ext/pb_assoc/sample_resize_policy.html
new file mode 100644
index 00000000000..bb743ab7c7c
--- /dev/null
+++ b/libstdc++-v3/docs/html/ext/pb_assoc/sample_resize_policy.html
@@ -0,0 +1,536 @@
+
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
+
+
+<html>
+<head>
+<title>sample_resize_policy Interface
+</title>
+
+</head>
+
+<body>
+<h1>
+<tt>sample_resize_policy
+</tt>
+
+ Interface
+
+
+</h1>
+
+<p>A sample resize policy.
+</p>
+
+<p>This class serves to show the interface a resize policy needs to support.
+</p>
+
+<ol>
+<li>
+<a href = "../doc/sample_resize_policy.hpp"><tt>sample_resize_policy.hpp</tt>
+</a>
+
+</li>
+
+<li>
+Public Methods:
+
+
+<ol>
+<li>
+<a href = "#link1">Constructors, destructor, and related.
+</a>
+
+</li>
+
+</ol>
+
+</li>
+
+<li>
+Protected Methods:
+
+
+<ol>
+<li>
+<a href = "#link2">Insert search notifications.
+</a>
+
+</li>
+
+<li>
+<a href = "#link3">Find search notifications.
+</a>
+
+</li>
+
+<li>
+<a href = "#link4">Erase search notifications.
+</a>
+
+</li>
+
+<li>
+<a href = "#link5">Content change notifications.
+</a>
+
+</li>
+
+<li>
+<a href = "#link6">Size change notifications.
+</a>
+
+</li>
+
+<li>
+<a href = "#link7">Queries.
+</a>
+
+</li>
+
+</ol>
+
+</li>
+
+</ol>
+
+
+<h2>
+<a name = "link1">Constructors, destructor, and related.
+</a>
+
+</h2>
+
+<table WIDTH = "100%" BORDER = "1">
+<TR><TD Width = "45%" ALIGN = "left"><b>Method</b></TD><TD Width = "55%" ALIGN = "left"><b>Description</b></TD></TR>
+
+
+<tr>
+<td>
+<pre> sample_resize_policy
+ ()</pre>
+
+
+</td>
+
+<td>
+<p>Default constructor.</p>
+
+
+<p>Must be default constructible.</p>
+
+
+</td>
+
+</tr>
+
+<tr>
+<td>
+<pre> sample_range_hashing
+ (<b>const</b> sample_resize_policy &amp;r_other)</pre>
+
+
+</td>
+
+<td>
+<p>Copy constructor.</p>
+
+
+<p>Must be copy constructible.</p>
+
+
+</td>
+
+</tr>
+
+<tr>
+<td>
+<pre><b>inline</b> <b>void</b>
+ swap
+ (sample_resize_policy &amp;r_other)</pre>
+
+
+</td>
+
+<td>
+<p>Swaps content.</p>
+
+
+<p>Must be swappable (if there is such a word).</p>
+
+
+</td>
+
+</tr>
+
+</table>
+
+<h2>
+<a name = "link2">Insert search notifications.
+</a>
+
+</h2>
+
+<p>Notifications called during an insert operation.</p>
+
+
+<table WIDTH = "100%" BORDER = "1">
+<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>
+ notify_insert_search_start
+ ()</pre>
+
+
+</td>
+
+<td>
+<p>Notifies a search started.</p>
+
+
+</td>
+
+</tr>
+
+<tr>
+<td>
+<pre><b>inline</b> <b>void</b>
+ notify_insert_search_collision
+ ()</pre>
+
+
+</td>
+
+<td>
+<p>Notifies a search encountered a collision.</p>
+
+
+</td>
+
+</tr>
+
+<tr>
+<td>
+<pre><b>inline</b> <b>void</b>
+ notify_insert_search_end
+ ()</pre>
+
+
+</td>
+
+<td>
+<p>Notifies a search ended.</p>
+
+
+</td>
+
+</tr>
+
+</table>
+
+<h2>
+<a name = "link3">Find search notifications.
+</a>
+
+</h2>
+
+<p>Notifications called during a find operation.</p>
+
+
+<table WIDTH = "100%" BORDER = "1">
+<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>
+ notify_find_search_start
+ ()</pre>
+
+
+</td>
+
+<td>
+<p>Notifies a search started.</p>
+
+
+</td>
+
+</tr>
+
+<tr>
+<td>
+<pre><b>inline</b> <b>void</b>
+ notify_find_search_collision
+ ()</pre>
+
+
+</td>
+
+<td>
+<p>Notifies a search encountered a collision.</p>
+
+
+</td>
+
+</tr>
+
+<tr>
+<td>
+<pre><b>inline</b> <b>void</b>
+ notify_find_search_end
+ ()</pre>
+
+
+</td>
+
+<td>
+<p>Notifies a search ended.</p>
+
+
+</td>
+
+</tr>
+
+</table>
+
+<h2>
+<a name = "link4">Erase search notifications.
+</a>
+
+</h2>
+
+<p>Notifications called during an insert operation.</p>
+
+
+<table WIDTH = "100%" BORDER = "1">
+<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>
+ notify_erase_search_start
+ ()</pre>
+
+
+</td>
+
+<td>
+<p>Notifies a search started.</p>
+
+
+</td>
+
+</tr>
+
+<tr>
+<td>
+<pre><b>inline</b> <b>void</b>
+ notify_erase_search_collision
+ ()</pre>
+
+
+</td>
+
+<td>
+<p>Notifies a search encountered a collision.</p>
+
+
+</td>
+
+</tr>
+
+<tr>
+<td>
+<pre><b>inline</b> <b>void</b>
+ notify_erase_search_end
+ ()</pre>
+
+
+</td>
+
+<td>
+<p>Notifies a search ended.</p>
+
+
+</td>
+
+</tr>
+
+</table>
+
+<h2>
+<a name = "link5">Content change notifications.
+</a>
+
+</h2>
+
+<p>Notifications called when the content of the table changes in a way that can affect the resize policy.</p>
+
+
+<table WIDTH = "100%" BORDER = "1">
+<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>
+ notify_inserted
+ (size_type num_e)</pre>
+
+
+</td>
+
+<td>
+<p>Notifies an element was inserted.</p>
+
+
+</td>
+
+</tr>
+
+<tr>
+<td>
+<pre><b>inline</b> <b>void</b>
+ notify_erased
+ (size_type num_e)</pre>
+
+
+</td>
+
+<td>
+<p>Notifies an element was erased.</p>
+
+
+</td>
+
+</tr>
+
+<tr>
+<td>
+<pre><b>void</b>
+ notify_cleared
+ ()</pre>
+
+
+</td>
+
+<td>
+<p>Notifies the table was cleared.</p>
+
+
+</td>
+
+</tr>
+
+</table>
+
+<h2>
+<a name = "link6">Size change notifications.
+</a>
+
+</h2>
+
+<p>Notifications called when the table changes size.</p>
+
+
+<table WIDTH = "100%" BORDER = "1">
+<TR><TD Width = "45%" ALIGN = "left"><b>Method</b></TD><TD Width = "55%" ALIGN = "left"><b>Description</b></TD></TR>
+
+
+<tr>
+<td>
+<pre><b>void</b>
+ notify_resized
+ (size_type new_size)</pre>
+
+
+</td>
+
+<td>
+<p>Notifies the table was resized to <font color = "#666666"><tt>new_size</tt></font>.</p>
+
+
+</td>
+
+</tr>
+
+</table>
+
+<h2>
+<a name = "link7">Queries.
+</a>
+
+</h2>
+
+<p>Called to query whether/how to resize.</p>
+
+
+<table WIDTH = "100%" BORDER = "1">
+<TR><TD Width = "45%" ALIGN = "left"><b>Method</b></TD><TD Width = "55%" ALIGN = "left"><b>Description</b></TD></TR>
+
+
+<tr>
+<td>
+<pre>size_type
+ get_init_size
+ () <b>const</b></pre>
+
+
+</td>
+
+<td>
+<p>Queries initial size.</p>
+
+
+</td>
+
+</tr>
+
+<tr>
+<td>
+<pre><b>inline</b> <b>bool</b>
+ is_resize_needed
+ () <b>const</b></pre>
+
+
+</td>
+
+<td>
+<p>Queries whether a resize is needed.</p>
+
+
+</td>
+
+</tr>
+
+<tr>
+<td>
+<pre>size_type
+ get_new_size
+ (size_type size, size_type num_used_e) <b>const</b></pre>
+
+
+</td>
+
+<td>
+<p>Queries what the new <font color = "#666666"><tt>size</tt></font> should be.</p>
+
+
+</td>
+
+</tr>
+
+</table>
+
+
+
+</body>
+
+</html>
+
+
diff --git a/libstdc++-v3/docs/html/ext/pb_assoc/sample_resize_trigger.hpp b/libstdc++-v3/docs/html/ext/pb_assoc/sample_resize_trigger.hpp
new file mode 100644
index 00000000000..b2799cfb783
--- /dev/null
+++ b/libstdc++-v3/docs/html/ext/pb_assoc/sample_resize_trigger.hpp
@@ -0,0 +1,341 @@
+/**
+* @file sample_resize_trigger.hpp
+* Contains a sample resize trigger policy class.
+*
+* Copyright Ami Tavory, IBM-HRL, 2004.
+*
+* 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.
+**/
+
+
+#ifndef SAMPLE_RESIZE_TRIGGER_HPP
+#define SAMPLE_RESIZE_TRIGGER_HPP
+
+
+/**
+* <class
+* description = "A sample resize trigger policy."
+* comment = "This class serves to show the interface a trigger policy
+* needs to support.">
+**/
+class sample_resize_trigger
+{
+/**
+*******************************************************************************
+*******************************************************************************
+* <public_methods_group>
+**/
+public:
+ /**
+ ***************************************************************************
+ ***************************************************************************
+ ** <group description = "Constructors, destructor, and related.">
+ **/
+
+ /*
+ * <fn description = "Default constructor."
+ * comment = "Must be default constructible.">
+ **/
+ sample_resize_trigger
+ ();
+ /** </fn> **/
+
+ /*
+ * <fn description = "Copy constructor."
+ * comment = "Must be copy constructible.">
+ **/
+ sample_range_hashing
+ (const sample_resize_trigger &r_other);
+ /** </fn> **/
+
+ /*
+ * <fn description = "Swaps content."
+ * comment = "Must be swappable (if there is such a word).">
+ **/
+ inline void
+ swap
+ (sample_resize_trigger &r_other);
+ /** </fn> **/
+
+ /*
+ ***************************************************************************
+ ***************************************************************************
+ * </group>
+ **/
+
+
+/**
+*******************************************************************************
+*******************************************************************************
+* </public_methods_group>
+**/
+
+
+/**
+*******************************************************************************
+*******************************************************************************
+* <protected_methods_group>
+**/
+protected:
+ /**
+ **************************************************************************
+ ***************************************************************************
+ ** <group description = "Insert search notifications."
+ ** comment = "Notifications called during an insert operation.">
+ **/
+
+ /*
+ * <fn description = "Notifies a search started.">
+ **/
+ inline void
+ notify_insert_search_start
+ ();
+ /** </fn> **/
+
+ /*
+ * <fn description = "Notifies a search encountered a collision.">
+ **/
+ inline void
+ notify_insert_search_collision
+ ();
+ /** </fn> **/
+
+ /*
+ * <fn description = "Notifies a search ended.">
+ **/
+ inline void
+ notify_insert_search_end
+ ();
+ /** </fn> **/
+
+ /*
+ ***************************************************************************
+ ***************************************************************************
+ * </group>
+ **/
+
+
+ /**
+ ***************************************************************************
+ ***************************************************************************
+ ** <group description = "Find search notifications."
+ ** comment = "Notifications called during a find operation.">
+ **/
+
+ /*
+ * <fn description = "Notifies a search started.">
+ **/
+ inline void
+ notify_find_search_start
+ ();
+ /** </fn> **/
+
+ /*
+ * <fn description = "Notifies a search encountered a collision.">
+ **/
+ inline void
+ notify_find_search_collision
+ ();
+ /** </fn> **/
+
+ /*
+ * <fn description = "Notifies a search ended.">
+ **/
+ inline void
+ notify_find_search_end
+ ();
+ /** </fn> **/
+
+ /*
+ ***************************************************************************
+ ***************************************************************************
+ * </group>
+ **/
+
+
+ /**
+ ***************************************************************************
+ ***************************************************************************
+ ** <group description = "Erase search notifications."
+ ** comment = "Notifications called during an insert operation.">
+ **/
+
+ /*
+ * <fn description = "Notifies a search started.">
+ **/
+ inline void
+ notify_erase_search_start
+ ();
+ /** </fn> **/
+
+ /*
+ * <fn description = "Notifies a search encountered a collision.">
+ **/
+ inline void
+ notify_erase_search_collision
+ ();
+ /** </fn> **/
+
+ /*
+ * <fn description = "Notifies a search ended.">
+ **/
+ inline void
+ notify_erase_search_end
+ ();
+ /** </fn> **/
+
+ /*
+ ***************************************************************************
+ ***************************************************************************
+ * </group>
+ **/
+
+
+ /**
+ ***************************************************************************
+ ***************************************************************************
+ ** <group description = "Content change notifications."
+ ** comment = "Notifications called when the content of the table
+ ** changes in a way that can affect the resize policy.">
+ **/
+
+ /*
+ * <fn description = "Notifies an element was inserted.
+ * the total number of entries in the table is num_entries.">
+ **/
+ inline void
+ notify_inserted
+ (size_type num_entries);
+ /** </fn> **/
+
+ /*
+ * <fn description = "Notifies an element was erased."
+ * the total number of entries in the table is num_entries.">
+ **/
+ inline void
+ notify_erased
+ (size_type num_entries);
+ /** </fn> **/
+
+ /*
+ * <fn description = "Notifies the table was cleared.">
+ **/
+ void
+ notify_cleared
+ ();
+ /** </fn> **/
+
+ /*
+ ***************************************************************************
+ ***************************************************************************
+ * </group>
+ **/
+
+
+ /**
+ ***************************************************************************
+ ***************************************************************************
+ ** <group description = "Size change notifications."
+ ** comment = "Notifications called when the table changes size.">
+ **/
+
+ /*
+ * <fn description = "Notifies the table was resized as a result of
+ * this object's signifying that a resize is needed."
+ * The actual size of the table is new_size.">
+ **/
+ void
+ notify_resized
+ (size_type new_size);
+ /** </fn> **/
+
+ /*
+ * <fn description = "Notifies the table was resized externally."
+ * The actual size of the table is new_size.">
+ **/
+ void
+ notify_externally_resized
+ (size_type new_size);
+ /** </fn> **/
+
+ /*
+ ***************************************************************************
+ ***************************************************************************
+ * </group>
+ **/
+
+
+ /**
+ ***************************************************************************
+ ***************************************************************************
+ ** <group description = "Queries."
+ ** comment = "Called to query whether/how to resize.">
+ **/
+
+ /*
+ * <fn description = "Queries whether a resize is needed.">
+ **/
+ inline bool
+ is_resize_needed
+ () const;
+ /** </fn> **/
+
+ /*
+ * <fn description = "Queries whether a grow is needed."
+ * comment = "This method is
+ * called only if this object indicated resize is needed.
+ * The actual size of the table is size, and the number of
+ * entries in it is num_entries.">
+ **/
+ inline bool
+ is_grow_needed
+ (size_type size,
+ size_type num_entries) const;
+ /** </fn> **/
+
+ /*
+ * <fn description = "Queries whether a shrink is needed."
+ * comment = "This method is
+ * called only if this object indicated resize is needed.
+ * The actual size of the table is size, and the number of
+ * entries in it is num_entries.">
+ **/
+ inline bool
+ is_shrink_needed
+ (size_type size,
+ size_type num_entries) const;
+ /** </fn> **/
+
+ /*
+ ***************************************************************************
+ ***************************************************************************
+ * </group>
+ **/
+
+
+/**
+*******************************************************************************
+*******************************************************************************
+* </protected_methods_group>
+**/
+};
+/**
+* </class>
+**/
+
+
+/*
+****************************************************************************
+****************************************************************************
+*/
+} // namespace pb_assoc
+
+
+#endif // #ifndef SAMPLE_RESIZE_TRIGGER_HPP
diff --git a/libstdc++-v3/docs/html/ext/pb_assoc/sample_size_policy.hpp b/libstdc++-v3/docs/html/ext/pb_assoc/sample_size_policy.hpp
new file mode 100644
index 00000000000..a8642700b26
--- /dev/null
+++ b/libstdc++-v3/docs/html/ext/pb_assoc/sample_size_policy.hpp
@@ -0,0 +1,140 @@
+/**
+* @file sample_size_policy.hpp
+* Contains a sample size resize-policy.
+*
+* Copyright Ami Tavory, IBM-HRL, 2004.
+*
+* 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.
+**/
+
+
+#ifndef SAMPLE_SIZE_POLICY_HPP
+#define SAMPLE_SIZE_POLICY_HPP
+
+
+/**
+* <class
+* description = "A sample size policy."
+* comment = "This class serves to show the interface a size policy
+* needs to support.">
+**/
+class sample_size_policy
+{
+/**
+*******************************************************************************
+*******************************************************************************
+* <public_methods_group>
+**/
+public:
+ /**
+ ***************************************************************************
+ ***************************************************************************
+ ** <group description = "Constructors, destructor, and related.">
+ **/
+
+ /*
+ * <fn description = "Default constructor."
+ * comment = "Must be default constructible.">
+ **/
+ sample_size_policy
+ ();
+ /** </fn> **/
+
+ /*
+ * <fn description = "Copy constructor."
+ * comment = "Must be copy constructible.">
+ **/
+ sample_range_hashing
+ (const sample_size_policy &r_other);
+ /** </fn> **/
+
+ /*
+ * <fn description = "Swaps content."
+ * comment = "Must be swappable (if there is such a word).">
+ **/
+ inline void
+ swap
+ (sample_size_policy &r_other);
+ /** </fn> **/
+
+ /*
+ ***************************************************************************
+ ***************************************************************************
+ * </group>
+ **/
+
+
+/**
+*******************************************************************************
+*******************************************************************************
+* </public_methods_group>
+**/
+
+
+/**
+*******************************************************************************
+*******************************************************************************
+* <protected_methods_group>
+**/
+protected:
+
+ /**
+ **************************************************************************
+ ***************************************************************************
+ ** <group description = "Size methods">
+ **/
+
+ /*
+ * <fn description = "Given suggested_size, a suggested size, returns
+ * an initial size of the container related to the initial size.">
+ **/
+ inline size_type
+ get_init_size
+ (size_type suggested_size) const;
+ /** </fn> **/
+
+ /*
+ * <fn description = "Given cur_size, the
+ * current size, returns a size that is
+ * larger.">
+ **/
+ inline size_type
+ get_nearest_larger_size
+ (size_type cur_size) const;
+ /** </fn> **/
+
+ /*
+ * <fn description = "Given cur_size, the current size, returns a size that is
+ * smaller.">
+ **/
+ inline size_type
+ get_nearest_smaller_size
+ (size_type cur_size) const;
+ /** </fn> **/
+
+ /**
+ **************************************************************************
+ ***************************************************************************
+ ** </group>
+ **/
+
+
+/**
+*******************************************************************************
+*******************************************************************************
+* </protected_methods_group>
+**/
+};
+/*
+** </class>
+**/
+
+
+#endif // #ifndef SAMPLE_SIZE_POLICY_HPP
diff --git a/libstdc++-v3/docs/html/ext/pb_assoc/sample_update_policy.hpp b/libstdc++-v3/docs/html/ext/pb_assoc/sample_update_policy.hpp
new file mode 100644
index 00000000000..70a1bd438ba
--- /dev/null
+++ b/libstdc++-v3/docs/html/ext/pb_assoc/sample_update_policy.hpp
@@ -0,0 +1,171 @@
+/**
+* @file sample_update_policy.hpp
+* Contains a sample policy for list update containers.
+*
+* Copyright Ami Tavory, IBM-HRL, 2004.
+*
+* 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.
+**/
+
+
+#ifndef SAMPLE_UPDATE_POLICY_HPP
+#define SAMPLE_UPDATE_POLICY_HPP
+
+
+/**
+* <class
+* description = "A sample list-update policy."
+* comment = "This class serves to show the interface a list update functor
+* needs to support.">
+**/
+class sample_update_policy
+{
+/**
+*******************************************************************************
+*******************************************************************************
+* <public_methods_group>
+**/
+public:
+ /**
+ ***************************************************************************
+ ***************************************************************************
+ ** <group description = "Constructors, destructor, and related.">
+ **/
+
+ /*
+ * <fn description = "Default constructor."
+ * comment = "Must be default constructible.">
+ **/
+ sample_update_policy
+ ();
+ /** </fn> **/
+
+ /*
+ * <fn description = "Copy constructor."
+ * comment = "Must be copy constructible.">
+ **/
+ sample_update_policy
+ (const sample_update_policy &r_other);
+ /** </fn> **/
+
+ /*
+ * <fn description = "Swaps content."
+ * comment = "Must be swappable (if there is such a word).">
+ **/
+ inline void
+ swap
+ (sample_update_policy &r_other);
+ /** </fn> **/
+
+ /*
+ ***************************************************************************
+ ***************************************************************************
+ * </group>
+ **/
+
+/**
+*******************************************************************************
+*******************************************************************************
+* </public_methods_group>
+**/
+
+
+/**
+*******************************************************************************
+*******************************************************************************
+* <protected_types_group>
+**/
+protected:
+
+ /**
+ ***************************************************************************
+ ***************************************************************************
+ ** <group description = "Metadata definitions.">
+ **/
+
+ /**
+ * <tdef description = "Metadata on which this functor operates."
+ * comment = "The class must declare the metadata type on which it
+ * operates; the list-update based containers will append to
+ * each node an object of this type.">
+ **/
+ typedef
+ some_metadata_type
+ metadata_type;
+ /** </tdef> **/
+
+
+ /*
+ ***************************************************************************
+ ***************************************************************************
+ * </group>
+ **/
+
+/**
+*******************************************************************************
+*******************************************************************************
+* </protected_types_group>
+**/
+
+
+/**
+*******************************************************************************
+*******************************************************************************
+* <protected_methods_group>
+**/
+protected:
+ /**
+ ***************************************************************************
+ ***************************************************************************
+ ** <group description = "Metadata operations.">
+ **/
+
+ /*
+ * <fn description = "Creates a metadata object."
+ * comment = "A list-update based container object will call this
+ * method to create a metadata type when a node is created.">
+ **/
+ metadata_type
+ operator()
+ () const;
+ /** </fn> **/
+
+ /*
+ * <fn description = "Decides whether a metadata object should be
+ * moved to the front of the list. A list-update based containers object
+ * will call this
+ * method to decide whether to move a node to the front of
+ * the list. The method shoule return true if the node should
+ * be moved to the front of the list."
+ * comment = "@@sample_update_policy_metadata_reference">
+ **/
+ bool
+ operator()
+ (metadata_reference r_data) const;
+ /** </fn> **/
+
+ /*
+ ***************************************************************************
+ ***************************************************************************
+ * </group>
+ **/
+
+/**
+*******************************************************************************
+*******************************************************************************
+* </protected_methods_group>
+**/
+};
+/**
+* </class>
+**/
+
+
+#endif // #ifndef SAMPLE_UPDATE_POLICY_HPP
diff --git a/libstdc++-v3/docs/html/ext/pb_assoc/size_policies_general.html b/libstdc++-v3/docs/html/ext/pb_assoc/size_policies_general.html
new file mode 100644
index 00000000000..d79d68af9a4
--- /dev/null
+++ b/libstdc++-v3/docs/html/ext/pb_assoc/size_policies_general.html
@@ -0,0 +1,22 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
+<html>
+<head>
+<title>Size Policies</title>
+<meta name="GENERATOR" content="Microsoft Visual Studio .NET 7.1">
+<meta name="vs_targetSchema" content="http://schemas.microsoft.com/intellisense/ie5">
+</head>
+<body>
+<h1>Size Policies</h1>
+
+<p>
+ A size policy, say <tt>size_pol</tt>, should support
+the types and
+methods below.
+<ol>
+ <li><a href = "size_policy_types.html">Types</a></li>
+ <li> <a href = "size_policy_methods.html">Methods</a></li>
+</ol>
+</p>
+
+</body>
+</html>
diff --git a/libstdc++-v3/docs/html/ext/pb_assoc/splay_tree_ds_tag.html b/libstdc++-v3/docs/html/ext/pb_assoc/splay_tree_ds_tag.html
new file mode 100644
index 00000000000..71d8e3f78ad
--- /dev/null
+++ b/libstdc++-v3/docs/html/ext/pb_assoc/splay_tree_ds_tag.html
@@ -0,0 +1,74 @@
+
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
+
+
+<html>
+<head>
+<title>splay_tree_ds_tag Interface
+</title>
+
+</head>
+
+<body>
+<h1>
+<tt>splay_tree_ds_tag
+</tt>
+
+ Interface
+
+
+</h1>
+
+<p>Splay tree data-structure tag.
+</p>
+
+<ol>
+<li>
+<a href = "../../../../include/ext/pb_assoc/ds_trait.hpp"><tt>ds_trait.hpp</tt>
+</a>
+
+</li>
+
+<li>
+<a href = "#link1">Base classes.
+</a>
+
+</li>
+
+</ol>
+
+
+<h2>
+<a name = "link1">Base classes.
+</a>
+
+</h2>
+
+<table WIDTH = "100%" BORDER = "1">
+<TR><TD Width = "80%" ALIGN = "left"><b>Class</b></TD><TD Width = "20%" ALIGN = "left"><b>Derivation Type</b></TD></TR>
+
+
+<tr>
+<td>
+<pre><a href = "basic_tree_ds_tag.html"><tt>basic_tree_ds_tag</tt></a></pre>
+
+
+</td>
+
+<td>
+<p>public</p>
+
+
+</td>
+
+</tr>
+
+</table>
+
+
+
+</body>
+
+</html>
+
+
diff --git a/libstdc++-v3/docs/html/ext/pb_assoc/timing_tests.html b/libstdc++-v3/docs/html/ext/pb_assoc/timing_tests.html
new file mode 100644
index 00000000000..8fd034ccd80
--- /dev/null
+++ b/libstdc++-v3/docs/html/ext/pb_assoc/timing_tests.html
@@ -0,0 +1,60 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
+<html>
+<head>
+<title>Timing Tests</title>
+<meta name="GENERATOR" content="Microsoft Visual Studio .NET 7.1">
+<meta name="vs_targetSchema" content="http://schemas.microsoft.com/intellisense/ie5">
+</head>
+<body bgcolor = "white">
+<h1>Timing Tests</h1>
+
+<p>
+ This section describes timing tests and their results. The tests were
+performed on two systems:
+</p>
+<ol>
+ <li> </li>
+ <li> Intel </li>
+</ol>
+
+<p>
+ The tests are organized as follows:
+</p>
+<ol>
+ <li><a href = "#hash_based">Hash-Based Container Tests</a>
+ shows tests pertaining to hash-based containers.
+ </li>
+ <li><a href = "#hash_based">Tree-Based Container Tests</a>
+ shows tests pertaining to tree-based containers.
+ </li>
+</ol>
+
+<h2><a name = "hash_based">Hash-Based Container Tests</a></h2>
+
+<h3>Random-Integer Find Test</h3>
+
+<p>
+ This test measurs the average time to find an entry
+in a &quot;set&quot; as a function of the &quot;set&quot;'s
+size.</p>
+_
+<p>
+ The test's purpose is to find the effect of
+different range-hashing functions. See
+<a href = "hash_based_containers.html#hash_policies">Hash-Based Containers::Resize Policies</a>
+</p>
+
+<p>
+Source code:
+<a href = "../testsuite/timing/hash_random_int_find_timing_test.cpp"><tt>hash_random_int_find_timing_test.cpp</tt></a>.
+</p>
+
+<p>
+Execution: <tt>hash_random_int_find_timing_test </tt>
+</p>
+
+
+<h2><a name = "tree_based">Tree-Based Container Tests</a></h2>
+
+</body>
+</html>
diff --git a/libstdc++-v3/docs/html/ext/pb_assoc/toc.html b/libstdc++-v3/docs/html/ext/pb_assoc/toc.html
new file mode 100644
index 00000000000..c46f16094f2
--- /dev/null
+++ b/libstdc++-v3/docs/html/ext/pb_assoc/toc.html
@@ -0,0 +1,35 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
+<HTML>
+<HEAD>
+<TITLE>Table of Contents</TITLE>
+<META NAME="Generator" content="Microsoft Visual Studio .NET 7.1">
+<base target = "content">
+</HEAD>
+<BODY>
+<H1>Contents</H1>
+
+
+<a href = "home.html">Main Page</a>
+
+<OL>
+ <li> <a href = "introduction.html">Introduction</a></li>
+ <li> <A HREF= "motivation.html">Motivation</A> </li>
+ <li> <a href = "design.html">Design</a>
+ <ol>
+ <li> <a href = "overview.html">Overview</a></li>
+ </ol>
+ </li>
+ <li> <a href = "interface.html">Interface</a>
+ <ol>
+ <li> <a href = "tutorial.html">Short Tutorial</a></li>
+ </ol>
+ <li> <a href = "examples.html">Examples</a> </li>
+ <li> <a href = "regression_tests.html">Regression Tests</a> </li>
+ <li> <a href = "timing_tests.html">Timing Tests</a> </li>
+ <li> <a href = "contact.html">Contact</a></li>
+ <li> <a href = "acks.html">Acknowledgements</a> </li>
+ <li> <a href = "disclaimer.html">Disclaimer and Copyright</a> </li>
+ <li> <a href="references.html">References</a> </li>
+</OL>
+</BODY>
+</HTML>
diff --git a/libstdc++-v3/docs/html/ext/pb_assoc/tree_assoc_cntnr.html b/libstdc++-v3/docs/html/ext/pb_assoc/tree_assoc_cntnr.html
new file mode 100644
index 00000000000..f524f96eb26
--- /dev/null
+++ b/libstdc++-v3/docs/html/ext/pb_assoc/tree_assoc_cntnr.html
@@ -0,0 +1,493 @@
+
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
+
+
+<html>
+<head>
+<title>tree_assoc_cntnr Interface
+</title>
+
+</head>
+
+<body>
+<h1>
+<tt>tree_assoc_cntnr
+</tt>
+
+ Interface
+
+
+</h1>
+
+<p>A tree-based associative container.
+</p>
+
+<ol>
+<li>
+<a href = "../../../../include/ext/pb_assoc/assoc_cntnr.hpp"><tt>assoc_cntnr.hpp</tt>
+</a>
+
+</li>
+
+<li>
+<a href = "#link1">Template parameters.
+</a>
+
+</li>
+
+<li>
+<a href = "#link2">Base classes.
+</a>
+
+</li>
+
+<li>
+Public Types and Constants:
+
+
+<ol>
+<li>
+<a href = "#link3">Policy definitions.
+</a>
+
+</li>
+
+</ol>
+
+</li>
+
+<li>
+Public Methods:
+
+
+<ol>
+<li>
+<a href = "#link4">Constructors, destructor, and related.
+</a>
+
+</li>
+
+</ol>
+
+</li>
+
+</ol>
+
+
+<h2>
+<a name = "link1">Template parameters.
+</a>
+
+</h2>
+
+<table WIDTH = "100%" BORDER = "1">
+<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 = "Key3735928856">Key</a></pre>
+
+
+</td>
+
+<td>
+<p>Key type.</p>
+
+
+</td>
+
+<td>
+-
+
+
+</td>
+
+</tr>
+
+<tr>
+<td>
+<pre><a name = "Data3735928937">Data</a></pre>
+
+
+</td>
+
+<td>
+<p>Data type.</p>
+
+
+</td>
+
+<td>
+-
+
+
+</td>
+
+</tr>
+
+<tr>
+<td>
+<pre><a name = "Cmp_Fn3735929122">Cmp_Fn</a></pre>
+
+
+</td>
+
+<td>
+<p>Comparison functor.</p>
+
+
+</td>
+
+<td>
+<pre>std::less&lt;<a href = "#Key3735928856">Key</a>&gt;</pre>
+
+
+</td>
+
+</tr>
+
+<tr>
+<td>
+<pre><a name = "DS_Tag3735929089">DS_Tag</a></pre>
+
+
+</td>
+
+<td>
+<p>Data-structure tag.</p>
+
+
+</td>
+
+<td>
+-
+
+
+</td>
+
+</tr>
+
+<tr>
+<td>
+<pre><a name = "Node_Updator3735929779">Node_Updator</a></pre>
+
+
+</td>
+
+<td>
+<p>Node updator type.</p>
+
+
+<p><a href = "concepts.html#concepts_node_invariants">Node Invariants</a> explains this concept.</p>
+
+
+</td>
+
+<td>
+<a href = "null_node_updator.html"><tt>null_node_updator</tt></a>
+
+
+</td>
+
+</tr>
+
+<tr>
+<td>
+<pre><a name = "Allocator3735929488">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">Base classes.
+</a>
+
+</h2>
+
+<table WIDTH = "100%" BORDER = "1">
+<TR><TD Width = "80%" ALIGN = "left"><b>Class</b></TD><TD Width = "20%" ALIGN = "left"><b>Derivation Type</b></TD></TR>
+
+
+<tr>
+<td>
+<pre>Depending on whether <a href = "#DS_Tag3735929089">DS_Tag</a> is a type supporting reverse iteration,<ol> <li> <a href = "basic_tree_assoc_cntnr.html"><tt>basic_tree_assoc_cntnr</tt></a> no reverse-iteration specialization </li> <li> <a href = "basic_tree_assoc_cntnr_rev_it.html"><tt>basic_tree_assoc_cntnr</tt></a> reverse-iteration specialization </li></ol></pre>
+
+
+</td>
+
+<td>
+<p>public</p>
+
+
+</td>
+
+</tr>
+
+</table>
+
+<h2>
+<a name = "link3">Policy definitions.
+</a>
+
+</h2>
+
+<table WIDTH = "100%" BORDER = "1">
+<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 = "cmp_fn3735929186">cmp_fn</a></pre>
+
+
+</td>
+
+<td>
+<pre><a href = "#Cmp_Fn3735929122">Cmp_Fn</a></pre>
+
+
+</td>
+
+<td>
+<p>Comparison functor type.</p>
+
+
+</td>
+
+</tr>
+
+<tr>
+<td>
+<pre><a name = "node_updator3735929843">node_updator</a></pre>
+
+
+</td>
+
+<td>
+<pre><a href = "#Node_Updator3735929779">Node_Updator</a></pre>
+
+
+</td>
+
+<td>
+<p>Node updator type.</p>
+
+
+</td>
+
+</tr>
+
+</table>
+
+<h2>
+<a name = "link4">Constructors, destructor, and related.
+</a>
+
+</h2>
+
+<table WIDTH = "100%" BORDER = "1">
+<TR><TD Width = "45%" ALIGN = "left"><b>Method</b></TD><TD Width = "55%" ALIGN = "left"><b>Description</b></TD></TR>
+
+
+<tr>
+<td>
+<pre> tree_assoc_cntnr
+ ()</pre>
+
+
+</td>
+
+<td>
+<p>Default constructor.</p>
+
+
+</td>
+
+</tr>
+
+<tr>
+<td>
+<pre> tree_assoc_cntnr
+ (<b>const</b> <a href = "#cmp_fn3735929186">cmp_fn</a> &amp;r_cmp_fn)</pre>
+
+
+</td>
+
+<td>
+<p>Constructor taking some policy objects. <font color = "#666666"><tt>r_cmp_fn</tt></font> will be copied by the <a href = "#Cmp_Fn3735929122"><tt>Cmp_Fn</tt></a> object of the container object.</p>
+
+
+</td>
+
+</tr>
+
+<tr>
+<td>
+<pre> tree_assoc_cntnr
+ (<b>const</b> <a href = "#cmp_fn3735929186">cmp_fn</a> &amp;r_cmp_fn,
+ <b>const</b> <a href = "#Node_Updator3735929779">Node_Updator</a> &amp;r_node_updator)</pre>
+
+
+</td>
+
+<td>
+<p>Constructor taking some policy objects. <font color = "#666666"><tt>r_cmp_fn</tt></font> will be copied by the <a href = "#Cmp_Fn3735929122"><tt>Cmp_Fn</tt></a> object of the container object, and <font color = "#666666"><tt>r_node_updator</tt></font> will be copied by the <a href = "#Node_Updator3735929779"><tt>Node_Updator</tt></a> object of the container object.</p>
+
+
+</td>
+
+</tr>
+
+<tr>
+<td>
+<pre><b>template</b>&lt;
+ <b>class</b> It&gt;
+ tree_assoc_cntnr
+ (It first_it,
+ It last_it)</pre>
+
+
+</td>
+
+<td>
+<p>Constructor taking iterators to a range of value_types. The value_types between <font color = "#666666"><tt>first_it</tt></font> and <font color = "#666666"><tt>last_it</tt></font> will be inserted into the container object.</p>
+
+
+</td>
+
+</tr>
+
+<tr>
+<td>
+<pre><b>template</b>&lt;
+ <b>class</b> It&gt;
+ tree_assoc_cntnr
+ (It first_it,
+ It last_it,
+ <b>const</b> <a href = "#cmp_fn3735929186">cmp_fn</a> &amp;r_cmp_fn)</pre>
+
+
+</td>
+
+<td>
+<p>Constructor taking iterators to a range of value_types and some policy objects The value_types between <font color = "#666666"><tt>first_it</tt></font> and <font color = "#666666"><tt>last_it</tt></font> will be inserted into the container object. <font color = "#666666"><tt>r_cmp_fn</tt></font> will be copied by the <a href = "#Cmp_Fn3735929122"><tt>Cmp_Fn</tt></a> object of the container object.</p>
+
+
+</td>
+
+</tr>
+
+<tr>
+<td>
+<pre><b>template</b>&lt;
+ <b>class</b> It&gt;
+ tree_assoc_cntnr
+ (It first_it,
+ It last_it,
+ <b>const</b> <a href = "#cmp_fn3735929186">cmp_fn</a> &amp;r_cmp_fn,
+ <b>const</b> <a href = "#Node_Updator3735929779">Node_Updator</a> &amp;r_node_updator)</pre>
+
+
+</td>
+
+<td>
+<p>Constructor taking iterators to a range of value_types and some policy objects The value_types between <font color = "#666666"><tt>first_it</tt></font> and <font color = "#666666"><tt>last_it</tt></font> will be inserted into the container object. <font color = "#666666"><tt>r_cmp_fn</tt></font> will be copied by the <a href = "#Cmp_Fn3735929122"><tt>Cmp_Fn</tt></a> object of the container object, and <font color = "#666666"><tt>r_node_updator</tt></font> will be copied by the <a href = "#Node_Updator3735929779"><tt>Node_Updator</tt></a> object of the container object.</p>
+
+
+</td>
+
+</tr>
+
+<tr>
+<td>
+<pre> tree_assoc_cntnr
+ (<b>const</b> <font color = "olive">tree_assoc_cntnr</font> &amp;r_other)</pre>
+
+
+</td>
+
+<td>
+<p>Copy constructor.</p>
+
+
+</td>
+
+</tr>
+
+<tr>
+<td>
+<pre><b>virtual</b>
+ ~tree_assoc_cntnr
+ ()</pre>
+
+
+</td>
+
+<td>
+<p>Destructor.</p>
+
+
+</td>
+
+</tr>
+
+<tr>
+<td>
+<pre><font color = "olive">tree_assoc_cntnr</font> &amp;
+ <b>operator</b>=
+ (<b>const</b> <font color = "olive">tree_assoc_cntnr</font> &amp;r_other)</pre>
+
+
+</td>
+
+<td>
+<p>Assignment operator.</p>
+
+
+</td>
+
+</tr>
+
+<tr>
+<td>
+<pre><b>void</b>
+ swap
+ (<font color = "olive">tree_assoc_cntnr</font> &amp;r_other)</pre>
+
+
+</td>
+
+<td>
+<p>Swaps content.</p>
+
+
+</td>
+
+</tr>
+
+</table>
+
+
+
+</body>
+
+</html>
+
+
diff --git a/libstdc++-v3/docs/html/ext/pb_assoc/tree_assoc_cntnr_const_node_iterator.html b/libstdc++-v3/docs/html/ext/pb_assoc/tree_assoc_cntnr_const_node_iterator.html
new file mode 100644
index 00000000000..14aaced365c
--- /dev/null
+++ b/libstdc++-v3/docs/html/ext/pb_assoc/tree_assoc_cntnr_const_node_iterator.html
@@ -0,0 +1,488 @@
+
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
+
+
+<html>
+<head>
+<title>tree_assoc_cntnr::const_node_iterator Interface
+</title>
+
+</head>
+
+<body>
+<h1>
+<tt><font color = "olive">tree_assoc_cntnr</font>::const_node_iterator
+</tt>
+
+ Interface
+
+
+</h1>
+
+<p>Const node iterator.
+</p>
+
+<p>This is an
+</p>
+
+<ol>
+<li>
+Public Types and Constants:
+
+
+<ol>
+<li>
+<a href = "#link1">Iterator definitions.
+</a>
+
+</li>
+
+<li>
+<a href = "#link2">Value-type definitions.
+</a>
+
+</li>
+
+</ol>
+
+</li>
+
+<li>
+Public Methods:
+
+
+<ol>
+<li>
+<a href = "#link3">Constructors, destructor, and related.
+</a>
+
+</li>
+
+<li>
+<a href = "#link4">Access methods.
+</a>
+
+</li>
+
+<li>
+<a href = "#link5">Movement methods.
+</a>
+
+</li>
+
+<li>
+<a href = "#link6">Comparison methods.
+</a>
+
+</li>
+
+</ol>
+
+</li>
+
+</ol>
+
+
+<h2>
+<a name = "link1">Iterator definitions.
+</a>
+
+</h2>
+
+<table WIDTH = "100%" BORDER = "1">
+<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 = "iterator_category3735929377">iterator_category</a></pre>
+
+
+</td>
+
+<td>
+<pre>trivial_iterator_tag</pre>
+
+
+</td>
+
+<td>
+<p>Category. comment = </p>
+
+
+</td>
+
+</tr>
+
+<tr>
+<td>
+<pre><a name = "difference_type3735930139">difference_type</a></pre>
+
+
+</td>
+
+<td>
+<pre><b>void</b></pre>
+
+
+</td>
+
+<td>
+<p>Difference type.</p>
+
+
+</td>
+
+</tr>
+
+</table>
+
+<h2>
+<a name = "link2">Value-type definitions.
+</a>
+
+</h2>
+
+<p>Note that a node iterator's value type is actually a tree iterator.</p>
+
+
+<table WIDTH = "100%" BORDER = "1">
+<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 = "value_type3735929645">value_type</a></pre>
+
+
+</td>
+
+<td>
+<pre><a href = "../../pb_assoc/doc/tree_assoc_cntnr.html#const_iterator3735930079">const_iterator</a></pre>
+
+
+</td>
+
+<td>
+<p>Iterator's value type.</p>
+
+
+</td>
+
+</tr>
+
+<tr>
+<td>
+<pre><a name = "pointer3735929328">pointer</a></pre>
+
+
+</td>
+
+<td>
+<pre><a href = "../../pb_assoc/doc/tree_assoc_cntnr.html#const_iterator3735930079">const_iterator</a> *</pre>
+
+
+</td>
+
+<td>
+<p>Iterator's pointer type.</p>
+
+
+</td>
+
+</tr>
+
+<tr>
+<td>
+<pre><a name = "const_pointer3735929974">const_pointer</a></pre>
+
+
+</td>
+
+<td>
+<pre><a href = "../../pb_assoc/doc/tree_assoc_cntnr.html#const_iterator3735930079">const_iterator</a> *</pre>
+
+
+</td>
+
+<td>
+<p>Iterator's const pointer type.</p>
+
+
+</td>
+
+</tr>
+
+<tr>
+<td>
+<pre><a name = "reference3735929502">reference</a></pre>
+
+
+</td>
+
+<td>
+<pre><a href = "../../pb_assoc/doc/tree_assoc_cntnr.html#const_iterator3735930079">const_iterator</a> &amp;</pre>
+
+
+</td>
+
+<td>
+<p>Iterator's reference type.</p>
+
+
+</td>
+
+</tr>
+
+<tr>
+<td>
+<pre><a name = "const_reference3735930148">const_reference</a></pre>
+
+
+</td>
+
+<td>
+<pre><b>const</b> <a href = "../../pb_assoc/doc/tree_assoc_cntnr.html#iterator3735929433">iterator</a> &amp;</pre>
+
+
+</td>
+
+<td>
+<p>Iterator's const reference type.</p>
+
+
+</td>
+
+</tr>
+
+</table>
+
+<h2>
+<a name = "link3">Constructors, destructor, and related.
+</a>
+
+</h2>
+
+<table WIDTH = "100%" BORDER = "1">
+<TR><TD Width = "45%" ALIGN = "left"><b>Method</b></TD><TD Width = "40%" ALIGN = "left"><b>Description</b></TD><TD Width = "10%" ALIGN = "left"><b>Complexity Guarantee</b></TD><TD Width = "5%" ALIGN = "left"><b>Exception Guarantee</b></TD></TR>
+
+
+<tr>
+<td>
+<pre><b>inline</b>
+ const_node_iterator
+ (<b>const</b> node_pointer p_nd = NULL)</pre>
+
+
+</td>
+
+<td>
+<p>Default constructor.</p>
+
+
+</td>
+
+<td>
+<p> <i>O(1)</i> worst.</p>
+
+
+</td>
+
+<td>
+<a href = "exception_guarantees_specifics.html#cannot_throw_guarantee">3</a>
+
+
+</td>
+
+</tr>
+
+</table>
+
+<h2>
+<a name = "link4">Access methods.
+</a>
+
+</h2>
+
+<table WIDTH = "100%" BORDER = "1">
+<TR><TD Width = "45%" ALIGN = "left"><b>Method</b></TD><TD Width = "40%" ALIGN = "left"><b>Description</b></TD><TD Width = "10%" ALIGN = "left"><b>Complexity Guarantee</b></TD><TD Width = "5%" ALIGN = "left"><b>Exception Guarantee</b></TD></TR>
+
+
+<tr>
+<td>
+<pre><b>inline</b> <a href = "../../pb_assoc/doc/tree_assoc_cntnr.html#const_iterator3735930079">const_iterator</a>
+ <b>operator</b>*
+ () <b>const</b></pre>
+
+
+</td>
+
+<td>
+<p>Access.</p>
+
+
+</td>
+
+<td>
+<p> <i>O(1)</i> worst.</p>
+
+
+</td>
+
+<td>
+<a href = "exception_guarantees_specifics.html#cannot_throw_guarantee">3</a>
+
+
+</td>
+
+</tr>
+
+</table>
+
+<h2>
+<a name = "link5">Movement methods.
+</a>
+
+</h2>
+
+<table WIDTH = "100%" BORDER = "1">
+<TR><TD Width = "45%" ALIGN = "left"><b>Method</b></TD><TD Width = "40%" ALIGN = "left"><b>Description</b></TD><TD Width = "10%" ALIGN = "left"><b>Complexity Guarantee</b></TD><TD Width = "5%" ALIGN = "left"><b>Exception Guarantee</b></TD></TR>
+
+
+<tr>
+<td>
+<pre><b>inline</b> const_node_iterator
+ l_child
+ () <b>const</b></pre>
+
+
+</td>
+
+<td>
+<p>Returns the <tt><b>const</b></tt> node <a href = "../../pb_assoc/doc/tree_assoc_cntnr.html#iterator3735929433">iterator</a> associated with the left node.</p>
+
+
+</td>
+
+<td>
+<p> <i>O(1)</i> worst.</p>
+
+
+</td>
+
+<td>
+<a href = "exception_guarantees_specifics.html#cannot_throw_guarantee">3</a>
+
+
+</td>
+
+</tr>
+
+<tr>
+<td>
+<pre><b>inline</b> const_node_iterator
+ r_child
+ () <b>const</b></pre>
+
+
+</td>
+
+<td>
+<p>Returns the <tt><b>const</b></tt> node <a href = "../../pb_assoc/doc/tree_assoc_cntnr.html#iterator3735929433">iterator</a> associated with the right node.</p>
+
+
+</td>
+
+<td>
+<p> <i>O(1)</i> worst.</p>
+
+
+</td>
+
+<td>
+<a href = "exception_guarantees_specifics.html#cannot_throw_guarantee">3</a>
+
+
+</td>
+
+</tr>
+
+</table>
+
+<h2>
+<a name = "link6">Comparison methods.
+</a>
+
+</h2>
+
+<table WIDTH = "100%" BORDER = "1">
+<TR><TD Width = "45%" ALIGN = "left"><b>Method</b></TD><TD Width = "40%" ALIGN = "left"><b>Description</b></TD><TD Width = "10%" ALIGN = "left"><b>Complexity Guarantee</b></TD><TD Width = "5%" ALIGN = "left"><b>Exception Guarantee</b></TD></TR>
+
+
+<tr>
+<td>
+<pre><b>inline</b> <b>bool</b>
+ <b>operator</b>==
+ (<b>const</b> const_node_iterator &amp;r_other) <b>const</b></pre>
+
+
+</td>
+
+<td>
+<p>Compares content to a different <a href = "../../pb_assoc/doc/tree_assoc_cntnr.html#iterator3735929433">iterator</a> object.</p>
+
+
+</td>
+
+<td>
+<p> <i>O(1)</i> worst.</p>
+
+
+</td>
+
+<td>
+<a href = "exception_guarantees_specifics.html#cannot_throw_guarantee">3</a>
+
+
+</td>
+
+</tr>
+
+<tr>
+<td>
+<pre><b>inline</b> <b>bool</b>
+ <b>operator</b>!=
+ (<b>const</b> const_node_iterator &amp;r_other) <b>const</b></pre>
+
+
+</td>
+
+<td>
+<p>Compares content (negatively) to a different <a href = "../../pb_assoc/doc/tree_assoc_cntnr.html#iterator3735929433">iterator</a> object.</p>
+
+
+</td>
+
+<td>
+<p> <i>O(1)</i> worst.</p>
+
+
+</td>
+
+<td>
+<a href = "exception_guarantees_specifics.html#cannot_throw_guarantee">3</a>
+
+
+</td>
+
+</tr>
+
+</table>
+
+
+
+</body>
+
+</html>
+
+
diff --git a/libstdc++-v3/docs/html/ext/pb_assoc/tree_assoc_cntnr_node_iterator.html b/libstdc++-v3/docs/html/ext/pb_assoc/tree_assoc_cntnr_node_iterator.html
new file mode 100644
index 00000000000..651f19b6662
--- /dev/null
+++ b/libstdc++-v3/docs/html/ext/pb_assoc/tree_assoc_cntnr_node_iterator.html
@@ -0,0 +1,250 @@
+
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
+
+
+<html>
+<head>
+<title>tree_assoc_cntnr::node_iterator Interface
+</title>
+
+</head>
+
+<body>
+<h1>
+<tt><font color = "olive">tree_assoc_cntnr</font>::node_iterator
+</tt>
+
+ Interface
+
+
+</h1>
+
+<p>Node iterator.
+</p>
+
+<p>This is an
+</p>
+
+<ol>
+<li>
+<a href = "#link1">Base classes.
+</a>
+
+</li>
+
+<li>
+Public Methods:
+
+
+<ol>
+<li>
+<a href = "#link2">Constructors, destructor, and related.
+</a>
+
+</li>
+
+<li>
+<a href = "#link3">Access methods.
+</a>
+
+</li>
+
+<li>
+<a href = "#link4">Movement methods.
+</a>
+
+</li>
+
+</ol>
+
+</li>
+
+</ol>
+
+
+<h2>
+<a name = "link1">Base classes.
+</a>
+
+</h2>
+
+<table WIDTH = "100%" BORDER = "1">
+<TR><TD Width = "80%" ALIGN = "left"><b>Class</b></TD><TD Width = "20%" ALIGN = "left"><b>Derivation Type</b></TD></TR>
+
+
+<tr>
+<td>
+<pre><a href = "../../pb_assoc/doc/tree_assoc_cntnr.html#const_node_iterator3735929535">const_node_iterator</a></pre>
+
+
+</td>
+
+<td>
+<p>public</p>
+
+
+</td>
+
+</tr>
+
+</table>
+
+<h2>
+<a name = "link2">Constructors, destructor, and related.
+</a>
+
+</h2>
+
+<table WIDTH = "100%" BORDER = "1">
+<TR><TD Width = "45%" ALIGN = "left"><b>Method</b></TD><TD Width = "40%" ALIGN = "left"><b>Description</b></TD><TD Width = "10%" ALIGN = "left"><b>Complexity Guarantee</b></TD><TD Width = "5%" ALIGN = "left"><b>Exception Guarantee</b></TD></TR>
+
+
+<tr>
+<td>
+<pre><b>inline</b>
+ node_iterator
+ (<b>const</b> node_pointer p_nd = NULL)</pre>
+
+
+</td>
+
+<td>
+<p>Default constructor.</p>
+
+
+</td>
+
+<td>
+<p> <i>O(1)</i> worst.</p>
+
+
+</td>
+
+<td>
+<a href = "exception_guarantees_specifics.html#cannot_throw_guarantee">3</a>
+
+
+</td>
+
+</tr>
+
+</table>
+
+<h2>
+<a name = "link3">Access methods.
+</a>
+
+</h2>
+
+<table WIDTH = "100%" BORDER = "1">
+<TR><TD Width = "45%" ALIGN = "left"><b>Method</b></TD><TD Width = "40%" ALIGN = "left"><b>Description</b></TD><TD Width = "10%" ALIGN = "left"><b>Complexity Guarantee</b></TD><TD Width = "5%" ALIGN = "left"><b>Exception Guarantee</b></TD></TR>
+
+
+<tr>
+<td>
+<pre><b>inline</b> <a href = "../../pb_assoc/doc/tree_assoc_cntnr.html#iterator3735929433">iterator</a>
+ <b>operator</b>*
+ () <b>const</b></pre>
+
+
+</td>
+
+<td>
+<p>Access.</p>
+
+
+</td>
+
+<td>
+<p> <i>O(1)</i> worst.</p>
+
+
+</td>
+
+<td>
+<a href = "exception_guarantees_specifics.html#cannot_throw_guarantee">3</a>
+
+
+</td>
+
+</tr>
+
+</table>
+
+<h2>
+<a name = "link4">Movement methods.
+</a>
+
+</h2>
+
+<table WIDTH = "100%" BORDER = "1">
+<TR><TD Width = "45%" ALIGN = "left"><b>Method</b></TD><TD Width = "40%" ALIGN = "left"><b>Description</b></TD><TD Width = "10%" ALIGN = "left"><b>Complexity Guarantee</b></TD><TD Width = "5%" ALIGN = "left"><b>Exception Guarantee</b></TD></TR>
+
+
+<tr>
+<td>
+<pre><b>inline</b> node_iterator
+ l_child
+ ()</pre>
+
+
+</td>
+
+<td>
+<p>Returns the node <a href = "../../pb_assoc/doc/tree_assoc_cntnr.html#iterator3735929433">iterator</a> associated with the left node.</p>
+
+
+</td>
+
+<td>
+<p> <i>O(1)</i> worst.</p>
+
+
+</td>
+
+<td>
+<a href = "exception_guarantees_specifics.html#cannot_throw_guarantee">3</a>
+
+
+</td>
+
+</tr>
+
+<tr>
+<td>
+<pre><b>inline</b> node_iterator
+ r_child
+ ()</pre>
+
+
+</td>
+
+<td>
+<p>Returns the node <a href = "../../pb_assoc/doc/tree_assoc_cntnr.html#iterator3735929433">iterator</a> associated with the right node.</p>
+
+
+</td>
+
+<td>
+<p> <i>O(1)</i> worst.</p>
+
+
+</td>
+
+<td>
+<a href = "exception_guarantees_specifics.html#cannot_throw_guarantee">3</a>
+
+
+</td>
+
+</tr>
+
+</table>
+
+
+
+</body>
+
+</html>
+
+
diff --git a/libstdc++-v3/docs/html/ext/pb_assoc/tree_based_containers.html b/libstdc++-v3/docs/html/ext/pb_assoc/tree_based_containers.html
new file mode 100644
index 00000000000..08ee428ecf1
--- /dev/null
+++ b/libstdc++-v3/docs/html/ext/pb_assoc/tree_based_containers.html
@@ -0,0 +1,246 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
+<html>
+ <head>
+ <title>Tree-Based Containers</title>
+ <meta name="GENERATOR" content="Microsoft Visual Studio .NET 7.1">
+ <meta name="vs_targetSchema" content="http://schemas.microsoft.com/intellisense/ie5">
+ </head>
+<body bgcolor = "white">
+<h1>Tree-Based Containers</h1>
+
+<p>
+ This section describes tree-based containers. It is organized as follows.
+</p>
+
+<ol>
+ <li> <a href = "#overview">Overview</a> describes an overview.</li>
+ <li> <a href = "#invariants">Node Invariants</a> describes node invariants.</li>
+ <li> <a href = "#add_methods">Additional Types and Methods</a> describes additional methods
+that tree-based containers support.</li>
+</ol>
+
+<h2><a name = "overview">Overview</a></h2>
+
+<p>
+ Figure
+<a href = "#tree_cd">Tree-based containers</a>
+ shows the container-hierarchy; the tree-based container is circled.
+</p>
+
+<h6 align = "center">
+<a name = "tree_cd">
+<img src = "tree_cd.jpg" width = "70%" alt = "no image">
+</h6>
+<h6 align = "center">
+</a>
+Tree-based containers.
+</h6>
+
+
+<p>
+ The tree-based container has the following declaration:
+</p>
+<pre>
+<b>template</b>&lt;
+ <b>typename</b> Key,
+ <b>typename</b> Data,
+ <b>class</b> Cmp_Fn = std::less&lt;Key&gt;,
+ <b>class</b> DS_Tag = <a href = "rb_tree_ds_tag.html">rb_tree_ds_tag</a>,
+ <b>class</b> Node_Updator = <a href = "null_node_updator.html">null_node_updator</a>,
+ <b>class</b> Allocator =
+ std::allocator&lt;<b>char</b>&gt; &gt;
+<b>class</b> <a href = "tree_assoc_cntnr.html">tree_assoc_cntnr</a>;
+</pre>
+
+
+<p>
+ The parameters have the following meaning:
+</p>
+<ol>
+ <li> <tt>Key</tt> is the key type.
+ </li>
+ <li> <tt>Data</tt> is the data-policy, and is explained in
+<a href = "ms_gen.html#ds_policy">Mapping-Semantics Genericity::Data Types as a Policy</a>.
+ </li>
+ <li> <tt>Cmp_Fn</tt> is a key comparison functor</li>
+ <li> <tt>DS_Tag</tt> specifies which underlying data-structure to use, and is described shortly.
+ <li> <tt>Node_Updator</tt> is a policy for updating node invariants.
+This is described in <a href = "#invariants">Node Invariants</a>.
+ </li>
+ <li> <tt>Allocator</tt> is (surprisingly) an allocator type.
+ </li>
+</ol>
+
+<p>
+ The <tt>DS_Tag</tt> specifies which underlying data-structure to use.
+Instantiating it by
+<a href = "rb_tree_ds_tag.html">rb_tree_ds_tag</a>,
+<a href = "splay_tree_ds_tag.html">splay_tree_ds_tag</a>,
+or
+<a href = "ov_tree_ds_tag.html">ov_tree_ds_tag</a>,
+specifies an undelying
+red-black tree,
+splay tree,
+or
+ordered-vector tree.
+ any other tag is illegal. Note that containers based on the former two contain more types and methods than the latter (<i>e.g.</i>, <tt>reverse_iterator</tt> and <tt>rbegin</tt>), and different exception and invalidation guarantees.
+</p>
+
+
+
+
+<h2><a name = "invariants">Node Invariants</a></h2>
+
+<p>
+ Figure
+<a href = "#node_invariants">Some node invariants</a>
+shows some node invariants. A shows
+a tree whose each node contains, asides from an <tt>double</tt> key, the number
+of nodes at the subtree rooted at the node; B shows a tree whose each node
+contains, asides from a line-interval key, the maximal endpoint of the interval
+of any node in the subtree rooted at the node.
+ The first tree allows querying efficiently what is the order statistic
+of any element; the second tree allows querying efficiently if any, or which,
+intervals overlap a given interval.
+</p>
+
+<h6 align = "center">
+<a name = "node_invariants">
+<img src = "node_invariants.jpg" width = "50%" alt = "no image">
+</a>
+</h6>
+<h6 align = "center">
+Some node invariants.
+</h6>
+
+
+<p>
+ Maintaining such trees is difficult, for two reasons:
+</p>
+<ol>
+ <li> Various operations can invalidate node invariants.
+<i>E.g.</i>, Figure
+<a href = "#node_invariant_invalidations">Invalidation of node invariants</a>
+shows how a right rotation, performed on A, results in B, with nodes <i>x</i>
+and <i>y</i> having corrupted invariants (the greyed nodes in C);
+Figure
+<a href = "#node_invariant_invalidations">Invalidation of node invariants</a>
+shows how an insert, performed on D, results in E, with nodes <i>x</i>
+and <i>y</i> having corrupted invariants (the greyed nodes in F).
+ It is not feasible to know outside the tree the effect of an operation on the
+nodes of the tree.
+ </li>
+ <li>
+ Even if node invariants are maintained, it is not possible to know
+in advance which search paths are required (<i>e.g.</i>, searching for all
+line intervals overlapping some interval might require several search paths).
+ </li>
+</ol>
+
+
+<h6 align = "center">
+<a name = "node_invariant_invalidations">
+<img src = "node_invariant_invalidations.jpg" width = "80%" alt = "no image">
+</a>
+</h6>
+<h6 align = "center">
+Invalidation of node invariants.
+</h6>
+
+<p>
+ These problems are solved by a combination of two means:
+</p>
+
+<ol>
+ <li>
+ The tree-based containers are parameterized by a <tt>Node_Updator</tt>
+parameter. When a tree operation might invalidate some node invariant,
+a <tt>Node_Updator</tt> object is invoked to restore the invariant. This object is
+always invoked with three nodes: some node, say <i>x</i> in
+Figure
+<a href = "#restoring_node_invariants">Invalidation of node invariants</a>-A
+has an invalid invariant, but its children, <i>y</i> and <i>z</i> hav valid invariants.
+After the invocation, all three nodes have valid invariants, as
+in
+Figure
+<a href = "#restoring_node_invariants">Invalidation of node invariants</a>-B.
+It is well known that any <tt>insert</tt>, <tt>erase</tt>,
+<tt>split</tt> or <tt>join</tt>, can restore
+all node invariants by a small number of node invariant updates
+[<a href = "references.html#clrs2001">clrs2001</a>].
+For example, Figure
+<a href = "#update_seq_diagram">
+Insert update sequence diagram
+</a>
+shows an <tt>insert</tt> operation (point A); the tree performs some operations, and
+calls the update functor three times (points B, C, and D).
+ </li>
+ <li>
+ The tree based containers all define internally <tt>node_iterator</tt>
+ and <tt>const_node_iterator</tt>, iterators which can be used to traverse
+ from a node to any of its children or parent.
+ </li>
+</ol>
+
+<h6 align = "center">
+<a name = "restoring_node_invariants">
+<img src = "restoring_node_invariants.jpg" width = "80%" alt = "no image">
+</a>
+</h6>
+<h6 align = "center">
+Invalidation of node invariants.
+</h6>
+
+<h6 align = "center">
+<a name = "update_seq_diagram">
+<img src = "update_seq_diagram.jpg" width = "50%" alt = "no image">
+</a>
+</h6>
+<h6 align = "center">
+Insert update sequence diagram.
+</h6>
+
+
+<p>
+ In
+<a href = "concepts.html#concepts_null_policies">Null Policy Classes</a>
+a distinction was made between <i>redundant policies</i>
+and <i>null policies</i>.
+</p>
+
+<p>
+ Seemingly, in this case a redundant policy - a policy which doesn't
+affect nodes' contents would suffice in this case. This, however, would
+lead to performance loss.
+Figure
+<a href = "#rationale_null_node_updator">
+Rationale for null node-invariant functors
+</a>
+shows a typical case where invariants are restored (in this case, to the
+shaded node). In most cases, tree operations such as rotations affect only
+the lower levels of the tree. A null policy allows to know that there
+is no need to traverse the tree to the root.
+</p>
+
+<h6 align = "center">
+<a name = "rationale_null_node_updator">
+<img src = "rationale_null_node_updator.jpg" width = "50%" alt = "no image">
+</a>
+</h6>
+<h6 align = "center">
+Rationale for null node-invariant functors.
+</h6>
+
+
+
+<h2><a name = "add_methods">Addtional Methods</a></h2>
+
+
+
+
+
+
+
+</body>
+
+</html>
diff --git a/libstdc++-v3/docs/html/ext/pb_assoc/tree_cd.jpg b/libstdc++-v3/docs/html/ext/pb_assoc/tree_cd.jpg
new file mode 100644
index 00000000000..95afe317c5d
--- /dev/null
+++ b/libstdc++-v3/docs/html/ext/pb_assoc/tree_cd.jpg
Binary files differ
diff --git a/libstdc++-v3/docs/html/ext/pb_assoc/trigger_policies_general.html b/libstdc++-v3/docs/html/ext/pb_assoc/trigger_policies_general.html
new file mode 100644
index 00000000000..5535bb9781d
--- /dev/null
+++ b/libstdc++-v3/docs/html/ext/pb_assoc/trigger_policies_general.html
@@ -0,0 +1,23 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
+<html>
+<head>
+ <title>Trigger Policies</title>
+ <meta name="GENERATOR" content="Microsoft Visual Studio .NET 7.1">
+ <meta name="vs_targetSchema" content="http://schemas.microsoft.com/intellisense/ie5">
+</head>
+
+<body>
+
+<h1>Trigger Policies</h1>
+
+<p>
+ A trigger policy, say <tt>trig_pol</tt>, should support
+ the types and methods below.
+</p>
+<ol>
+ <li> <a href="trigger_policy_types.html">Types</a></li>
+ <li> <a href="trigger_policy_methods.html">Methods</a></li>
+</ol>
+
+</body>
+</html>
diff --git a/libstdc++-v3/docs/html/ext/pb_assoc/tutorial.html b/libstdc++-v3/docs/html/ext/pb_assoc/tutorial.html
new file mode 100644
index 00000000000..b5dd0f51265
--- /dev/null
+++ b/libstdc++-v3/docs/html/ext/pb_assoc/tutorial.html
@@ -0,0 +1,66 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
+<HTML>
+<HEAD>
+<TITLE>Short Tutorial</TITLE>
+<META NAME="Generator" content="Microsoft Visual Studio .NET 7.1">
+<base target = "content">
+</HEAD>
+<BODY>
+<H1>Short Tutorial</H1>
+
+<p>
+ Following is a short tutorial introducing the main points of <tt>pb_assoc</tt>. It
+is organized as follows.</p>
+<ol>
+ <li><a href = "#general_use">Basic Use of Maps</a></li>
+</ol>
+
+
+
+
+
+
+
+<h2><a name = "general_use">Basic Use of Maps</a></h2>
+
+<p>
+ For the greater part, using <tt>pb_assoc</tt>'s maps is similar
+to using those of the STL. For example, the following shows a collision-chaining container mapping integers to characters.
+
+<pre>
+<a href = "cc_hash_assoc_cntnr.html">cc_hash_assoc_cntnr</a>&lt;<b>int</b>, <b>char</b>&gt; c;
+
+c[2] = 'b';
+
+assert(c.find(1) == c.end());
+</pre>
+
+<p>
+ <a href="interface.html#containers">Inteface::Containers</a> describes the containers supported. <a href = "../example/basic_map_example.cpp"><tt>basic_map_example.cpp</tt></a>
+shows an example.
+</p>
+
+
+<h2><a name = "ms">Other Mapping Semantics</a></h2>
+
+<p>
+ <tt>pb_assoc</tt> does not contain separate containers for different mapping semantics,
+as the STL does (<i>e.g.</i>, <tt>std::map</tt> and <tt>std::multimap</tt>). Rather, containers are parameterized by a <tt>Data</tt> parameter, and this parameter is a policy for the mapping semantics.
+</p>
+
+<p>
+ Instantiating the <tt>Data</tt> parameter by
+<a href = "null_data_type.html"><tt>null_data_type</tt></a>
+makes a &quot;set&quot;. For example, the following shows a collision-chaining container storing integers.
+
+<pre>
+<a href = "cc_hash_assoc_cntnr.html">cc_hash_assoc_cntnr</a>&lt;<b>int</b>, <a href = "null_data_type.html">null_data_type</a>&gt; c;
+
+c.insert(2);
+
+assert(c.find(1) == c.end());
+</pre>
+</p>
+
+</BODY>
+</HTML>
diff --git a/libstdc++-v3/docs/html/ext/pb_assoc/update_seq_diagram.jpg b/libstdc++-v3/docs/html/ext/pb_assoc/update_seq_diagram.jpg
new file mode 100644
index 00000000000..d3221cbb98b
--- /dev/null
+++ b/libstdc++-v3/docs/html/ext/pb_assoc/update_seq_diagram.jpg
Binary files differ
diff --git a/libstdc++-v3/include/Makefile.am b/libstdc++-v3/include/Makefile.am
index 2144611c0c1..38b97433739 100644
--- a/libstdc++-v3/include/Makefile.am
+++ b/libstdc++-v3/include/Makefile.am
@@ -196,8 +196,241 @@ backward_headers = \
${backward_srcdir}/strstream \
${backward_srcdir}/backward_warning.h
+
+assoc_srcdir = ${glibcxx_srcdir}/include/ext/pb_assoc
+assoc_builddir = ./ext/pb_assoc
+
+assoc_subdirs = \
+ ${assoc_builddir}/detail \
+ ${assoc_builddir}/detail/tree_assoc_cntnr \
+ ${assoc_builddir}/detail/basic_assoc_cntnr \
+ ${assoc_builddir}/detail/splay_tree_ \
+ ${assoc_builddir}/detail/typelist \
+ ${assoc_builddir}/detail/basic_hash_assoc_cntnr \
+ ${assoc_builddir}/detail/cc_ht_map_ \
+ ${assoc_builddir}/detail/gp_ht_map_ \
+ ${assoc_builddir}/detail/tree_policy \
+ ${assoc_builddir}/detail/resize_policy \
+ ${assoc_builddir}/detail/bin_search_tree_ \
+ ${assoc_builddir}/detail/basic_tree_assoc_cntnr \
+ ${assoc_builddir}/detail/cc_hash_assoc_cntnr \
+ ${assoc_builddir}/detail/value_type_adapter \
+ ${assoc_builddir}/detail/lu_policy \
+ ${assoc_builddir}/detail/gp_hash_assoc_cntnr \
+ ${assoc_builddir}/detail/unordered_iterator \
+ ${assoc_builddir}/detail/ov_tree_map_ \
+ ${assoc_builddir}/detail/lu_assoc_cntnr \
+ ${assoc_builddir}/detail/hash_fn \
+ ${assoc_builddir}/detail/eq_fn \
+ ${assoc_builddir}/detail/rb_tree_map_ \
+ ${assoc_builddir}/detail/lu_map_
+
+assoc_headers = \
+ ${assoc_srcdir}/detail/tree_assoc_cntnr/constructor_destructor_fn_imps.hpp \
+ ${assoc_srcdir}/detail/type_utils.hpp \
+ ${assoc_srcdir}/detail/order_statistics_imp.hpp \
+ ${assoc_srcdir}/detail/basic_assoc_cntnr/d_find_fn_imps.hpp \
+ ${assoc_srcdir}/detail/basic_assoc_cntnr/d_insert_fn_imps.hpp \
+ ${assoc_srcdir}/detail/basic_assoc_cntnr/extract_key.hpp \
+ ${assoc_srcdir}/detail/basic_assoc_cntnr/erase_fn_imps.hpp \
+ ${assoc_srcdir}/detail/basic_assoc_cntnr/insert_fn_imps.hpp \
+ ${assoc_srcdir}/detail/basic_assoc_cntnr/constructor_destructor_fn_imps.hpp \
+ ${assoc_srcdir}/detail/basic_assoc_cntnr/info_fn_imps.hpp \
+ ${assoc_srcdir}/detail/basic_assoc_cntnr/iterators_fn_imps.hpp \
+ ${assoc_srcdir}/detail/basic_assoc_cntnr/d_extract_key.hpp \
+ ${assoc_srcdir}/detail/basic_assoc_cntnr/constructors_destructor_fn_imps.hpp \
+ ${assoc_srcdir}/detail/splay_tree_/erase_fn_imps.hpp \
+ ${assoc_srcdir}/detail/splay_tree_/splay_tree_.hpp \
+ ${assoc_srcdir}/detail/splay_tree_/node.hpp \
+ ${assoc_srcdir}/detail/splay_tree_/insert_fn_imps.hpp \
+ ${assoc_srcdir}/detail/splay_tree_/find_fn_imps.hpp \
+ ${assoc_srcdir}/detail/splay_tree_/splay_fn_imps.hpp \
+ ${assoc_srcdir}/detail/splay_tree_/split_join_fn_imps.hpp \
+ ${assoc_srcdir}/detail/splay_tree_/info_fn_imps.hpp \
+ ${assoc_srcdir}/detail/splay_tree_/debug_fn_imps.hpp \
+ ${assoc_srcdir}/detail/splay_tree_/constructors_destructor_fn_imps.hpp \
+ ${assoc_srcdir}/detail/typelist/typelist_transform.hpp \
+ ${assoc_srcdir}/detail/typelist/typelist_apply.hpp \
+ ${assoc_srcdir}/detail/typelist/typelist_filter.hpp \
+ ${assoc_srcdir}/detail/typelist/typelist_at_index.hpp \
+ ${assoc_srcdir}/detail/typelist/typelist_contains.hpp \
+ ${assoc_srcdir}/detail/typelist/typelist_append.hpp \
+ ${assoc_srcdir}/detail/typelist/typelist_typelist_append.hpp \
+ ${assoc_srcdir}/detail/ds_trait_imp.hpp \
+ ${assoc_srcdir}/detail/basic_hash_assoc_cntnr/resize_fn_imps.hpp \
+ ${assoc_srcdir}/detail/basic_hash_assoc_cntnr/constructor_destructor_fn_imps.hpp \
+ ${assoc_srcdir}/detail/basic_hash_assoc_cntnr/constructors_destructor_fn_imps.hpp \
+ ${assoc_srcdir}/detail/cc_ht_map_/resize_store_hash_fn_imps.hpp \
+ ${assoc_srcdir}/detail/cc_ht_map_/find_store_hash_fn_imps.hpp \
+ ${assoc_srcdir}/detail/cc_ht_map_/erase_no_store_hash_fn_imps.hpp \
+ ${assoc_srcdir}/detail/cc_ht_map_/resize_fn_imps.hpp \
+ ${assoc_srcdir}/detail/cc_ht_map_/debug_store_hash_fn_imps.hpp \
+ ${assoc_srcdir}/detail/cc_ht_map_/erase_fn_imps.hpp \
+ ${assoc_srcdir}/detail/cc_ht_map_/policy_access_fn_imps.hpp \
+ ${assoc_srcdir}/detail/cc_ht_map_/cmp_fn_imps.hpp \
+ ${assoc_srcdir}/detail/cc_ht_map_/insert_no_store_hash_fn_imps.hpp \
+ ${assoc_srcdir}/detail/cc_ht_map_/insert_fn_imps.hpp \
+ ${assoc_srcdir}/detail/cc_ht_map_/find_fn_imps.hpp \
+ ${assoc_srcdir}/detail/cc_ht_map_/find_no_store_hash_fn_imps.hpp \
+ ${assoc_srcdir}/detail/cc_ht_map_/cond_key_dtor_entry_dealtor.hpp \
+ ${assoc_srcdir}/detail/cc_ht_map_/constructor_destructor_fn_imps.hpp \
+ ${assoc_srcdir}/detail/cc_ht_map_/entry_list_fn_imps.hpp \
+ ${assoc_srcdir}/detail/cc_ht_map_/constructor_destructor_store_hash_fn_imps.hpp \
+ ${assoc_srcdir}/detail/cc_ht_map_/erase_store_hash_fn_imps.hpp \
+ ${assoc_srcdir}/detail/cc_ht_map_/cc_ht_map_.hpp \
+ ${assoc_srcdir}/detail/cc_ht_map_/constructor_destructor_no_store_hash_fn_imps.hpp \
+ ${assoc_srcdir}/detail/cc_ht_map_/standard_policies.hpp \
+ ${assoc_srcdir}/detail/cc_ht_map_/info_fn_imps.hpp \
+ ${assoc_srcdir}/detail/cc_ht_map_/iterators_fn_imps.hpp \
+ ${assoc_srcdir}/detail/cc_ht_map_/insert_store_hash_fn_imps.hpp \
+ ${assoc_srcdir}/detail/cc_ht_map_/debug_fn_imps.hpp \
+ ${assoc_srcdir}/detail/cc_ht_map_/size_fn_imps.hpp \
+ ${assoc_srcdir}/detail/cc_ht_map_/debug_no_store_hash_fn_imps.hpp \
+ ${assoc_srcdir}/detail/cc_ht_map_/resize_no_store_hash_fn_imps.hpp \
+ ${assoc_srcdir}/detail/gp_ht_map_/resize_store_hash_fn_imps.hpp \
+ ${assoc_srcdir}/detail/gp_ht_map_/find_store_hash_fn_imps.hpp \
+ ${assoc_srcdir}/detail/gp_ht_map_/erase_no_store_hash_fn_imps.hpp \
+ ${assoc_srcdir}/detail/gp_ht_map_/resize_fn_imps.hpp \
+ ${assoc_srcdir}/detail/gp_ht_map_/debug_store_hash_fn_imps.hpp \
+ ${assoc_srcdir}/detail/gp_ht_map_/erase_fn_imps.hpp \
+ ${assoc_srcdir}/detail/gp_ht_map_/policy_access_fn_imps.hpp \
+ ${assoc_srcdir}/detail/gp_ht_map_/insert_no_store_hash_fn_imps.hpp \
+ ${assoc_srcdir}/detail/gp_ht_map_/insert_fn_imps.hpp \
+ ${assoc_srcdir}/detail/gp_ht_map_/find_fn_imps.hpp \
+ ${assoc_srcdir}/detail/gp_ht_map_/find_no_store_hash_fn_imps.hpp \
+ ${assoc_srcdir}/detail/gp_ht_map_/constructor_destructor_fn_imps.hpp \
+ ${assoc_srcdir}/detail/gp_ht_map_/constructor_destructor_store_hash_fn_imps.hpp \
+ ${assoc_srcdir}/detail/gp_ht_map_/erase_store_hash_fn_imps.hpp \
+ ${assoc_srcdir}/detail/gp_ht_map_/constructor_destructor_no_store_hash_fn_imps.hpp \
+ ${assoc_srcdir}/detail/gp_ht_map_/info_fn_imps.hpp \
+ ${assoc_srcdir}/detail/gp_ht_map_/insert_store_hash_fn_imps.hpp \
+ ${assoc_srcdir}/detail/gp_ht_map_/debug_fn_imps.hpp \
+ ${assoc_srcdir}/detail/gp_ht_map_/gp_ht_map_.hpp \
+ ${assoc_srcdir}/detail/gp_ht_map_/iterator_fn_imps.hpp \
+ ${assoc_srcdir}/detail/gp_ht_map_/debug_no_store_hash_fn_imps.hpp \
+ ${assoc_srcdir}/detail/gp_ht_map_/resize_no_store_hash_fn_imps.hpp \
+ ${assoc_srcdir}/detail/tree_policy/order_statistics_imp.hpp \
+ ${assoc_srcdir}/detail/tree_policy/null_node_updator_imp.hpp \
+ ${assoc_srcdir}/detail/types_traits.hpp \
+ ${assoc_srcdir}/detail/mapping_level_imp.hpp \
+ ${assoc_srcdir}/detail/map_debug_base.hpp \
+ ${assoc_srcdir}/detail/resize_policy/ht_prime_size_policy_imp.hpp \
+ ${assoc_srcdir}/detail/resize_policy/hash_load_check_resize_trigger_imp.hpp \
+ ${assoc_srcdir}/detail/resize_policy/hash_prime_size_policy_imp.hpp \
+ ${assoc_srcdir}/detail/resize_policy/size_base.hpp \
+ ${assoc_srcdir}/detail/resize_policy/cc_hash_max_collision_resize_trigger_imp.hpp \
+ ${assoc_srcdir}/detail/resize_policy/hash_exponential_size_policy_imp.hpp \
+ ${assoc_srcdir}/detail/resize_policy/hash_standard_resize_policy_imp.hpp \
+ ${assoc_srcdir}/detail/bin_search_tree_/cond_dtor_entry_dealtor.hpp \
+ ${assoc_srcdir}/detail/bin_search_tree_/find_iterators.hpp \
+ ${assoc_srcdir}/detail/bin_search_tree_/erase_fn_imps.hpp \
+ ${assoc_srcdir}/detail/bin_search_tree_/insert_fn_imps.hpp \
+ ${assoc_srcdir}/detail/bin_search_tree_/find_fn_imps.hpp \
+ ${assoc_srcdir}/detail/bin_search_tree_/cond_key_dtor_entry_dealtor.hpp \
+ ${assoc_srcdir}/detail/bin_search_tree_/node_iterators.hpp \
+ ${assoc_srcdir}/detail/bin_search_tree_/bin_search_tree_.hpp \
+ ${assoc_srcdir}/detail/bin_search_tree_/split_join_fn_imps.hpp \
+ ${assoc_srcdir}/detail/bin_search_tree_/rotate_fn_imps.hpp \
+ ${assoc_srcdir}/detail/bin_search_tree_/info_fn_imps.hpp \
+ ${assoc_srcdir}/detail/bin_search_tree_/iterators_fn_imps.hpp \
+ ${assoc_srcdir}/detail/bin_search_tree_/r_erase_fn_imps.hpp \
+ ${assoc_srcdir}/detail/bin_search_tree_/debug_fn_imps.hpp \
+ ${assoc_srcdir}/detail/bin_search_tree_/constructors_destructor_fn_imps.hpp \
+ ${assoc_srcdir}/detail/basic_tree_assoc_cntnr/r_range_iteration_fn_imps.hpp \
+ ${assoc_srcdir}/detail/basic_tree_assoc_cntnr/erase_fn_imps.hpp \
+ ${assoc_srcdir}/detail/basic_tree_assoc_cntnr/policy_access_fn_imps.hpp \
+ ${assoc_srcdir}/detail/basic_tree_assoc_cntnr/constructor_destructor_fn_imps.hpp \
+ ${assoc_srcdir}/detail/basic_tree_assoc_cntnr/split_join_fn_imps.hpp \
+ ${assoc_srcdir}/detail/basic_tree_assoc_cntnr/r_erase_fn_imps.hpp \
+ ${assoc_srcdir}/detail/basic_tree_assoc_cntnr/range_iteration_fn_imps.hpp \
+ ${assoc_srcdir}/detail/basic_tree_assoc_cntnr/constructors_destructor_fn_imps.hpp \
+ ${assoc_srcdir}/detail/basic_tree_assoc_cntnr/node_iteration_fn_imps.hpp \
+ ${assoc_srcdir}/detail/cc_hash_assoc_cntnr/constructor_destructor_fn_imps.hpp \
+ ${assoc_srcdir}/detail/assoc_cntnr_base.hpp \
+ ${assoc_srcdir}/detail/ms_category_imp.hpp \
+ ${assoc_srcdir}/detail/hash_types_traits.hpp \
+ ${assoc_srcdir}/detail/typelist.hpp \
+ ${assoc_srcdir}/detail/value_type_adapter/invalidation_guarantee_selector.hpp \
+ ${assoc_srcdir}/detail/value_type_adapter/erase_fn_imps.hpp \
+ ${assoc_srcdir}/detail/value_type_adapter/iterator.hpp \
+ ${assoc_srcdir}/detail/value_type_adapter/constructor_destructor_and_related.hpp \
+ ${assoc_srcdir}/detail/value_type_adapter/value_type_traits.hpp \
+ ${assoc_srcdir}/detail/value_type_adapter/insert_fn_imps.hpp \
+ ${assoc_srcdir}/detail/value_type_adapter/find_fn_imps.hpp \
+ ${assoc_srcdir}/detail/value_type_adapter/ref_pair.hpp \
+ ${assoc_srcdir}/detail/value_type_adapter/it_value_type_traits.hpp \
+ ${assoc_srcdir}/detail/value_type_adapter/info_fn_imps.hpp \
+ ${assoc_srcdir}/detail/value_type_adapter/erase_if_pred.hpp \
+ ${assoc_srcdir}/detail/value_type_adapter/value_type_adapter.hpp \
+ ${assoc_srcdir}/detail/value_type_adapter/iterator_fn_imps.hpp \
+ ${assoc_srcdir}/detail/lu_policy/mtf_lu_policy_imp.hpp \
+ ${assoc_srcdir}/detail/lu_policy/counter_lu_policy_imp.hpp \
+ ${assoc_srcdir}/detail/lu_policy/counter_lu_metadata_imp.hpp \
+ ${assoc_srcdir}/detail/gp_hash_assoc_cntnr/constructor_destructor_fn_imps.hpp \
+ ${assoc_srcdir}/detail/unordered_iterator/find_iterator.hpp \
+ ${assoc_srcdir}/detail/unordered_iterator/iterator.hpp \
+ ${assoc_srcdir}/detail/unordered_iterator/const_iterator.hpp \
+ ${assoc_srcdir}/detail/unordered_iterator/const_find_iterator.hpp \
+ ${assoc_srcdir}/detail/standard_policies.hpp \
+ ${assoc_srcdir}/detail/standard_sizes.hpp \
+ ${assoc_srcdir}/detail/ov_tree_map_/erase_fn_imps.hpp \
+ ${assoc_srcdir}/detail/ov_tree_map_/insert_fn_imps.hpp \
+ ${assoc_srcdir}/detail/ov_tree_map_/find_fn_imps.hpp \
+ ${assoc_srcdir}/detail/ov_tree_map_/ov_tree_map_.hpp \
+ ${assoc_srcdir}/detail/ov_tree_map_/node_iterators.hpp \
+ ${assoc_srcdir}/detail/ov_tree_map_/split_join_fn_imps.hpp \
+ ${assoc_srcdir}/detail/ov_tree_map_/cond_dtor.hpp \
+ ${assoc_srcdir}/detail/ov_tree_map_/info_fn_imps.hpp \
+ ${assoc_srcdir}/detail/ov_tree_map_/iterators_fn_imps.hpp \
+ ${assoc_srcdir}/detail/ov_tree_map_/debug_fn_imps.hpp \
+ ${assoc_srcdir}/detail/ov_tree_map_/constructors_destructor_fn_imps.hpp \
+ ${assoc_srcdir}/detail/lu_assoc_cntnr/policy_access_fn_imps.hpp \
+ ${assoc_srcdir}/detail/lu_assoc_cntnr/constructor_destructor_fn_imps.hpp \
+ ${assoc_srcdir}/detail/hash_fn/linear_probe_fn_imp.hpp \
+ ${assoc_srcdir}/detail/hash_fn/mod_based_range_hashing.hpp \
+ ${assoc_srcdir}/detail/hash_fn/direct_mod_range_hashing_imp.hpp \
+ ${assoc_srcdir}/detail/hash_fn/probe_fn_base.hpp \
+ ${assoc_srcdir}/detail/hash_fn/ranged_probe_fn.hpp \
+ ${assoc_srcdir}/detail/hash_fn/quadratic_probe_fn_imp.hpp \
+ ${assoc_srcdir}/detail/hash_fn/direct_mask_range_hashing_imp.hpp \
+ ${assoc_srcdir}/detail/hash_fn/ranged_hash_fn.hpp \
+ ${assoc_srcdir}/detail/hash_fn/mask_based_range_hashing.hpp \
+ ${assoc_srcdir}/detail/eq_fn/eq_by_less.hpp \
+ ${assoc_srcdir}/detail/eq_fn/hash_eq_fn.hpp \
+ ${assoc_srcdir}/detail/rb_tree_map_/erase_fn_imps.hpp \
+ ${assoc_srcdir}/detail/rb_tree_map_/node.hpp \
+ ${assoc_srcdir}/detail/rb_tree_map_/insert_fn_imps.hpp \
+ ${assoc_srcdir}/detail/rb_tree_map_/find_fn_imps.hpp \
+ ${assoc_srcdir}/detail/rb_tree_map_/split_join_fn_imps.hpp \
+ ${assoc_srcdir}/detail/rb_tree_map_/rb_tree_.hpp \
+ ${assoc_srcdir}/detail/rb_tree_map_/info_fn_imps.hpp \
+ ${assoc_srcdir}/detail/rb_tree_map_/debug_fn_imps.hpp \
+ ${assoc_srcdir}/detail/rb_tree_map_/constructors_destructor_fn_imps.hpp \
+ ${assoc_srcdir}/detail/lu_map_/lu_map_.hpp \
+ ${assoc_srcdir}/detail/lu_map_/erase_fn_imps.hpp \
+ ${assoc_srcdir}/detail/lu_map_/policy_access_fn_imps.hpp \
+ ${assoc_srcdir}/detail/lu_map_/insert_fn_imps.hpp \
+ ${assoc_srcdir}/detail/lu_map_/find_fn_imps.hpp \
+ ${assoc_srcdir}/detail/lu_map_/constructor_destructor_fn_imps.hpp \
+ ${assoc_srcdir}/detail/lu_map_/info_fn_imps.hpp \
+ ${assoc_srcdir}/detail/lu_map_/iterators_fn_imps.hpp \
+ ${assoc_srcdir}/detail/lu_map_/debug_fn_imps.hpp \
+ ${assoc_srcdir}/detail/constructors_destructor_fn_imps.hpp \
+ ${assoc_srcdir}/detail/ms_trait_imp.hpp \
+ ${assoc_srcdir}/detail/cond_dealtor.hpp \
+ ${assoc_srcdir}/hash_policy.hpp \
+ ${assoc_srcdir}/trivial_iterator_def.hpp \
+ ${assoc_srcdir}/ds_trait.hpp \
+ ${assoc_srcdir}/exception.hpp \
+ ${assoc_srcdir}/tree_policy.hpp \
+ ${assoc_srcdir}/lu_policy.hpp \
+ ${assoc_srcdir}/ms_trait.hpp \
+ ${assoc_srcdir}/assoc_cntnr.hpp \
+ ${assoc_srcdir}/data_type.hpp
+
+
ext_srcdir = ${glibcxx_srcdir}/include/ext
-ext_builddir = ./ext
+ext_builddir = ./ext
ext_headers = \
${ext_srcdir}/algorithm \
${ext_srcdir}/array_allocator.h \
@@ -209,6 +442,8 @@ ext_headers = \
${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 \
@@ -221,8 +456,8 @@ ext_headers = \
${ext_srcdir}/rope \
${ext_srcdir}/ropeimpl.h \
${ext_srcdir}/slist \
- ${ext_srcdir}/hash_fun.h \
- ${ext_srcdir}/hashtable.h
+ ${ext_srcdir}/typelist.h
+
tr1_srcdir = ${glibcxx_srcdir}/include/tr1
tr1_builddir = ./tr1
@@ -407,7 +642,7 @@ endif
# CLEANFILES and all-local are kept up-to-date.
allstamped = \
stamp-std stamp-bits stamp-c_base stamp-c_compatibility \
- stamp-backward stamp-ext stamp-tr1 stamp-debug stamp-host
+ stamp-backward stamp-ext stamp-assoc stamp-tr1 stamp-debug stamp-host
# List of all files that are created by explicit building, editing, or
# catenation.
@@ -427,8 +662,8 @@ stamp-std: ${std_headers}
fi ;\
if [ ! -f stamp-std ]; then \
(cd ${std_builddir} && for h in $?; do \
- official_name=`echo $$h | sed -e 's,.*/std_,,' -e 's,\.h$$,,'` ;\
- $(LN_S) $$h ./$${official_name} || true ;\
+ build_name=`echo $$h | sed -e 's,.*/std_,,' -e 's,\.h$$,,'` ;\
+ $(LN_S) $$h ./$${build_name} || true ;\
done) ;\
fi ;\
$(STAMP) stamp-std
@@ -448,8 +683,8 @@ stamp-c_base: stamp-bits ${c_base_headers} ${c_base_headers_extra}
fi ;\
if [ ! -f stamp-c_base ]; then \
(cd ${c_base_builddir} && for h in ${c_base_headers}; do \
- official_name=`echo $$h | sed -e 's,.*/std_,,' -e 's,\.h$$,,'` ;\
- $(LN_S) $$h ./$${official_name} || true ;\
+ build_name=`echo $$h | sed -e 's,.*/std_,,' -e 's,\.h$$,,'` ;\
+ $(LN_S) $$h ./$${build_name} || true ;\
done) ;\
if [ ! -z "${c_base_headers_extra}" ]; then \
(cd ${bits_builddir} && $(LN_S) ${c_base_headers_extra} . || true) ;\
@@ -486,6 +721,19 @@ stamp-ext: ${ext_headers}
fi ;\
$(STAMP) stamp-ext
+# Have to deal with nested include directories, gah! Strip off source
+# directory before making the link.
+stamp-assoc: ${assoc_headers}
+ @if [ ! -d "${assoc_builddir}" ]; then \
+ mkdir -p ${assoc_subdirs} ;\
+ fi ;\
+ if [ ! -f stamp-assoc ]; then \
+ (cd ${assoc_builddir} && for h in $?; do \
+ build_name=`echo $$h | sed -e "s|${assoc_srcdir}|.|g"` ;\
+ $(LN_S) $$h $${build_name} || true ;\
+ done) ;\
+ fi ;\
+ $(STAMP) stamp-assoc
stamp-tr1: ${tr1_headers}
@if [ ! -d "${tr1_builddir}" ]; then \
@@ -637,6 +885,13 @@ install-headers:
$(mkinstalldirs) $(DESTDIR)${gxx_include_dir}/${ext_builddir}
for file in ${ext_headers}; do \
$(INSTALL_DATA) $${file} $(DESTDIR)${gxx_include_dir}/${ext_builddir}; done
+ $(mkinstalldirs) $(DESTDIR)${gxx_include_dir}/${assoc_builddir}
+ for dir in ${assoc_subdirs}; do \
+ $(mkinstalldirs) $(DESTDIR)${gxx_include_dir}/$${dir} ; done
+ for file in ${assoc_headers}; do \
+ install_base=$(DESTDIR)${gxx_include_dir}/${assoc_builddir} ; \
+ relative_name=`echo $$file | sed -e "s|${assoc_srcdir}|.|g"` ;\
+ $(INSTALL_DATA) $${file} $${install_base}/$${relative_name} ; done
$(mkinstalldirs) $(DESTDIR)${gxx_include_dir}/${tr1_builddir}
for file in ${tr1_headers}; do \
$(INSTALL_DATA) $${file} $(DESTDIR)${gxx_include_dir}/${tr1_builddir}; done
diff --git a/libstdc++-v3/include/Makefile.in b/libstdc++-v3/include/Makefile.in
index 7f27b85491d..cbda94c713f 100644
--- a/libstdc++-v3/include/Makefile.in
+++ b/libstdc++-v3/include/Makefile.in
@@ -409,8 +409,238 @@ backward_headers = \
${backward_srcdir}/strstream \
${backward_srcdir}/backward_warning.h
+assoc_srcdir = ${glibcxx_srcdir}/include/ext/pb_assoc
+assoc_builddir = ./ext/pb_assoc
+assoc_subdirs = \
+ ${assoc_builddir}/detail \
+ ${assoc_builddir}/detail/tree_assoc_cntnr \
+ ${assoc_builddir}/detail/basic_assoc_cntnr \
+ ${assoc_builddir}/detail/splay_tree_ \
+ ${assoc_builddir}/detail/typelist \
+ ${assoc_builddir}/detail/basic_hash_assoc_cntnr \
+ ${assoc_builddir}/detail/cc_ht_map_ \
+ ${assoc_builddir}/detail/gp_ht_map_ \
+ ${assoc_builddir}/detail/tree_policy \
+ ${assoc_builddir}/detail/resize_policy \
+ ${assoc_builddir}/detail/bin_search_tree_ \
+ ${assoc_builddir}/detail/basic_tree_assoc_cntnr \
+ ${assoc_builddir}/detail/cc_hash_assoc_cntnr \
+ ${assoc_builddir}/detail/value_type_adapter \
+ ${assoc_builddir}/detail/lu_policy \
+ ${assoc_builddir}/detail/gp_hash_assoc_cntnr \
+ ${assoc_builddir}/detail/unordered_iterator \
+ ${assoc_builddir}/detail/ov_tree_map_ \
+ ${assoc_builddir}/detail/lu_assoc_cntnr \
+ ${assoc_builddir}/detail/hash_fn \
+ ${assoc_builddir}/detail/eq_fn \
+ ${assoc_builddir}/detail/rb_tree_map_ \
+ ${assoc_builddir}/detail/lu_map_
+
+assoc_headers = \
+ ${assoc_srcdir}/detail/tree_assoc_cntnr/constructor_destructor_fn_imps.hpp \
+ ${assoc_srcdir}/detail/type_utils.hpp \
+ ${assoc_srcdir}/detail/order_statistics_imp.hpp \
+ ${assoc_srcdir}/detail/basic_assoc_cntnr/d_find_fn_imps.hpp \
+ ${assoc_srcdir}/detail/basic_assoc_cntnr/d_insert_fn_imps.hpp \
+ ${assoc_srcdir}/detail/basic_assoc_cntnr/extract_key.hpp \
+ ${assoc_srcdir}/detail/basic_assoc_cntnr/erase_fn_imps.hpp \
+ ${assoc_srcdir}/detail/basic_assoc_cntnr/insert_fn_imps.hpp \
+ ${assoc_srcdir}/detail/basic_assoc_cntnr/constructor_destructor_fn_imps.hpp \
+ ${assoc_srcdir}/detail/basic_assoc_cntnr/info_fn_imps.hpp \
+ ${assoc_srcdir}/detail/basic_assoc_cntnr/iterators_fn_imps.hpp \
+ ${assoc_srcdir}/detail/basic_assoc_cntnr/d_extract_key.hpp \
+ ${assoc_srcdir}/detail/basic_assoc_cntnr/constructors_destructor_fn_imps.hpp \
+ ${assoc_srcdir}/detail/splay_tree_/erase_fn_imps.hpp \
+ ${assoc_srcdir}/detail/splay_tree_/splay_tree_.hpp \
+ ${assoc_srcdir}/detail/splay_tree_/node.hpp \
+ ${assoc_srcdir}/detail/splay_tree_/insert_fn_imps.hpp \
+ ${assoc_srcdir}/detail/splay_tree_/find_fn_imps.hpp \
+ ${assoc_srcdir}/detail/splay_tree_/splay_fn_imps.hpp \
+ ${assoc_srcdir}/detail/splay_tree_/split_join_fn_imps.hpp \
+ ${assoc_srcdir}/detail/splay_tree_/info_fn_imps.hpp \
+ ${assoc_srcdir}/detail/splay_tree_/debug_fn_imps.hpp \
+ ${assoc_srcdir}/detail/splay_tree_/constructors_destructor_fn_imps.hpp \
+ ${assoc_srcdir}/detail/typelist/typelist_transform.hpp \
+ ${assoc_srcdir}/detail/typelist/typelist_apply.hpp \
+ ${assoc_srcdir}/detail/typelist/typelist_filter.hpp \
+ ${assoc_srcdir}/detail/typelist/typelist_at_index.hpp \
+ ${assoc_srcdir}/detail/typelist/typelist_contains.hpp \
+ ${assoc_srcdir}/detail/typelist/typelist_append.hpp \
+ ${assoc_srcdir}/detail/typelist/typelist_typelist_append.hpp \
+ ${assoc_srcdir}/detail/ds_trait_imp.hpp \
+ ${assoc_srcdir}/detail/basic_hash_assoc_cntnr/resize_fn_imps.hpp \
+ ${assoc_srcdir}/detail/basic_hash_assoc_cntnr/constructor_destructor_fn_imps.hpp \
+ ${assoc_srcdir}/detail/basic_hash_assoc_cntnr/constructors_destructor_fn_imps.hpp \
+ ${assoc_srcdir}/detail/cc_ht_map_/resize_store_hash_fn_imps.hpp \
+ ${assoc_srcdir}/detail/cc_ht_map_/find_store_hash_fn_imps.hpp \
+ ${assoc_srcdir}/detail/cc_ht_map_/erase_no_store_hash_fn_imps.hpp \
+ ${assoc_srcdir}/detail/cc_ht_map_/resize_fn_imps.hpp \
+ ${assoc_srcdir}/detail/cc_ht_map_/debug_store_hash_fn_imps.hpp \
+ ${assoc_srcdir}/detail/cc_ht_map_/erase_fn_imps.hpp \
+ ${assoc_srcdir}/detail/cc_ht_map_/policy_access_fn_imps.hpp \
+ ${assoc_srcdir}/detail/cc_ht_map_/cmp_fn_imps.hpp \
+ ${assoc_srcdir}/detail/cc_ht_map_/insert_no_store_hash_fn_imps.hpp \
+ ${assoc_srcdir}/detail/cc_ht_map_/insert_fn_imps.hpp \
+ ${assoc_srcdir}/detail/cc_ht_map_/find_fn_imps.hpp \
+ ${assoc_srcdir}/detail/cc_ht_map_/find_no_store_hash_fn_imps.hpp \
+ ${assoc_srcdir}/detail/cc_ht_map_/cond_key_dtor_entry_dealtor.hpp \
+ ${assoc_srcdir}/detail/cc_ht_map_/constructor_destructor_fn_imps.hpp \
+ ${assoc_srcdir}/detail/cc_ht_map_/entry_list_fn_imps.hpp \
+ ${assoc_srcdir}/detail/cc_ht_map_/constructor_destructor_store_hash_fn_imps.hpp \
+ ${assoc_srcdir}/detail/cc_ht_map_/erase_store_hash_fn_imps.hpp \
+ ${assoc_srcdir}/detail/cc_ht_map_/cc_ht_map_.hpp \
+ ${assoc_srcdir}/detail/cc_ht_map_/constructor_destructor_no_store_hash_fn_imps.hpp \
+ ${assoc_srcdir}/detail/cc_ht_map_/standard_policies.hpp \
+ ${assoc_srcdir}/detail/cc_ht_map_/info_fn_imps.hpp \
+ ${assoc_srcdir}/detail/cc_ht_map_/iterators_fn_imps.hpp \
+ ${assoc_srcdir}/detail/cc_ht_map_/insert_store_hash_fn_imps.hpp \
+ ${assoc_srcdir}/detail/cc_ht_map_/debug_fn_imps.hpp \
+ ${assoc_srcdir}/detail/cc_ht_map_/size_fn_imps.hpp \
+ ${assoc_srcdir}/detail/cc_ht_map_/debug_no_store_hash_fn_imps.hpp \
+ ${assoc_srcdir}/detail/cc_ht_map_/resize_no_store_hash_fn_imps.hpp \
+ ${assoc_srcdir}/detail/gp_ht_map_/resize_store_hash_fn_imps.hpp \
+ ${assoc_srcdir}/detail/gp_ht_map_/find_store_hash_fn_imps.hpp \
+ ${assoc_srcdir}/detail/gp_ht_map_/erase_no_store_hash_fn_imps.hpp \
+ ${assoc_srcdir}/detail/gp_ht_map_/resize_fn_imps.hpp \
+ ${assoc_srcdir}/detail/gp_ht_map_/debug_store_hash_fn_imps.hpp \
+ ${assoc_srcdir}/detail/gp_ht_map_/erase_fn_imps.hpp \
+ ${assoc_srcdir}/detail/gp_ht_map_/policy_access_fn_imps.hpp \
+ ${assoc_srcdir}/detail/gp_ht_map_/insert_no_store_hash_fn_imps.hpp \
+ ${assoc_srcdir}/detail/gp_ht_map_/insert_fn_imps.hpp \
+ ${assoc_srcdir}/detail/gp_ht_map_/find_fn_imps.hpp \
+ ${assoc_srcdir}/detail/gp_ht_map_/find_no_store_hash_fn_imps.hpp \
+ ${assoc_srcdir}/detail/gp_ht_map_/constructor_destructor_fn_imps.hpp \
+ ${assoc_srcdir}/detail/gp_ht_map_/constructor_destructor_store_hash_fn_imps.hpp \
+ ${assoc_srcdir}/detail/gp_ht_map_/erase_store_hash_fn_imps.hpp \
+ ${assoc_srcdir}/detail/gp_ht_map_/constructor_destructor_no_store_hash_fn_imps.hpp \
+ ${assoc_srcdir}/detail/gp_ht_map_/info_fn_imps.hpp \
+ ${assoc_srcdir}/detail/gp_ht_map_/insert_store_hash_fn_imps.hpp \
+ ${assoc_srcdir}/detail/gp_ht_map_/debug_fn_imps.hpp \
+ ${assoc_srcdir}/detail/gp_ht_map_/gp_ht_map_.hpp \
+ ${assoc_srcdir}/detail/gp_ht_map_/iterator_fn_imps.hpp \
+ ${assoc_srcdir}/detail/gp_ht_map_/debug_no_store_hash_fn_imps.hpp \
+ ${assoc_srcdir}/detail/gp_ht_map_/resize_no_store_hash_fn_imps.hpp \
+ ${assoc_srcdir}/detail/tree_policy/order_statistics_imp.hpp \
+ ${assoc_srcdir}/detail/tree_policy/null_node_updator_imp.hpp \
+ ${assoc_srcdir}/detail/types_traits.hpp \
+ ${assoc_srcdir}/detail/mapping_level_imp.hpp \
+ ${assoc_srcdir}/detail/map_debug_base.hpp \
+ ${assoc_srcdir}/detail/resize_policy/ht_prime_size_policy_imp.hpp \
+ ${assoc_srcdir}/detail/resize_policy/hash_load_check_resize_trigger_imp.hpp \
+ ${assoc_srcdir}/detail/resize_policy/hash_prime_size_policy_imp.hpp \
+ ${assoc_srcdir}/detail/resize_policy/size_base.hpp \
+ ${assoc_srcdir}/detail/resize_policy/cc_hash_max_collision_resize_trigger_imp.hpp \
+ ${assoc_srcdir}/detail/resize_policy/hash_exponential_size_policy_imp.hpp \
+ ${assoc_srcdir}/detail/resize_policy/hash_standard_resize_policy_imp.hpp \
+ ${assoc_srcdir}/detail/bin_search_tree_/cond_dtor_entry_dealtor.hpp \
+ ${assoc_srcdir}/detail/bin_search_tree_/find_iterators.hpp \
+ ${assoc_srcdir}/detail/bin_search_tree_/erase_fn_imps.hpp \
+ ${assoc_srcdir}/detail/bin_search_tree_/insert_fn_imps.hpp \
+ ${assoc_srcdir}/detail/bin_search_tree_/find_fn_imps.hpp \
+ ${assoc_srcdir}/detail/bin_search_tree_/cond_key_dtor_entry_dealtor.hpp \
+ ${assoc_srcdir}/detail/bin_search_tree_/node_iterators.hpp \
+ ${assoc_srcdir}/detail/bin_search_tree_/bin_search_tree_.hpp \
+ ${assoc_srcdir}/detail/bin_search_tree_/split_join_fn_imps.hpp \
+ ${assoc_srcdir}/detail/bin_search_tree_/rotate_fn_imps.hpp \
+ ${assoc_srcdir}/detail/bin_search_tree_/info_fn_imps.hpp \
+ ${assoc_srcdir}/detail/bin_search_tree_/iterators_fn_imps.hpp \
+ ${assoc_srcdir}/detail/bin_search_tree_/r_erase_fn_imps.hpp \
+ ${assoc_srcdir}/detail/bin_search_tree_/debug_fn_imps.hpp \
+ ${assoc_srcdir}/detail/bin_search_tree_/constructors_destructor_fn_imps.hpp \
+ ${assoc_srcdir}/detail/basic_tree_assoc_cntnr/r_range_iteration_fn_imps.hpp \
+ ${assoc_srcdir}/detail/basic_tree_assoc_cntnr/erase_fn_imps.hpp \
+ ${assoc_srcdir}/detail/basic_tree_assoc_cntnr/policy_access_fn_imps.hpp \
+ ${assoc_srcdir}/detail/basic_tree_assoc_cntnr/constructor_destructor_fn_imps.hpp \
+ ${assoc_srcdir}/detail/basic_tree_assoc_cntnr/split_join_fn_imps.hpp \
+ ${assoc_srcdir}/detail/basic_tree_assoc_cntnr/r_erase_fn_imps.hpp \
+ ${assoc_srcdir}/detail/basic_tree_assoc_cntnr/range_iteration_fn_imps.hpp \
+ ${assoc_srcdir}/detail/basic_tree_assoc_cntnr/constructors_destructor_fn_imps.hpp \
+ ${assoc_srcdir}/detail/basic_tree_assoc_cntnr/node_iteration_fn_imps.hpp \
+ ${assoc_srcdir}/detail/cc_hash_assoc_cntnr/constructor_destructor_fn_imps.hpp \
+ ${assoc_srcdir}/detail/assoc_cntnr_base.hpp \
+ ${assoc_srcdir}/detail/ms_category_imp.hpp \
+ ${assoc_srcdir}/detail/hash_types_traits.hpp \
+ ${assoc_srcdir}/detail/typelist.hpp \
+ ${assoc_srcdir}/detail/value_type_adapter/invalidation_guarantee_selector.hpp \
+ ${assoc_srcdir}/detail/value_type_adapter/erase_fn_imps.hpp \
+ ${assoc_srcdir}/detail/value_type_adapter/iterator.hpp \
+ ${assoc_srcdir}/detail/value_type_adapter/constructor_destructor_and_related.hpp \
+ ${assoc_srcdir}/detail/value_type_adapter/value_type_traits.hpp \
+ ${assoc_srcdir}/detail/value_type_adapter/insert_fn_imps.hpp \
+ ${assoc_srcdir}/detail/value_type_adapter/find_fn_imps.hpp \
+ ${assoc_srcdir}/detail/value_type_adapter/ref_pair.hpp \
+ ${assoc_srcdir}/detail/value_type_adapter/it_value_type_traits.hpp \
+ ${assoc_srcdir}/detail/value_type_adapter/info_fn_imps.hpp \
+ ${assoc_srcdir}/detail/value_type_adapter/erase_if_pred.hpp \
+ ${assoc_srcdir}/detail/value_type_adapter/value_type_adapter.hpp \
+ ${assoc_srcdir}/detail/value_type_adapter/iterator_fn_imps.hpp \
+ ${assoc_srcdir}/detail/lu_policy/mtf_lu_policy_imp.hpp \
+ ${assoc_srcdir}/detail/lu_policy/counter_lu_policy_imp.hpp \
+ ${assoc_srcdir}/detail/lu_policy/counter_lu_metadata_imp.hpp \
+ ${assoc_srcdir}/detail/gp_hash_assoc_cntnr/constructor_destructor_fn_imps.hpp \
+ ${assoc_srcdir}/detail/unordered_iterator/find_iterator.hpp \
+ ${assoc_srcdir}/detail/unordered_iterator/iterator.hpp \
+ ${assoc_srcdir}/detail/unordered_iterator/const_iterator.hpp \
+ ${assoc_srcdir}/detail/unordered_iterator/const_find_iterator.hpp \
+ ${assoc_srcdir}/detail/standard_policies.hpp \
+ ${assoc_srcdir}/detail/standard_sizes.hpp \
+ ${assoc_srcdir}/detail/ov_tree_map_/erase_fn_imps.hpp \
+ ${assoc_srcdir}/detail/ov_tree_map_/insert_fn_imps.hpp \
+ ${assoc_srcdir}/detail/ov_tree_map_/find_fn_imps.hpp \
+ ${assoc_srcdir}/detail/ov_tree_map_/ov_tree_map_.hpp \
+ ${assoc_srcdir}/detail/ov_tree_map_/node_iterators.hpp \
+ ${assoc_srcdir}/detail/ov_tree_map_/split_join_fn_imps.hpp \
+ ${assoc_srcdir}/detail/ov_tree_map_/cond_dtor.hpp \
+ ${assoc_srcdir}/detail/ov_tree_map_/info_fn_imps.hpp \
+ ${assoc_srcdir}/detail/ov_tree_map_/iterators_fn_imps.hpp \
+ ${assoc_srcdir}/detail/ov_tree_map_/debug_fn_imps.hpp \
+ ${assoc_srcdir}/detail/ov_tree_map_/constructors_destructor_fn_imps.hpp \
+ ${assoc_srcdir}/detail/lu_assoc_cntnr/policy_access_fn_imps.hpp \
+ ${assoc_srcdir}/detail/lu_assoc_cntnr/constructor_destructor_fn_imps.hpp \
+ ${assoc_srcdir}/detail/hash_fn/linear_probe_fn_imp.hpp \
+ ${assoc_srcdir}/detail/hash_fn/mod_based_range_hashing.hpp \
+ ${assoc_srcdir}/detail/hash_fn/direct_mod_range_hashing_imp.hpp \
+ ${assoc_srcdir}/detail/hash_fn/probe_fn_base.hpp \
+ ${assoc_srcdir}/detail/hash_fn/ranged_probe_fn.hpp \
+ ${assoc_srcdir}/detail/hash_fn/quadratic_probe_fn_imp.hpp \
+ ${assoc_srcdir}/detail/hash_fn/direct_mask_range_hashing_imp.hpp \
+ ${assoc_srcdir}/detail/hash_fn/ranged_hash_fn.hpp \
+ ${assoc_srcdir}/detail/hash_fn/mask_based_range_hashing.hpp \
+ ${assoc_srcdir}/detail/eq_fn/eq_by_less.hpp \
+ ${assoc_srcdir}/detail/eq_fn/hash_eq_fn.hpp \
+ ${assoc_srcdir}/detail/rb_tree_map_/erase_fn_imps.hpp \
+ ${assoc_srcdir}/detail/rb_tree_map_/node.hpp \
+ ${assoc_srcdir}/detail/rb_tree_map_/insert_fn_imps.hpp \
+ ${assoc_srcdir}/detail/rb_tree_map_/find_fn_imps.hpp \
+ ${assoc_srcdir}/detail/rb_tree_map_/split_join_fn_imps.hpp \
+ ${assoc_srcdir}/detail/rb_tree_map_/rb_tree_.hpp \
+ ${assoc_srcdir}/detail/rb_tree_map_/info_fn_imps.hpp \
+ ${assoc_srcdir}/detail/rb_tree_map_/debug_fn_imps.hpp \
+ ${assoc_srcdir}/detail/rb_tree_map_/constructors_destructor_fn_imps.hpp \
+ ${assoc_srcdir}/detail/lu_map_/lu_map_.hpp \
+ ${assoc_srcdir}/detail/lu_map_/erase_fn_imps.hpp \
+ ${assoc_srcdir}/detail/lu_map_/policy_access_fn_imps.hpp \
+ ${assoc_srcdir}/detail/lu_map_/insert_fn_imps.hpp \
+ ${assoc_srcdir}/detail/lu_map_/find_fn_imps.hpp \
+ ${assoc_srcdir}/detail/lu_map_/constructor_destructor_fn_imps.hpp \
+ ${assoc_srcdir}/detail/lu_map_/info_fn_imps.hpp \
+ ${assoc_srcdir}/detail/lu_map_/iterators_fn_imps.hpp \
+ ${assoc_srcdir}/detail/lu_map_/debug_fn_imps.hpp \
+ ${assoc_srcdir}/detail/constructors_destructor_fn_imps.hpp \
+ ${assoc_srcdir}/detail/ms_trait_imp.hpp \
+ ${assoc_srcdir}/detail/cond_dealtor.hpp \
+ ${assoc_srcdir}/hash_policy.hpp \
+ ${assoc_srcdir}/trivial_iterator_def.hpp \
+ ${assoc_srcdir}/ds_trait.hpp \
+ ${assoc_srcdir}/exception.hpp \
+ ${assoc_srcdir}/tree_policy.hpp \
+ ${assoc_srcdir}/lu_policy.hpp \
+ ${assoc_srcdir}/ms_trait.hpp \
+ ${assoc_srcdir}/assoc_cntnr.hpp \
+ ${assoc_srcdir}/data_type.hpp
+
ext_srcdir = ${glibcxx_srcdir}/include/ext
-ext_builddir = ./ext
+ext_builddir = ./ext
ext_headers = \
${ext_srcdir}/algorithm \
${ext_srcdir}/array_allocator.h \
@@ -422,6 +652,8 @@ ext_headers = \
${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 \
@@ -434,8 +666,7 @@ ext_headers = \
${ext_srcdir}/rope \
${ext_srcdir}/ropeimpl.h \
${ext_srcdir}/slist \
- ${ext_srcdir}/hash_fun.h \
- ${ext_srcdir}/hashtable.h
+ ${ext_srcdir}/typelist.h
tr1_srcdir = ${glibcxx_srcdir}/include/tr1
tr1_builddir = ./tr1
@@ -615,7 +846,7 @@ PCHFLAGS = -Winvalid-pch -Wno-deprecated -x c++-header $(CXXFLAGS)
# CLEANFILES and all-local are kept up-to-date.
allstamped = \
stamp-std stamp-bits stamp-c_base stamp-c_compatibility \
- stamp-backward stamp-ext stamp-tr1 stamp-debug stamp-host
+ stamp-backward stamp-ext stamp-assoc stamp-tr1 stamp-debug stamp-host
# List of all files that are created by explicit building, editing, or
@@ -804,8 +1035,8 @@ stamp-std: ${std_headers}
fi ;\
if [ ! -f stamp-std ]; then \
(cd ${std_builddir} && for h in $?; do \
- official_name=`echo $$h | sed -e 's,.*/std_,,' -e 's,\.h$$,,'` ;\
- $(LN_S) $$h ./$${official_name} || true ;\
+ build_name=`echo $$h | sed -e 's,.*/std_,,' -e 's,\.h$$,,'` ;\
+ $(LN_S) $$h ./$${build_name} || true ;\
done) ;\
fi ;\
$(STAMP) stamp-std
@@ -825,8 +1056,8 @@ stamp-c_base: stamp-bits ${c_base_headers} ${c_base_headers_extra}
fi ;\
if [ ! -f stamp-c_base ]; then \
(cd ${c_base_builddir} && for h in ${c_base_headers}; do \
- official_name=`echo $$h | sed -e 's,.*/std_,,' -e 's,\.h$$,,'` ;\
- $(LN_S) $$h ./$${official_name} || true ;\
+ build_name=`echo $$h | sed -e 's,.*/std_,,' -e 's,\.h$$,,'` ;\
+ $(LN_S) $$h ./$${build_name} || true ;\
done) ;\
if [ ! -z "${c_base_headers_extra}" ]; then \
(cd ${bits_builddir} && $(LN_S) ${c_base_headers_extra} . || true) ;\
@@ -863,6 +1094,20 @@ stamp-ext: ${ext_headers}
fi ;\
$(STAMP) stamp-ext
+# Have to deal with nested include directories, gah! Strip off source
+# directory before making the link.
+stamp-assoc: ${assoc_headers}
+ @if [ ! -d "${assoc_builddir}" ]; then \
+ mkdir -p ${assoc_subdirs} ;\
+ fi ;\
+ if [ ! -f stamp-assoc ]; then \
+ (cd ${assoc_builddir} && for h in $?; do \
+ build_name=`echo $$h | sed -e "s|${assoc_srcdir}|.|g"` ;\
+ $(LN_S) $$h $${build_name} || true ;\
+ done) ;\
+ fi ;\
+ $(STAMP) stamp-assoc
+
stamp-tr1: ${tr1_headers}
@if [ ! -d "${tr1_builddir}" ]; then \
mkdir -p ${tr1_builddir} ;\
@@ -1007,6 +1252,13 @@ install-headers:
$(mkinstalldirs) $(DESTDIR)${gxx_include_dir}/${ext_builddir}
for file in ${ext_headers}; do \
$(INSTALL_DATA) $${file} $(DESTDIR)${gxx_include_dir}/${ext_builddir}; done
+ $(mkinstalldirs) $(DESTDIR)${gxx_include_dir}/${assoc_builddir}
+ for dir in ${assoc_subdirs}; do \
+ $(mkinstalldirs) $(DESTDIR)${gxx_include_dir}/$${dir} ; done
+ for file in ${assoc_headers}; do \
+ install_base=$(DESTDIR)${gxx_include_dir}/${assoc_builddir} ; \
+ relative_name=`echo $$file | sed -e "s|${assoc_srcdir}|.|g"` ;\
+ $(INSTALL_DATA) $${file} $${install_base}/$${relative_name} ; done
$(mkinstalldirs) $(DESTDIR)${gxx_include_dir}/${tr1_builddir}
for file in ${tr1_headers}; do \
$(INSTALL_DATA) $${file} $(DESTDIR)${gxx_include_dir}/${tr1_builddir}; done
diff --git a/libstdc++-v3/include/ext/pb_assoc/assoc_cntnr.hpp b/libstdc++-v3/include/ext/pb_assoc/assoc_cntnr.hpp
new file mode 100644
index 00000000000..6615536c546
--- /dev/null
+++ b/libstdc++-v3/include/ext/pb_assoc/assoc_cntnr.hpp
@@ -0,0 +1,1590 @@
+// -*- C++ -*-
+
+// 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.
+
+// As a special exception, you may use this file as part of a free software
+// library without restriction. Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General 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 assoc_cntnr.hpp
+ * Contains associative containers.
+ */
+
+#ifndef ASSOC_CNTNR_HPP
+#define ASSOC_CNTNR_HPP
+
+#include <ext/pb_assoc/ms_trait.hpp>
+#include <ext/pb_assoc/ds_trait.hpp>
+#include <ext/pb_assoc/detail/type_utils.hpp>
+#include <ext/pb_assoc/detail/typelist.hpp>
+#include <ext/pb_assoc/detail/standard_policies.hpp>
+#include <ext/pb_assoc/detail/mapping_level_imp.hpp>
+#include <ext/pb_assoc/detail/assoc_cntnr_base.hpp>
+#include <ext/pb_assoc/detail/value_type_adapter/value_type_adapter.hpp>
+
+namespace pb_assoc
+{
+
+#define PB_ASSOC_CLASS_T_DEC \
+ template< \
+ typename Key, \
+ typename Data, \
+ class DS_Tag, \
+ class Policy_Tl, \
+ class Allocator>
+
+#define PB_ASSOC_CLASS_C_DEC \
+ basic_assoc_cntnr< \
+ Key, \
+ Data, \
+ DS_Tag, \
+ Policy_Tl, \
+ Allocator>
+
+#define PB_ASSOC_BASE_C_DEC \
+ detail::assoc_cntnr_base< \
+ Key, \
+ Data, \
+ DS_Tag, \
+ Policy_Tl, \
+ Allocator>::type
+
+#define PB_ASSOC_DIRECT_BASE_C_DEC \
+ detail::assoc_cntnr_base< \
+ Key, \
+ Data, \
+ DS_Tag, \
+ Policy_Tl, \
+ Allocator>::type
+
+ template<typename Key,
+ typename Data,
+ class DS_Tag,
+ class Policy_Tl,
+ class Allocator>
+ class basic_assoc_cntnr
+ : public detail::assoc_cntnr_base<Key, Data, DS_Tag, Policy_Tl, Allocator>::type
+ {
+ public:
+ typedef typename Allocator::size_type size_type;
+ typedef typename Allocator::difference_type difference_type;
+ typedef DS_Tag ds_category;
+ typedef data_enabled_ms_tag ms_category;
+ typedef Allocator allocator;
+
+ typedef
+ typename allocator::template rebind<
+ Key>::other::value_type
+ key_type;
+
+ typedef
+ typename allocator::template rebind<
+ Key>::other::reference
+ key_reference;
+
+ typedef
+ typename allocator::template rebind<
+ Key>::other::const_reference
+ const_key_reference;
+
+ typedef
+ typename allocator::template rebind<
+ Key>::other::pointer
+ key_pointer;
+
+ typedef
+ typename allocator::template rebind<
+ Key>::other::const_pointer
+ const_key_pointer;
+
+ typedef
+ typename allocator::template rebind<
+ Data>::other::value_type
+ data_type;
+
+ typedef
+ typename allocator::template rebind<
+ Data>::other::reference
+ data_reference;
+
+ typedef
+ typename allocator::template rebind<
+ Data>::other::const_reference
+ const_data_reference;
+
+ typedef
+ typename allocator::template rebind<
+ Data>::other::pointer
+ data_pointer;
+
+ typedef
+ typename allocator::template rebind<
+ Data>::other::const_pointer
+ const_data_pointer;
+
+ typedef
+ typename allocator::template rebind<
+ std::pair<const key_type, data_type> >::other::value_type
+ value_type;
+
+ typedef
+ typename allocator::template rebind<
+ std::pair<const key_type, data_type> >::other::reference
+ reference;
+
+ typedef
+ typename allocator::template rebind<
+ std::pair<const key_type, data_type> >::other::const_reference
+ const_reference;
+
+ typedef
+ typename allocator::template rebind<
+ std::pair<const key_type, data_type> >::other::pointer
+ pointer;
+
+ typedef
+ typename allocator::template rebind<
+ std::pair<const key_type, data_type> >::other::const_pointer
+ const_pointer;
+
+ typedef
+ typename PB_ASSOC_BASE_C_DEC::const_find_iterator
+ const_find_iterator;
+
+ typedef typename PB_ASSOC_BASE_C_DEC::find_iterator find_iterator;
+
+ typedef typename PB_ASSOC_BASE_C_DEC::const_iterator const_iterator;
+
+ typedef typename PB_ASSOC_BASE_C_DEC::iterator iterator;
+
+ public:
+
+ virtual
+ ~basic_assoc_cntnr();
+
+ inline size_type
+ size() const;
+
+ inline size_type
+ max_size() const;
+
+ inline bool
+ empty() const;
+
+ inline static const_key_reference
+ extract_key(const_reference r_val);
+
+ inline std::pair<find_iterator, bool>
+ insert(const_reference r_val);
+
+ inline data_reference
+ operator[](const_key_reference r_key);
+
+ inline find_iterator
+ find(const_key_reference r_key)
+ {
+ return (my_base::find(r_key));
+ }
+
+ inline const_find_iterator
+ find(const_key_reference r_key) const
+ {
+ return (my_base::find(r_key));
+ }
+
+ inline const_data_reference
+ operator[](const_key_reference r_key) const;
+
+ inline size_type
+ erase(const_key_reference r_key);
+
+ template<class Pred>
+ inline size_type
+ erase_if(Pred prd);
+
+ void
+ clear();
+
+ inline iterator
+ begin();
+
+ inline const_iterator
+ begin() const;
+
+ inline iterator
+ end();
+
+ inline const_iterator
+ end() const;
+
+ protected:
+
+#define PB_ASSOC_CLASS_NAME basic_assoc_cntnr
+
+#define PB_ASSOC_DIRECT_BASE_CAST_C_DEC \
+ typename PB_ASSOC_DIRECT_BASE_C_DEC
+
+#include <ext/pb_assoc/detail/constructors_destructor_fn_imps.hpp>
+
+#undef PB_ASSOC_DIRECT_BASE_CAST_C_DEC
+
+#undef PB_ASSOC_CLASS_NAME
+
+ private:
+ typedef typename PB_ASSOC_BASE_C_DEC my_base;
+
+ private:
+ basic_assoc_cntnr&
+ operator=(const PB_ASSOC_CLASS_C_DEC& r_other);
+ };
+
+#include <ext/pb_assoc/detail/basic_assoc_cntnr/constructors_destructor_fn_imps.hpp>
+#include <ext/pb_assoc/detail/basic_assoc_cntnr/iterators_fn_imps.hpp>
+#include <ext/pb_assoc/detail/basic_assoc_cntnr/info_fn_imps.hpp>
+#include <ext/pb_assoc/detail/basic_assoc_cntnr/erase_fn_imps.hpp>
+#include <ext/pb_assoc/detail/basic_assoc_cntnr/insert_fn_imps.hpp>
+#include <ext/pb_assoc/detail/basic_assoc_cntnr/d_insert_fn_imps.hpp>
+#include <ext/pb_assoc/detail/basic_assoc_cntnr/d_find_fn_imps.hpp>
+#include <ext/pb_assoc/detail/basic_assoc_cntnr/d_extract_key.hpp>
+
+#undef PB_ASSOC_CLASS_T_DEC
+
+#undef PB_ASSOC_CLASS_C_DEC
+
+#undef PB_ASSOC_BASE_C_DEC
+
+#undef PB_ASSOC_DIRECT_BASE_C_DEC
+
+#define PB_ASSOC_CLASS_T_DEC \
+ template< \
+ typename Key, \
+ class Cntnr, \
+ class DS_Tag, \
+ class Policy_Tl, \
+ class Allocator>
+
+#define PB_ASSOC_CLASS_C_DEC \
+ basic_assoc_cntnr< \
+ Key, \
+ compound_data_type< \
+ Cntnr>, \
+ DS_Tag, \
+ Policy_Tl, \
+ Allocator>
+
+#define PB_ASSOC_DIRECT_BASE_C_DEC \
+ detail::value_type_adapter< \
+ Key, \
+ compound_data_type< \
+ Cntnr>, \
+ DS_Tag, \
+ Policy_Tl, \
+ Allocator, \
+ detail::mapping_level_imp< \
+ compound_data_type< \
+ Cntnr> >::value - 1>
+
+#define PB_ASSOC_BASE_C_DEC \
+ detail::assoc_cntnr_base< \
+ Key, \
+ compound_data_type< \
+ Cntnr>, \
+ DS_Tag, \
+ Policy_Tl, \
+ Allocator>::type
+
+ template<typename Key,
+ class Cntnr,
+ class DS_Tag,
+ class Policy_Tl,
+ class Allocator>
+ class basic_assoc_cntnr<Key, compound_data_type< Cntnr>, DS_Tag, Policy_Tl, Allocator> : public PB_ASSOC_DIRECT_BASE_C_DEC
+ {
+ public:
+ typedef typename Allocator::size_type size_type;
+ typedef typename Allocator::difference_type difference_type;
+ typedef DS_Tag ds_category;
+ typedef compound_data_enabled_ms_tag ms_category;
+ typedef Allocator allocator;
+
+ typedef
+ typename allocator::template rebind<
+ Key>::other::value_type
+ key_type;
+
+ typedef
+ typename allocator::template rebind<
+ Key>::other::reference
+ key_reference;
+
+ typedef
+ typename allocator::template rebind<
+ Key>::other::const_reference
+ const_key_reference;
+
+ typedef
+ typename allocator::template rebind<
+ Key>::other::pointer
+ key_pointer;
+
+ typedef
+ typename allocator::template rebind<
+ Key>::other::const_pointer
+ const_key_pointer;
+
+ typedef
+ typename allocator::template rebind<
+ Cntnr>::other::value_type
+ data_type;
+
+ typedef
+ typename allocator::template rebind<
+ Cntnr>::other::reference
+ data_reference;
+
+ typedef
+ typename allocator::template rebind<
+ Cntnr>::other::const_reference
+ const_data_reference;
+
+ typedef
+ typename allocator::template rebind<
+ Cntnr>::other::pointer
+ data_pointer;
+
+ typedef
+ typename allocator::template rebind<
+ Cntnr>::other::const_pointer
+ const_data_pointer;
+
+ typedef
+ typename allocator::template rebind<
+ std::pair<const key_type, Cntnr> >::other::value_type
+ value_type;
+
+ typedef
+ typename allocator::template rebind<
+ std::pair<const key_type, Cntnr> >::other::reference
+ reference;
+
+ typedef
+ typename allocator::template rebind<
+ std::pair<const key_type, Cntnr> >::other::const_reference
+ const_reference;
+
+ typedef
+ typename allocator::template rebind<
+ std::pair<const key_type, Cntnr> >::other::pointer
+ pointer;
+
+ typedef
+ typename allocator::template rebind<
+ std::pair<const key_type, Cntnr> >::other::const_pointer
+ const_pointer;
+
+ typedef
+ typename PB_ASSOC_BASE_C_DEC::const_find_iterator
+ const_find_iterator;
+
+ typedef typename PB_ASSOC_BASE_C_DEC::find_iterator find_iterator;
+
+ typedef typename PB_ASSOC_BASE_C_DEC::const_iterator const_iterator;
+
+ typedef typename PB_ASSOC_BASE_C_DEC::iterator iterator;
+
+ template<int Mapping_Level>
+ struct rebind
+ {
+ private:
+ enum
+ {
+ mapping_level =
+ detail::mapping_level_imp<compound_data_type<Cntnr> >::value
+ };
+
+ public:
+ typedef
+ detail::value_type_adapter<
+ Key,
+ compound_data_type<
+ Cntnr>,
+ DS_Tag,
+ Policy_Tl,
+ Allocator,
+ mapping_level - Mapping_Level>
+ other;
+ };
+
+ public:
+
+ virtual
+ ~basic_assoc_cntnr();
+
+ inline size_type
+ size() const;
+
+ inline size_type
+ max_size() const;
+
+ inline bool
+ empty() const;
+
+ inline static const_key_reference
+ extract_key(const_reference r_val);
+
+ inline std::pair<find_iterator, bool>
+ insert(const_reference r_val);
+
+ inline data_reference
+ operator[](const_key_reference r_key);
+
+ inline find_iterator
+ find(const_key_reference r_key)
+ {
+ return (my_base::find(r_key));
+ }
+
+ inline const_find_iterator
+ find(const_key_reference r_key) const
+ {
+ return (my_base::find(r_key));
+ }
+
+ inline const_data_reference
+ operator[](const_key_reference r_key) const;
+
+ inline size_type
+ erase(const_key_reference r_key);
+
+ template<class Pred>
+ inline size_type
+ erase_if(Pred prd);
+
+ void
+ clear();
+
+ inline iterator
+ begin();
+
+ inline const_iterator
+ begin() const;
+
+ inline iterator
+ end();
+
+ inline const_iterator
+ end() const;
+
+ protected:
+
+#define PB_ASSOC_CLASS_NAME basic_assoc_cntnr
+
+#define PB_ASSOC_DIRECT_BASE_CAST_C_DEC \
+ typename PB_ASSOC_DIRECT_BASE_C_DEC
+
+#include <ext/pb_assoc/detail/constructors_destructor_fn_imps.hpp>
+
+#undef PB_ASSOC_DIRECT_BASE_CAST_C_DEC
+
+#undef PB_ASSOC_CLASS_NAME
+
+ private:
+ typedef typename PB_ASSOC_BASE_C_DEC my_base;
+
+ private:
+ basic_assoc_cntnr&
+ operator=(const PB_ASSOC_CLASS_C_DEC& r_other);
+ };
+
+#include <ext/pb_assoc/detail/basic_assoc_cntnr/constructors_destructor_fn_imps.hpp>
+#include <ext/pb_assoc/detail/basic_assoc_cntnr/iterators_fn_imps.hpp>
+#include <ext/pb_assoc/detail/basic_assoc_cntnr/info_fn_imps.hpp>
+#include <ext/pb_assoc/detail/basic_assoc_cntnr/erase_fn_imps.hpp>
+#include <ext/pb_assoc/detail/basic_assoc_cntnr/insert_fn_imps.hpp>
+#include <ext/pb_assoc/detail/basic_assoc_cntnr/d_insert_fn_imps.hpp>
+#include <ext/pb_assoc/detail/basic_assoc_cntnr/d_find_fn_imps.hpp>
+#include <ext/pb_assoc/detail/basic_assoc_cntnr/d_extract_key.hpp>
+
+#undef PB_ASSOC_CLASS_T_DEC
+
+#undef PB_ASSOC_CLASS_C_DEC
+
+#undef PB_ASSOC_BASE_C_DEC
+
+#undef PB_ASSOC_DIRECT_BASE_C_DEC
+
+#define PB_ASSOC_CLASS_T_DEC \
+ template<typename Key, class DS_Tag, class Policy_Tl, class Allocator>
+
+#define PB_ASSOC_CLASS_C_DEC \
+ basic_assoc_cntnr< \
+ Key, \
+ null_data_type, \
+ DS_Tag, \
+ Policy_Tl, \
+ Allocator>
+
+#define PB_ASSOC_BASE_C_DEC \
+ detail::assoc_cntnr_base< \
+ Key, \
+ null_data_type, \
+ DS_Tag, \
+ Policy_Tl, \
+ Allocator>::type
+
+ template<typename Key, class DS_Tag, class Policy_Tl, class Allocator>
+ class basic_assoc_cntnr<Key, null_data_type, DS_Tag, Policy_Tl, Allocator> : public PB_ASSOC_BASE_C_DEC
+ {
+ public:
+ typedef typename Allocator::size_type size_type;
+ typedef typename Allocator::difference_type difference_type;
+ typedef DS_Tag ds_category;
+ typedef basic_ms_tag ms_category;
+ typedef Allocator allocator;
+
+ typedef
+ typename allocator::template rebind<
+ Key>::other::value_type
+ key_type;
+
+ typedef
+ typename allocator::template rebind<
+ Key>::other::reference
+ key_reference;
+
+ typedef
+ typename allocator::template rebind<
+ Key>::other::const_reference
+ const_key_reference;
+
+ typedef
+ typename allocator::template rebind<
+ Key>::other::pointer
+ key_pointer;
+
+ typedef
+ typename allocator::template rebind<
+ Key>::other::const_pointer
+ const_key_pointer;
+
+ typedef
+ typename allocator::template rebind<
+ key_type>::other::value_type
+ value_type;
+
+ typedef
+ typename allocator::template rebind<
+ key_type>::other::const_reference
+ reference;
+
+ typedef
+ typename allocator::template rebind<
+ key_type>::other::const_reference
+ const_reference;
+
+ typedef
+ typename allocator::template rebind<
+ key_type>::other::const_pointer
+ pointer;
+
+ typedef
+ typename allocator::template rebind<key_type>::other::const_pointer
+ const_pointer;
+
+ typedef
+ typename PB_ASSOC_BASE_C_DEC::const_find_iterator
+ const_find_iterator;
+
+ typedef typename PB_ASSOC_BASE_C_DEC::find_iterator find_iterator;
+
+ typedef typename PB_ASSOC_BASE_C_DEC::const_iterator const_iterator;
+
+ typedef typename PB_ASSOC_BASE_C_DEC::iterator iterator;
+
+ public:
+
+ virtual
+ ~basic_assoc_cntnr();
+
+ inline size_type
+ size() const;
+
+ inline size_type
+ max_size() const;
+
+ inline bool
+ empty() const;
+
+ inline static const_key_reference
+ extract_key(const_reference r_val);
+
+ inline std::pair<find_iterator, bool>
+ insert(const_reference r_val);
+
+ inline find_iterator
+ find(const_key_reference r_key)
+ { return (my_base::find(r_key)); }
+
+ inline const_find_iterator
+ find(const_key_reference r_key) const
+ { return (my_base::find(r_key)); }
+
+ inline size_type
+ erase(const_key_reference r_key);
+
+ template<class Pred>
+ inline size_type
+ erase_if(Pred prd);
+
+ void
+ clear();
+
+ inline iterator
+ begin();
+
+ inline const_iterator
+ begin() const;
+
+ inline iterator
+ end();
+
+ inline const_iterator
+ end() const;
+
+ protected:
+
+#define PB_ASSOC_CLASS_NAME basic_assoc_cntnr
+
+#define PB_ASSOC_DIRECT_BASE_C_DEC PB_ASSOC_BASE_C_DEC
+
+#define PB_ASSOC_DIRECT_BASE_CAST_C_DEC \
+ typename PB_ASSOC_DIRECT_BASE_C_DEC
+
+#include <ext/pb_assoc/detail/constructors_destructor_fn_imps.hpp>
+
+#undef PB_ASSOC_DIRECT_BASE_CAST_C_DEC
+
+#undef PB_ASSOC_DIRECT_BASE_C_DEC
+
+#undef PB_ASSOC_CLASS_NAME
+
+ private:
+ typedef typename PB_ASSOC_BASE_C_DEC my_base;
+
+ private:
+ basic_assoc_cntnr&
+ operator=(const PB_ASSOC_CLASS_C_DEC& r_other);
+ };
+
+#include <ext/pb_assoc/detail/basic_assoc_cntnr/constructors_destructor_fn_imps.hpp>
+#include <ext/pb_assoc/detail/basic_assoc_cntnr/iterators_fn_imps.hpp>
+#include <ext/pb_assoc/detail/basic_assoc_cntnr/info_fn_imps.hpp>
+#include <ext/pb_assoc/detail/basic_assoc_cntnr/erase_fn_imps.hpp>
+#include <ext/pb_assoc/detail/basic_assoc_cntnr/insert_fn_imps.hpp>
+#include <ext/pb_assoc/detail/basic_assoc_cntnr/extract_key.hpp>
+
+#undef PB_ASSOC_CLASS_T_DEC
+
+#undef PB_ASSOC_CLASS_C_DEC
+
+#undef PB_ASSOC_BASE_C_DEC
+
+#define PB_ASSOC_TYPELIST_CHAIN1(X0) pb_assoc::detail::typelist_chain<X0, pb_assoc::detail::null_type>
+#define PB_ASSOC_TYPELIST_CHAIN2(X0, X1) pb_assoc::detail::typelist_chain<X0, PB_ASSOC_TYPELIST_CHAIN1(X1) >
+#define PB_ASSOC_TYPELIST_CHAIN3(X0, X1, X2) pb_assoc::detail::typelist_chain<X0, PB_ASSOC_TYPELIST_CHAIN2(X1, X2) >
+#define PB_ASSOC_TYPELIST_CHAIN4(X0, X1, X2, X3) pb_assoc::detail::typelist_chain<X0, PB_ASSOC_TYPELIST_CHAIN3(X1, X2, X3) >
+#define PB_ASSOC_TYPELIST_CHAIN5(X0, X1, X2, X3, X4) pb_assoc::detail::typelist_chain<X0, PB_ASSOC_TYPELIST_CHAIN4(X1, X2, X3, X4) >
+#define PB_ASSOC_TYPELIST_CHAIN6(X0, X1, X2, X3, X4, X5) pb_assoc::detail::typelist_chain<X0, PB_ASSOC_TYPELIST_CHAIN5(X1, X2, X3, X4, X5) >
+#define PB_ASSOC_TYPELIST_CHAIN7(X0, X1, X2, X3, X4, X5, X6) pb_assoc::detail::typelist_chain<X0, PB_ASSOC_TYPELIST_CHAIN6(X1, X2, X3, X4, X5, X6) >
+#define PB_ASSOC_TYPELIST_CHAIN8(X0, X1, X2, X3, X4, X5, X6, X7) pb_assoc::detail::typelist_chain<X0, PB_ASSOC_TYPELIST_CHAIN7(X1, X2, X3, X4, X5, X6, X7) >
+#define PB_ASSOC_TYPELIST_CHAIN9(X0, X1, X2, X3, X4, X5, X6, X7, X8) pb_assoc::detail::typelist_chain<X0, PB_ASSOC_TYPELIST_CHAIN8(X1, X2, X3, X4, X5, X6, X7, X8) >
+#define PB_ASSOC_TYPELIST_CHAIN10(X0, X1, X2, X3, X4, X5, X6, X7, X8, X9) pb_assoc::detail::typelist_chain<X0, PB_ASSOC_TYPELIST_CHAIN9(X1, X2, X3, X4, X5, X6, X7, X8, X9) >
+#define PB_ASSOC_TYPELIST_CHAIN11(X0, X1, X2, X3, X4, X5, X6, X7, X8, X9, X10) pb_assoc::detail::typelist_chain<X0, PB_ASSOC_TYPELIST_CHAIN10(X1, X2, X3, X4, X5, X6, X7, X8, X9, X10) >
+#define PB_ASSOC_TYPELIST_CHAIN12(X0, X1, X2, X3, X4, X5, X6, X7, X8, X9, X10, X11) pb_assoc::detail::typelist_chain<X0, PB_ASSOC_TYPELIST_CHAIN11(X1, X2, X3, X4, X5, X6, X7, X8, X9, X10, X11) >
+#define PB_ASSOC_TYPELIST_CHAIN13(X0, X1, X2, X3, X4, X5, X6, X7, X8, X9, X10, X11, X12) pb_assoc::detail::typelist_chain<X0, PB_ASSOC_TYPELIST_CHAIN12(X1, X2, X3, X4, X5, X6, X7, X8, X9, X10, X11, X12) >
+#define PB_ASSOC_TYPELIST_CHAIN14(X0, X1, X2, X3, X4, X5, X6, X7, X8, X9, X10, X11, X12, X13) pb_assoc::detail::typelist_chain<X0, PB_ASSOC_TYPELIST_CHAIN13(X1, X2, X3, X4, X5, X6, X7, X8, X9, X10, X11, X12, X13) >
+#define PB_ASSOC_TYPELIST_CHAIN15(X0, X1, X2, X3, X4, X5, X6, X7, X8, X9, X10, X11, X12, X13, X14) pb_assoc::detail::typelist_chain<X0, PB_ASSOC_TYPELIST_CHAIN14(X1, X2, X3, X4, X5, X6, X7, X8, X9, X10, X11, X12, X13, X14) >
+
+#define PB_ASSOC_CLASS_T_DEC \
+ template< \
+ typename Key, \
+ typename Data, \
+ class Hash_Fn, \
+ class Eq_Fn, \
+ class Resize_Policy, \
+ bool Store_Hash, \
+ class DS_Tag, \
+ class Policy_TL, \
+ class Allocator>
+
+#define PB_ASSOC_CLASS_C_DEC \
+ basic_hash_assoc_cntnr< \
+ Key, \
+ Data, \
+ Hash_Fn, \
+ Eq_Fn, \
+ Resize_Policy, \
+ Store_Hash, \
+ DS_Tag, \
+ Policy_TL, \
+ Allocator>
+
+#define PB_ASSOC_BASE_C_DEC \
+ basic_assoc_cntnr< \
+ Key, \
+ Data, \
+ DS_Tag, \
+ typename pb_assoc::detail::typelist_append< \
+ pb_assoc::detail::typelist< \
+ PB_ASSOC_TYPELIST_CHAIN4( Hash_Fn, Eq_Fn, Resize_Policy, pb_assoc::detail::int_to_type<Store_Hash>) >, \
+ Policy_TL>::type, \
+ Allocator>
+
+ template<typename Key,
+ typename Data,
+ class Hash_Fn,
+ class Eq_Fn,
+ class Resize_Policy,
+ bool Store_Hash,
+ class DS_Tag,
+ class Policy_TL,
+ class Allocator>
+ class basic_hash_assoc_cntnr : public PB_ASSOC_BASE_C_DEC
+ {
+ public:
+ typedef Hash_Fn hash_fn;
+
+ typedef Eq_Fn eq_fn;
+
+ typedef Resize_Policy resize_policy;
+
+ enum
+ {
+ store_hash = Store_Hash
+ };
+
+ virtual
+ ~basic_hash_assoc_cntnr();
+
+ hash_fn&
+ get_hash_fn();
+
+ const hash_fn&
+ get_hash_fn() const;
+
+ eq_fn&
+ get_eq_fn();
+
+ const eq_fn&
+ get_eq_fn() const;
+
+ Resize_Policy&
+ get_resize_policy();
+
+ const resize_policy&
+ get_resize_policy() const;
+
+ protected:
+
+ typedef typename Allocator::size_type size_type;
+
+ virtual void
+ do_resize(size_type new_size);
+
+#define PB_ASSOC_CLASS_NAME basic_hash_assoc_cntnr
+
+#define PB_ASSOC_DIRECT_BASE_C_DEC PB_ASSOC_BASE_C_DEC
+
+#define PB_ASSOC_DIRECT_BASE_CAST_C_DEC \
+ PB_ASSOC_DIRECT_BASE_C_DEC
+
+#include <ext/pb_assoc/detail/constructors_destructor_fn_imps.hpp>
+
+#undef PB_ASSOC_DIRECT_BASE_C_DEC
+
+#undef PB_ASSOC_CLASS_NAME
+
+#undef PB_ASSOC_DIRECT_BASE_C_DEC
+
+ private:
+ typedef PB_ASSOC_BASE_C_DEC my_base;
+
+ basic_hash_assoc_cntnr&
+ operator=(const PB_ASSOC_CLASS_C_DEC& r_other);
+ };
+
+#include <ext/pb_assoc/detail/basic_hash_assoc_cntnr/constructors_destructor_fn_imps.hpp>
+#include <ext/pb_assoc/detail/basic_hash_assoc_cntnr/resize_fn_imps.hpp>
+
+#undef PB_ASSOC_CLASS_T_DEC
+
+#undef PB_ASSOC_CLASS_C_DEC
+
+#undef PB_ASSOC_BASE_C_DEC
+
+#define PB_ASSOC_CLASS_T_DEC \
+ template< \
+ typename Key, \
+ typename Data, \
+ class Hash_Fn, \
+ class Eq_Fn, \
+ class Comb_Hash_Fn, \
+ class Resize_Policy, \
+ bool Store_Hash, \
+ class Allocator>
+
+#define PB_ASSOC_CLASS_C_DEC \
+ cc_hash_assoc_cntnr< \
+ Key, \
+ Data, \
+ Hash_Fn, \
+ Eq_Fn, \
+ Comb_Hash_Fn, \
+ Resize_Policy, \
+ Store_Hash, \
+ Allocator>
+
+#define PB_ASSOC_BASE_C_DEC \
+ basic_hash_assoc_cntnr< \
+ Key, \
+ Data, \
+ Hash_Fn, \
+ Eq_Fn, \
+ Resize_Policy, \
+ Store_Hash, \
+ cc_hash_ds_tag, \
+ pb_assoc::detail::typelist< \
+ PB_ASSOC_TYPELIST_CHAIN1( \
+ Comb_Hash_Fn) >, \
+ Allocator>
+
+ template<typename Key,
+ typename Data,
+ class Hash_Fn = typename pb_assoc::detail::def_hash_fn<Key>::type,
+ class Eq_Fn = typename pb_assoc::detail::def_eq_fn<Key>::type,
+ class Comb_Hash_Fn = pb_assoc::detail::def_comb_hash_fn::type,
+ class Resize_Policy =
+ typename pb_assoc::detail::def_resize_policy<Comb_Hash_Fn>::type,
+ bool Store_Hash = pb_assoc::detail::def_store_hash,
+ class Allocator = std::allocator<char> >
+ class cc_hash_assoc_cntnr : public PB_ASSOC_BASE_C_DEC
+ {
+ public:
+ typedef Comb_Hash_Fn comb_hash_fn;
+
+ cc_hash_assoc_cntnr();
+
+ cc_hash_assoc_cntnr(const Hash_Fn& r_hash_fn);
+
+ cc_hash_assoc_cntnr(const Hash_Fn& r_hash_fn, const Eq_Fn& r_eq_fn);
+
+ cc_hash_assoc_cntnr(const Hash_Fn& r_hash_fn, const Eq_Fn& r_eq_fn,
+ const Comb_Hash_Fn& r_comb_hash_fn);
+
+ cc_hash_assoc_cntnr(const Hash_Fn& r_hash_fn, const Eq_Fn& r_eq_fn,
+ const Comb_Hash_Fn& r_comb_hash_fn,
+ const Resize_Policy& r_resize_policy);
+
+ template<class It>
+ cc_hash_assoc_cntnr(It first_it, It last_it);
+
+ template<class It>
+ cc_hash_assoc_cntnr(It first_it, It last_it, const Hash_Fn& r_hash_fn);
+
+ template<class It>
+ cc_hash_assoc_cntnr(It first_it, It last_it, const Hash_Fn& r_hash_fn,
+ const Eq_Fn& r_eq_fn);
+
+ template<class It>
+ cc_hash_assoc_cntnr(It first_it, It last_it, const Hash_Fn& r_hash_fn, const Eq_Fn& r_eq_fn, const Comb_Hash_Fn& r_comb_hash_fn);
+
+ template<class It>
+ cc_hash_assoc_cntnr(It first_it, It last_it, const Hash_Fn& r_hash_fn, const Eq_Fn& r_eq_fn, const Comb_Hash_Fn& r_comb_hash_fn, const Resize_Policy& r_resize_policy);
+
+ cc_hash_assoc_cntnr(const PB_ASSOC_CLASS_C_DEC& r_other);
+
+ virtual
+ ~cc_hash_assoc_cntnr();
+
+ PB_ASSOC_CLASS_C_DEC&
+ operator=(const PB_ASSOC_CLASS_C_DEC& r_other);
+
+ void
+ swap(PB_ASSOC_CLASS_C_DEC& r_other);
+
+ comb_hash_fn&
+ get_comb_hash_fn();
+
+ const comb_hash_fn&
+ get_comb_hash_fn() const;
+
+ private:
+ typedef PB_ASSOC_BASE_C_DEC my_base;
+ };
+
+#include <ext/pb_assoc/detail/cc_hash_assoc_cntnr/constructor_destructor_fn_imps.hpp>
+
+#undef PB_ASSOC_CLASS_T_DEC
+
+#undef PB_ASSOC_CLASS_C_DEC
+
+#undef PB_ASSOC_BASE_C_DEC
+
+#define PB_ASSOC_CLASS_T_DEC \
+ template< \
+ typename Key, \
+ typename Data, \
+ class Hash_Fn, \
+ class Eq_Fn, \
+ class Comb_Probe_Fn, \
+ class Probe_Fn, \
+ class Resize_Policy, \
+ bool Store_Hash, \
+ class Allocator>
+
+#define PB_ASSOC_CLASS_C_DEC \
+ gp_hash_assoc_cntnr< \
+ Key, \
+ Data, \
+ Hash_Fn, \
+ Eq_Fn, \
+ Comb_Probe_Fn, \
+ Probe_Fn, \
+ Resize_Policy, \
+ Store_Hash, \
+ Allocator>
+
+#define PB_ASSOC_BASE_C_DEC \
+ basic_hash_assoc_cntnr< \
+ Key, \
+ Data, \
+ Hash_Fn, \
+ Eq_Fn, \
+ Resize_Policy, \
+ Store_Hash, \
+ gp_hash_ds_tag, \
+ pb_assoc::detail::typelist< \
+ PB_ASSOC_TYPELIST_CHAIN2( Comb_Probe_Fn, Probe_Fn) >, \
+ Allocator>
+
+ template<typename Key,
+ typename Data,
+ class Hash_Fn = typename pb_assoc::detail::def_hash_fn<Key>::type,
+ class Eq_Fn = typename pb_assoc::detail::def_eq_fn<Key>::type,
+ class Comb_Probe_Fn = pb_assoc::detail::def_comb_hash_fn::type,
+ class Probe_Fn = typename detail::def_probe_fn<Comb_Probe_Fn>::type,
+ class Resize_Policy =
+ typename pb_assoc::detail::def_resize_policy<Comb_Probe_Fn>::type,
+
+ bool Store_Hash = pb_assoc::detail::def_store_hash,
+ class Allocator = std::allocator<char> >
+ class gp_hash_assoc_cntnr : public PB_ASSOC_BASE_C_DEC
+ {
+ public:
+ typedef Comb_Probe_Fn comb_probe_fn;
+ typedef Probe_Fn probe_fn;
+
+ gp_hash_assoc_cntnr();
+
+ gp_hash_assoc_cntnr(const Hash_Fn& r_hash_fn);
+
+ gp_hash_assoc_cntnr(const Hash_Fn& r_hash_fn, const Eq_Fn& r_eq_fn);
+
+ gp_hash_assoc_cntnr(const Hash_Fn& r_hash_fn, const Eq_Fn& r_eq_fn,
+ const Comb_Probe_Fn& r_comb_probe_fn);
+
+ gp_hash_assoc_cntnr(const Hash_Fn& r_hash_fn, const Eq_Fn& r_eq_fn,
+ const Comb_Probe_Fn& r_comb_probe_fn,
+ const Probe_Fn& r_probe_fn);
+
+ gp_hash_assoc_cntnr(const Hash_Fn& r_hash_fn, const Eq_Fn& r_eq_fn,
+ const Comb_Probe_Fn& r_comb_probe_fn,
+ const Probe_Fn& r_probe_fn,
+ const Resize_Policy& r_resize_policy);
+
+ template<class It>
+ gp_hash_assoc_cntnr(It first_it, It last_it);
+
+ template<class It>
+ gp_hash_assoc_cntnr(It first_it, It last_it, const Hash_Fn& r_hash_fn);
+
+ template<class It>
+ gp_hash_assoc_cntnr(It first_it, It last_it, const Hash_Fn& r_hash_fn, const Eq_Fn& r_eq_fn);
+
+ template<class It>
+ gp_hash_assoc_cntnr(It first_it, It last_it, const Hash_Fn& r_hash_fn, const Eq_Fn& r_eq_fn, const Comb_Probe_Fn& r_comb_probe_fn);
+
+ template<class It>
+ gp_hash_assoc_cntnr(It first_it, It last_it, const Hash_Fn& r_hash_fn, const Eq_Fn& r_eq_fn, const Comb_Probe_Fn& r_comb_probe_fn, const Probe_Fn& r_probe_fn);
+
+ template<class It>
+ gp_hash_assoc_cntnr(It first_it, It last_it, const Hash_Fn& r_hash_fn, const Eq_Fn& r_eq_fn, const Comb_Probe_Fn& r_comb_probe_fn, const Probe_Fn& r_probe_fn, const Resize_Policy& r_resize_policy);
+
+ gp_hash_assoc_cntnr(const PB_ASSOC_CLASS_C_DEC& r_other);
+
+ virtual
+ ~gp_hash_assoc_cntnr();
+
+ PB_ASSOC_CLASS_C_DEC&
+ operator=(const PB_ASSOC_CLASS_C_DEC& r_other);
+
+ void
+ swap(PB_ASSOC_CLASS_C_DEC& r_other);
+
+ comb_probe_fn&
+ get_comb_probe_fn();
+
+ const comb_probe_fn&
+ get_comb_probe_fn() const;
+
+ probe_fn&
+ get_probe_fn();
+
+ const probe_fn&
+ get_probe_fn() const;
+
+ private:
+ typedef PB_ASSOC_BASE_C_DEC my_base;
+ };
+
+#include <ext/pb_assoc/detail/gp_hash_assoc_cntnr/constructor_destructor_fn_imps.hpp>
+
+#undef PB_ASSOC_CLASS_T_DEC
+
+#undef PB_ASSOC_CLASS_C_DEC
+
+#undef PB_ASSOC_BASE_C_DEC
+
+#define PB_ASSOC_CLASS_T_DEC \
+ template< \
+ typename Key, \
+ typename Data, \
+ class Cmp_Fn, \
+ class DS_Tag, \
+ class Node_Updator, \
+ class Allocator>
+
+#define PB_ASSOC_CLASS_C_DEC \
+ basic_tree_assoc_cntnr< \
+ Key, \
+ Data, \
+ Cmp_Fn, \
+ DS_Tag, \
+ Node_Updator, \
+ Allocator>
+
+#define PB_ASSOC_BASE_C_DEC \
+ basic_assoc_cntnr< \
+ Key, \
+ Data, \
+ DS_Tag, \
+ pb_assoc::detail::typelist< \
+ PB_ASSOC_TYPELIST_CHAIN2( Cmp_Fn, Node_Updator) >, \
+ Allocator>
+
+ template<typename Key,
+ typename Data,
+ class Cmp_Fn,
+ class DS_Tag,
+ class Node_Updator,
+ class Allocator>
+ class basic_tree_assoc_cntnr : public PB_ASSOC_BASE_C_DEC
+ {
+ public:
+ typedef typename Allocator::size_type size_type;
+
+ typedef
+ typename Allocator::template rebind<
+ Key>::other::const_reference
+ const_key_reference;
+
+ typedef Cmp_Fn cmp_fn;
+
+ typedef Node_Updator node_updator;
+
+ typedef typename PB_ASSOC_BASE_C_DEC::const_iterator const_iterator;
+
+ typedef typename PB_ASSOC_BASE_C_DEC::iterator iterator;
+
+ typedef
+ typename PB_ASSOC_BASE_C_DEC::const_reverse_iterator
+ const_reverse_iterator;
+
+ typedef
+ typename PB_ASSOC_BASE_C_DEC::reverse_iterator
+ reverse_iterator;
+
+ typedef
+ typename PB_ASSOC_BASE_C_DEC::const_node_iterator
+ const_node_iterator;
+
+ typedef typename PB_ASSOC_BASE_C_DEC::node_iterator node_iterator;
+
+ virtual
+ ~basic_tree_assoc_cntnr();
+
+ cmp_fn&
+ get_cmp_fn();
+
+ const cmp_fn&
+ get_cmp_fn() const;
+
+ node_updator&
+ get_node_updator();
+
+ const node_updator&
+ get_node_updator() const;
+
+ inline size_type
+ erase(const_key_reference r_key);
+
+ inline iterator
+ erase(iterator it);
+
+ inline reverse_iterator
+ erase(reverse_iterator it)
+ {
+ return (my_base::erase(it));
+ }
+
+ inline reverse_iterator
+ rbegin()
+ {
+ return (my_base::rbegin());
+ }
+
+ inline const_reverse_iterator
+ rbegin() const
+ {
+ return (my_base::rbegin());
+ }
+
+ inline reverse_iterator
+ rend()
+ {
+ return (my_base::rend());
+ }
+
+ inline const_reverse_iterator
+ rend() const
+ {
+ return (my_base::rend());
+ }
+
+ inline node_iterator
+ node_begin()
+ {
+ return (my_base::node_begin());
+ }
+
+ inline const_node_iterator
+ node_begin() const
+ {
+ return (my_base::node_begin());
+ }
+
+ inline node_iterator
+ node_end()
+ {
+ return (my_base::node_end());
+ }
+
+ inline const_node_iterator
+ node_end() const
+ {
+ return (my_base::node_end());
+ }
+
+ void
+ join(PB_ASSOC_CLASS_C_DEC& r_other);
+
+ inline void
+ split(const_key_reference r_key, PB_ASSOC_CLASS_C_DEC& r_other);
+
+ protected:
+
+#define PB_ASSOC_CLASS_NAME basic_tree_assoc_cntnr
+
+#define PB_ASSOC_DIRECT_BASE_C_DEC PB_ASSOC_BASE_C_DEC
+
+#define PB_ASSOC_DIRECT_BASE_CAST_C_DEC \
+ PB_ASSOC_DIRECT_BASE_C_DEC
+
+#include <ext/pb_assoc/detail/constructors_destructor_fn_imps.hpp>
+
+#undef PB_ASSOC_DIRECT_BASE_CAST_C_DEC
+
+#undef PB_ASSOC_CLASS_NAME
+
+#undef PB_ASSOC_DIRECT_BASE_C_DEC
+
+ private:
+ typedef PB_ASSOC_BASE_C_DEC my_base;
+ };
+
+#include <ext/pb_assoc/detail/basic_tree_assoc_cntnr/constructors_destructor_fn_imps.hpp>
+#include <ext/pb_assoc/detail/basic_tree_assoc_cntnr/policy_access_fn_imps.hpp>
+#include <ext/pb_assoc/detail/basic_tree_assoc_cntnr/range_iteration_fn_imps.hpp>
+#include <ext/pb_assoc/detail/basic_tree_assoc_cntnr/r_range_iteration_fn_imps.hpp>
+#include <ext/pb_assoc/detail/basic_tree_assoc_cntnr/node_iteration_fn_imps.hpp>
+#include <ext/pb_assoc/detail/basic_tree_assoc_cntnr/split_join_fn_imps.hpp>
+#include <ext/pb_assoc/detail/basic_tree_assoc_cntnr/erase_fn_imps.hpp>
+#include <ext/pb_assoc/detail/basic_tree_assoc_cntnr/r_erase_fn_imps.hpp>
+
+#undef PB_ASSOC_CLASS_T_DEC
+
+#undef PB_ASSOC_CLASS_C_DEC
+
+#undef PB_ASSOC_BASE_C_DEC
+
+#define PB_ASSOC_CLASS_T_DEC \
+ template< \
+ typename Key, \
+ typename Data, \
+ class Cmp_Fn, \
+ class Node_Updator, \
+ class Allocator>
+
+#define PB_ASSOC_CLASS_C_DEC \
+ basic_tree_assoc_cntnr< \
+ Key, \
+ Data, \
+ Cmp_Fn, \
+ ov_tree_ds_tag, \
+ Node_Updator, \
+ Allocator>
+
+#define PB_ASSOC_BASE_C_DEC \
+ basic_assoc_cntnr< \
+ Key, \
+ Data, \
+ ov_tree_ds_tag, \
+ pb_assoc::detail::typelist< \
+ PB_ASSOC_TYPELIST_CHAIN2( Cmp_Fn, Node_Updator) >, \
+ Allocator>
+
+ template<typename Key,
+ typename Data,
+ typename Cmp_Fn,
+ typename Node_Updator,
+ typename Allocator>
+ class basic_tree_assoc_cntnr<Key, Data, Cmp_Fn, ov_tree_ds_tag, Node_Updator, Allocator>
+ : public PB_ASSOC_BASE_C_DEC
+ {
+ public:
+ typedef typename Allocator::size_type size_type;
+
+ typedef
+ typename Allocator::template rebind<
+ Key>::other::const_reference
+ const_key_reference;
+
+ typedef Cmp_Fn cmp_fn;
+
+ typedef Node_Updator node_updator;
+
+ typedef typename PB_ASSOC_BASE_C_DEC::const_iterator const_iterator;
+
+ typedef typename PB_ASSOC_BASE_C_DEC::iterator iterator;
+
+ typedef
+ typename PB_ASSOC_BASE_C_DEC::const_node_iterator
+ const_node_iterator;
+
+ typedef typename PB_ASSOC_BASE_C_DEC::node_iterator node_iterator;
+
+ virtual
+ ~basic_tree_assoc_cntnr();
+
+ cmp_fn&
+ get_cmp_fn();
+
+ const cmp_fn&
+ get_cmp_fn() const;
+
+ node_updator&
+ get_node_updator();
+
+ const node_updator&
+ get_node_updator() const;
+
+ inline size_type
+ erase(const_key_reference r_key);
+
+ inline iterator
+ erase(iterator it);
+
+ inline node_iterator
+ node_begin()
+ {
+ return (my_base::node_begin());
+ }
+
+ inline const_node_iterator
+ node_begin() const
+ {
+ return (my_base::node_begin());
+ }
+
+ inline node_iterator
+ node_end()
+ {
+ return (my_base::node_end());
+ }
+
+ inline const_node_iterator
+ node_end() const
+ {
+ return (my_base::node_end());
+ }
+
+ void
+ join(PB_ASSOC_CLASS_C_DEC& r_other);
+
+ inline void
+ split(const_key_reference r_key, PB_ASSOC_CLASS_C_DEC& r_other);
+
+ protected:
+
+#define PB_ASSOC_CLASS_NAME basic_tree_assoc_cntnr
+
+#define PB_ASSOC_DIRECT_BASE_C_DEC PB_ASSOC_BASE_C_DEC
+
+#define PB_ASSOC_DIRECT_BASE_CAST_C_DEC \
+ PB_ASSOC_DIRECT_BASE_C_DEC
+
+#include <ext/pb_assoc/detail/constructors_destructor_fn_imps.hpp>
+
+#undef PB_ASSOC_DIRECT_BASE_CAST_C_DEC
+
+#undef PB_ASSOC_CLASS_NAME
+
+#undef PB_ASSOC_DIRECT_BASE_C_DEC
+
+ private:
+ typedef PB_ASSOC_BASE_C_DEC my_base;
+ };
+
+#include <ext/pb_assoc/detail/basic_tree_assoc_cntnr/constructors_destructor_fn_imps.hpp>
+#include <ext/pb_assoc/detail/basic_tree_assoc_cntnr/policy_access_fn_imps.hpp>
+#include <ext/pb_assoc/detail/basic_tree_assoc_cntnr/range_iteration_fn_imps.hpp>
+#include <ext/pb_assoc/detail/basic_tree_assoc_cntnr/node_iteration_fn_imps.hpp>
+#include <ext/pb_assoc/detail/basic_tree_assoc_cntnr/split_join_fn_imps.hpp>
+#include <ext/pb_assoc/detail/basic_tree_assoc_cntnr/erase_fn_imps.hpp>
+
+#undef PB_ASSOC_CLASS_T_DEC
+
+#undef PB_ASSOC_CLASS_C_DEC
+
+#undef PB_ASSOC_BASE_C_DEC
+
+#define PB_ASSOC_CLASS_T_DEC \
+ template< \
+ typename Key, \
+ typename Data, \
+ class Cmp_Fn, \
+ class DS_Tag, \
+ class Node_Updator, \
+ class Allocator>
+
+#define PB_ASSOC_CLASS_C_DEC \
+ tree_assoc_cntnr< \
+ Key, \
+ Data, \
+ Cmp_Fn, \
+ DS_Tag, \
+ Node_Updator, \
+ Allocator>
+
+#define PB_ASSOC_BASE_C_DEC \
+ basic_tree_assoc_cntnr< \
+ Key, \
+ Data, \
+ Cmp_Fn, \
+ DS_Tag, \
+ Node_Updator, \
+ Allocator>
+
+ template<typename Key, typename Data, class Cmp_Fn = std::less<Key>,
+ typename DS_Tag = rb_tree_ds_tag,
+ typename Node_Updator = pb_assoc::detail::def_node_updator,
+ typename Allocator = std::allocator<char> >
+ class tree_assoc_cntnr : public PB_ASSOC_BASE_C_DEC
+ {
+ typedef Cmp_Fn cmp_fn;
+ typedef Node_Updator node_updator;
+
+ public:
+ tree_assoc_cntnr();
+ tree_assoc_cntnr(const cmp_fn& r_cmp_fn);
+ tree_assoc_cntnr(const cmp_fn& r_cmp_fn, const Node_Updator&r);
+
+ template<typename It>
+ tree_assoc_cntnr(It first_it, It last_it);
+
+ template<typename It>
+ tree_assoc_cntnr(It first_it, It last_it, const cmp_fn& r_cmp_fn);
+
+ template<typename It>
+ tree_assoc_cntnr(It, It, const cmp_fn&, const Node_Updator&);
+
+ tree_assoc_cntnr(const PB_ASSOC_CLASS_C_DEC& r_other);
+
+ virtual
+ ~tree_assoc_cntnr();
+
+ PB_ASSOC_CLASS_C_DEC&
+ operator=(const PB_ASSOC_CLASS_C_DEC& r_other);
+
+ void
+ swap(PB_ASSOC_CLASS_C_DEC& r_other);
+
+ private:
+ typedef PB_ASSOC_BASE_C_DEC my_base;
+ };
+
+#include <ext/pb_assoc/detail/tree_assoc_cntnr/constructor_destructor_fn_imps.hpp>
+
+#undef PB_ASSOC_CLASS_T_DEC
+
+#undef PB_ASSOC_CLASS_C_DEC
+
+#undef PB_ASSOC_BASE_C_DEC
+
+#define PB_ASSOC_CLASS_T_DEC \
+ template< \
+ typename Key, \
+ typename Data, \
+ class Eq_Fn, \
+ class Update_Policy, \
+ class Allocator>
+
+#define PB_ASSOC_CLASS_C_DEC \
+ lu_assoc_cntnr< \
+ Key, \
+ Data, \
+ Eq_Fn, \
+ Update_Policy, \
+ Allocator>
+
+#define PB_ASSOC_BASE_C_DEC \
+ basic_assoc_cntnr< \
+ Key, \
+ Data, \
+ lu_ds_tag, \
+ pb_assoc::detail::typelist< \
+ PB_ASSOC_TYPELIST_CHAIN2( Eq_Fn, Update_Policy) >, \
+ Allocator>
+
+ template<typename Key,
+ typename Data,
+ typename Eq_Fn = typename pb_assoc::detail::def_eq_fn<Key>::type,
+ typename Update_Policy = pb_assoc::detail::def_update_policy::type,
+ typename Allocator = std::allocator<char> >
+ class lu_assoc_cntnr : public PB_ASSOC_BASE_C_DEC
+ {
+ public:
+ typedef Eq_Fn eq_fn;
+ typedef Allocator allocator;
+ typedef Update_Policy update_policy;
+
+ lu_assoc_cntnr();
+ lu_assoc_cntnr(const Eq_Fn& r_eq_fn);
+ lu_assoc_cntnr(const Eq_Fn& r_eq_fn, const Update_Policy& r_update_policy);
+
+ template<typename It>
+ lu_assoc_cntnr(It first_it, It last_it);
+
+ template<typename It>
+ lu_assoc_cntnr(It first_it, It last_it, const Eq_Fn& r_eq_fn);
+
+ template<typename It>
+ lu_assoc_cntnr(It, It, const Eq_Fn&, const Update_Policy&);
+
+ lu_assoc_cntnr(const PB_ASSOC_CLASS_C_DEC& r_other);
+
+ virtual
+ ~lu_assoc_cntnr();
+
+ PB_ASSOC_CLASS_C_DEC&
+ operator=(const PB_ASSOC_CLASS_C_DEC& r_other);
+
+ void
+ swap(PB_ASSOC_CLASS_C_DEC& r_other);
+
+ eq_fn&
+ get_eq_fn();
+
+ const eq_fn&
+ get_eq_fn() const;
+
+ update_policy&
+ get_update_policy();
+
+ const update_policy&
+ get_update_policy() const;
+
+ private:
+ typedef PB_ASSOC_BASE_C_DEC my_base;
+ };
+
+#include <ext/pb_assoc/detail/lu_assoc_cntnr/constructor_destructor_fn_imps.hpp>
+#include <ext/pb_assoc/detail/lu_assoc_cntnr/policy_access_fn_imps.hpp>
+
+#undef PB_ASSOC_CLASS_T_DEC
+
+#undef PB_ASSOC_CLASS_C_DEC
+
+#undef PB_ASSOC_BASE_C_DEC
+
+#undef PB_ASSOC_TYPELIST_CHAIN1
+#undef PB_ASSOC_TYPELIST_CHAIN2
+#undef PB_ASSOC_TYPELIST_CHAIN3
+#undef PB_ASSOC_TYPELIST_CHAIN4
+#undef PB_ASSOC_TYPELIST_CHAIN5
+#undef PB_ASSOC_TYPELIST_CHAIN6
+#undef PB_ASSOC_TYPELIST_CHAIN7
+#undef PB_ASSOC_TYPELIST_CHAIN8
+#undef PB_ASSOC_TYPELIST_CHAIN9
+#undef PB_ASSOC_TYPELIST_CHAIN10
+#undef PB_ASSOC_TYPELIST_CHAIN11
+#undef PB_ASSOC_TYPELIST_CHAIN12
+#undef PB_ASSOC_TYPELIST_CHAIN13
+#undef PB_ASSOC_TYPELIST_CHAIN14
+#undef PB_ASSOC_TYPELIST_CHAIN15
+
+} // namespace pb_assoc
+
+#endif // #ifndef ASSOC_CNTNR_HPP
diff --git a/libstdc++-v3/testsuite/performance/23_containers/set_insert_from_sorted.cc b/libstdc++-v3/include/ext/pb_assoc/data_type.hpp
index 48cb952a537..8584b782928 100644
--- a/libstdc++-v3/testsuite/performance/23_containers/set_insert_from_sorted.cc
+++ b/libstdc++-v3/include/ext/pb_assoc/data_type.hpp
@@ -1,3 +1,5 @@
+// -*- C++ -*-
+
// Copyright (C) 2005 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
@@ -25,46 +27,34 @@
// invalidate any other reasons why the executable file might be covered by
// the GNU General Public License.
-#include <vector>
-#include <set>
-#include <sstream>
-#include <testsuite_performance.h>
+// Copyright (C) 2004 Ami Tavory and Vladimir Dreizin, IBM-HRL.
-static const unsigned max_size = 1000000; // avoid excessive swap file use!
-static const unsigned iterations = 10; // make results less random while
-static const unsigned step = 50000; // keeping the total time reasonable
+// 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.
-// libstdc++/19433
-int main()
-{
- using namespace std;
- using namespace __gnu_test;
- time_counter time;
- resource_counter resource;
+/**
+ * @file data_tye.hpp
+ * Contains a traits class of types used by containers.
+ */
- typedef set<unsigned> the_set;
+#ifndef DATA_TYPE_HPP
+#define DATA_TYPE_HPP
- vector<unsigned> v(max_size, 0);
- for (unsigned i = 0; i != max_size; ++i)
- v[i] = i; // initialize sorted array
+namespace pb_assoc
+{
+ struct null_data_type
+ { };
- for (unsigned count = step; count <= max_size; count += step)
+ template<typename Cntnr>
+ struct compound_data_type
{
- ostringstream oss;
- oss << count;
-
- start_counters(time, resource);
- for (unsigned i = 0; i != iterations; ++i)
- {
- the_set test_set;
- the_set::iterator iter = test_set.end();
+ typedef Cntnr cntnr;
+ };
+} // namespace pb_assoc
- // each insert in amortized constant time (Table 69)
- for (unsigned j = 0; j != count; ++j)
- iter = test_set.insert(iter, v[j]);
- }
- stop_counters(time, resource);
- report_performance(__FILE__, oss.str(), time, resource);
- clear_counters(time, resource);
- }
-}
+#endif // #ifndef DATA_TYPE_HPP
diff --git a/libstdc++-v3/include/ext/pb_assoc/detail/assoc_cntnr_base.hpp b/libstdc++-v3/include/ext/pb_assoc/detail/assoc_cntnr_base.hpp
new file mode 100644
index 00000000000..bce621bb2d7
--- /dev/null
+++ b/libstdc++-v3/include/ext/pb_assoc/detail/assoc_cntnr_base.hpp
@@ -0,0 +1,346 @@
+// -*- C++ -*-
+
+// 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.
+
+// As a special exception, you may use this file as part of a free software
+// library without restriction. Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General 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 assoc_cntnr_base.hpp
+ * Contains an associative container dispatching base.
+ */
+
+#ifndef ASSOC_CNTNR_BASE_HPP
+#define ASSOC_CNTNR_BASE_HPP
+
+#include <ext/pb_assoc/detail/typelist.hpp>
+
+#define PB_ASSOC_DATA_TRUE_INDICATOR
+#include <ext/pb_assoc/detail/lu_map_/lu_map_.hpp>
+#undef PB_ASSOC_DATA_TRUE_INDICATOR
+
+#define PB_ASSOC_DATA_FALSE_INDICATOR
+#include <ext/pb_assoc/detail/lu_map_/lu_map_.hpp>
+#undef PB_ASSOC_DATA_FALSE_INDICATOR
+
+#define PB_ASSOC_DATA_TRUE_INDICATOR
+#include <ext/pb_assoc/detail/rb_tree_map_/rb_tree_.hpp>
+#undef PB_ASSOC_DATA_TRUE_INDICATOR
+
+#define PB_ASSOC_DATA_FALSE_INDICATOR
+#include <ext/pb_assoc/detail/rb_tree_map_/rb_tree_.hpp>
+#undef PB_ASSOC_DATA_FALSE_INDICATOR
+
+#define PB_ASSOC_DATA_TRUE_INDICATOR
+#include <ext/pb_assoc/detail/splay_tree_/splay_tree_.hpp>
+#undef PB_ASSOC_DATA_TRUE_INDICATOR
+
+#define PB_ASSOC_DATA_FALSE_INDICATOR
+#include <ext/pb_assoc/detail/splay_tree_/splay_tree_.hpp>
+#undef PB_ASSOC_DATA_FALSE_INDICATOR
+
+#define PB_ASSOC_DATA_TRUE_INDICATOR
+#include <ext/pb_assoc/detail/ov_tree_map_/ov_tree_map_.hpp>
+#undef PB_ASSOC_DATA_TRUE_INDICATOR
+
+#define PB_ASSOC_DATA_FALSE_INDICATOR
+#include <ext/pb_assoc/detail/ov_tree_map_/ov_tree_map_.hpp>
+#undef PB_ASSOC_DATA_FALSE_INDICATOR
+
+#define PB_ASSOC_DATA_TRUE_INDICATOR
+#include <ext/pb_assoc/detail/cc_ht_map_/cc_ht_map_.hpp>
+#undef PB_ASSOC_DATA_TRUE_INDICATOR
+
+#define PB_ASSOC_DATA_FALSE_INDICATOR
+#include <ext/pb_assoc/detail/cc_ht_map_/cc_ht_map_.hpp>
+#undef PB_ASSOC_DATA_FALSE_INDICATOR
+
+#define PB_ASSOC_DATA_TRUE_INDICATOR
+#include <ext/pb_assoc/detail/gp_ht_map_/gp_ht_map_.hpp>
+#undef PB_ASSOC_DATA_TRUE_INDICATOR
+
+#define PB_ASSOC_DATA_FALSE_INDICATOR
+#include <ext/pb_assoc/detail/gp_ht_map_/gp_ht_map_.hpp>
+#undef PB_ASSOC_DATA_FALSE_INDICATOR
+
+namespace pb_assoc
+{
+
+ namespace detail
+ {
+
+ template<typename Key,
+ typename Data,
+ class Data_Structure_Taq,
+ class Policy_Tl,
+ class Allocator>
+ struct assoc_cntnr_base;
+
+ template<typename Key, typename Data, class Policy_Tl, class Allocator>
+ struct assoc_cntnr_base<
+ Key,
+ Data,
+ lu_ds_tag,
+ Policy_Tl,
+ Allocator>
+ {
+ typedef
+ lu_map_data_<
+ Key,
+ Data,
+ typename typelist_at_index<Policy_Tl, 0>::type,
+ Allocator,
+ typename typelist_at_index<Policy_Tl, 1>::type>
+ type;
+ };
+
+ template<typename Key, class Policy_Tl, class Allocator>
+ struct assoc_cntnr_base<
+ Key,
+ null_data_type,
+ lu_ds_tag,
+ Policy_Tl,
+ Allocator>
+ {
+ typedef
+ lu_map_no_data_<
+ Key,
+ null_data_type,
+ typename typelist_at_index<Policy_Tl, 0>::type,
+ Allocator,
+ typename typelist_at_index<Policy_Tl, 1>::type>
+ type;
+ };
+
+ template<typename Key, typename Data, class Policy_Tl, class Allocator>
+ struct assoc_cntnr_base<
+ Key,
+ Data,
+ rb_tree_ds_tag,
+ Policy_Tl,
+ Allocator>
+ {
+ typedef
+ rb_tree_data_<
+ Key,
+ Data,
+ typename typelist_at_index<Policy_Tl, 0>::type,
+ Allocator,
+ typename typelist_at_index<Policy_Tl, 1>::type>
+ type;
+ };
+
+ template<typename Key, class Policy_Tl, class Allocator>
+ struct assoc_cntnr_base<
+ Key,
+ null_data_type,
+ rb_tree_ds_tag,
+ Policy_Tl,
+ Allocator>
+ {
+ typedef
+ rb_tree_no_data_<
+ Key,
+ null_data_type,
+ typename typelist_at_index<Policy_Tl, 0>::type,
+ Allocator,
+ typename typelist_at_index<Policy_Tl, 1>::type>
+ type;
+ };
+
+ template<typename Key, typename Data, class Policy_Tl, class Allocator>
+ struct assoc_cntnr_base<
+ Key,
+ Data,
+ splay_tree_ds_tag,
+ Policy_Tl,
+ Allocator>
+
+ {
+ typedef
+ splay_tree_data_<
+ Key,
+ Data,
+ typename typelist_at_index<Policy_Tl, 0>::type,
+ Allocator,
+ typename typelist_at_index<Policy_Tl, 1>::type>
+ type;
+ };
+
+ template<typename Key, class Policy_Tl, class Allocator>
+ struct assoc_cntnr_base<
+ Key,
+ null_data_type,
+ splay_tree_ds_tag,
+ Policy_Tl,
+ Allocator>
+ {
+ typedef
+ splay_tree_no_data_<
+ Key,
+ null_data_type,
+ typename typelist_at_index<Policy_Tl, 0>::type,
+ Allocator,
+ typename typelist_at_index<Policy_Tl, 1>::type>
+ type;
+ };
+
+ template<typename Key, typename Data, class Policy_Tl, class Allocator>
+ struct assoc_cntnr_base<
+ Key,
+ Data,
+ ov_tree_ds_tag,
+ Policy_Tl,
+ Allocator>
+ {
+ typedef
+ ov_tree_data_<
+ Key,
+ Data,
+ typename typelist_at_index<Policy_Tl, 0>::type,
+ Allocator,
+ typename typelist_at_index<Policy_Tl, 1>::type>
+ type;
+ };
+
+ template<typename Key, class Policy_Tl, class Allocator>
+ struct assoc_cntnr_base<
+ Key,
+ null_data_type,
+ ov_tree_ds_tag,
+ Policy_Tl,
+ Allocator>
+ {
+ typedef
+ ov_tree_no_data_<
+ Key,
+ null_data_type,
+ typename typelist_at_index<Policy_Tl, 0>::type,
+ Allocator,
+ typename typelist_at_index<Policy_Tl, 1>::type>
+ type;
+ };
+
+ template<typename Key, typename Data, class Policy_Tl, class Allocator>
+ struct assoc_cntnr_base<
+ Key,
+ Data,
+ cc_hash_ds_tag,
+ Policy_Tl,
+ Allocator>
+ {
+ typedef
+ cc_ht_map_data_<
+ Key,
+ Data,
+ typename typelist_at_index<Policy_Tl, 0>::type,
+ typename typelist_at_index<Policy_Tl, 1>::type,
+ Allocator,
+ typelist_at_index<Policy_Tl, 3>::type::value,
+ typename typelist_at_index<Policy_Tl, 4>::type,
+ typename typelist_at_index<Policy_Tl, 2>::type>
+ type;
+ };
+
+ template<typename Key, class Policy_Tl, class Allocator>
+ struct assoc_cntnr_base<
+ Key,
+ null_data_type,
+ cc_hash_ds_tag,
+ Policy_Tl,
+ Allocator>
+ {
+ typedef
+ cc_ht_map_no_data_<
+ Key,
+ null_data_type,
+ typename typelist_at_index<Policy_Tl, 0>::type,
+ typename typelist_at_index<Policy_Tl, 1>::type,
+ Allocator,
+ typelist_at_index<Policy_Tl, 3>::type::value,
+ typename typelist_at_index<Policy_Tl, 4>::type,
+ typename typelist_at_index<Policy_Tl, 2>::type>
+ type;
+ };
+
+ template<typename Key, typename Data, class Policy_Tl, class Allocator>
+ struct assoc_cntnr_base<
+ Key,
+ Data,
+ gp_hash_ds_tag,
+ Policy_Tl,
+ Allocator>
+ {
+ typedef
+ gp_ht_map_data_<
+ Key,
+ Data,
+ typename typelist_at_index<Policy_Tl, 0>::type,
+ typename typelist_at_index<Policy_Tl, 1>::type,
+ Allocator,
+ typelist_at_index<Policy_Tl, 3>::type::value,
+ typename typelist_at_index<Policy_Tl, 4>::type,
+ typename typelist_at_index<Policy_Tl, 5>::type,
+ typename typelist_at_index<Policy_Tl, 2>::type>
+ type;
+ };
+
+ template<typename Key, class Policy_Tl, class Allocator>
+ struct assoc_cntnr_base<
+ Key,
+ null_data_type,
+ gp_hash_ds_tag,
+ Policy_Tl,
+ Allocator>
+ {
+ typedef
+ gp_ht_map_no_data_<
+ Key,
+ null_data_type,
+ typename typelist_at_index<Policy_Tl, 0>::type,
+ typename typelist_at_index<Policy_Tl, 1>::type,
+ Allocator,
+ typelist_at_index<Policy_Tl, 3>::type::value,
+ typename typelist_at_index<Policy_Tl, 4>::type,
+ typename typelist_at_index<Policy_Tl, 5>::type,
+ typename typelist_at_index<Policy_Tl, 2>::type>
+ type;
+ };
+
+ } // namespace detail
+
+} // namespace pb_assoc
+
+#endif // #ifndef ASSOC_CNTNR_BASE_HPP
diff --git a/libstdc++-v3/include/ext/pb_assoc/detail/basic_assoc_cntnr/constructor_destructor_fn_imps.hpp b/libstdc++-v3/include/ext/pb_assoc/detail/basic_assoc_cntnr/constructor_destructor_fn_imps.hpp
new file mode 100644
index 00000000000..abe851ceda4
--- /dev/null
+++ b/libstdc++-v3/include/ext/pb_assoc/detail/basic_assoc_cntnr/constructor_destructor_fn_imps.hpp
@@ -0,0 +1,164 @@
+// -*- C++ -*-
+
+// 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.
+
+// As a special exception, you may use this file as part of a free software
+// library without restriction. Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General 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 constructor_destructor_fn_imps.hpp
+ * Contains implementations of constructors, destructors,
+ * and related functions.
+ */
+
+PB_ASSOC_CLASS_T_DEC
+inline
+PB_ASSOC_CLASS_C_DEC::
+basic_assoc_cntnr()
+{ }
+
+PB_ASSOC_CLASS_T_DEC
+template<typename T0>
+inline
+PB_ASSOC_CLASS_C_DEC::
+basic_assoc_cntnr(T0 t0) :
+ PB_ASSOC_DIRECT_BASE_C_DEC(t0)
+{ }
+
+PB_ASSOC_CLASS_T_DEC
+template<typename T0, typename T1>
+inline
+PB_ASSOC_CLASS_C_DEC::
+basic_assoc_cntnr(T0 t0, T1 t1) :
+ PB_ASSOC_DIRECT_BASE_C_DEC(t0, t1)
+{ }
+
+PB_ASSOC_CLASS_T_DEC
+template<typename T0, typename T1, typename T2>
+inline
+PB_ASSOC_CLASS_C_DEC::
+basic_assoc_cntnr(T0 t0, T1 t1, T2 t2) :
+ PB_ASSOC_DIRECT_BASE_C_DEC(t0, t1, t2)
+{ }
+
+PB_ASSOC_CLASS_T_DEC
+template<typename T0, typename T1, typename T2, typename T3>
+inline
+PB_ASSOC_CLASS_C_DEC::
+basic_assoc_cntnr(T0 t0, T1 t1, T2 t2, T3 t3) :
+ PB_ASSOC_DIRECT_BASE_C_DEC(t0, t1, t2, t3)
+{ }
+
+PB_ASSOC_CLASS_T_DEC
+template<typename T0,
+ typename T1,
+ typename T2,
+ typename T3,
+ typename T4>
+inline
+PB_ASSOC_CLASS_C_DEC::
+basic_assoc_cntnr(T0 t0, T1 t1, T2 t2, T3 t3, T4 t4) :
+ PB_ASSOC_DIRECT_BASE_C_DEC(t0, t1, t2, t3, t4)
+{ }
+
+PB_ASSOC_CLASS_T_DEC
+template<typename T0,
+ typename T1,
+ typename T2,
+ typename T3,
+ typename T4,
+ typename T5>
+inline
+PB_ASSOC_CLASS_C_DEC::
+basic_assoc_cntnr(T0 t0, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5) :
+ PB_ASSOC_DIRECT_BASE_C_DEC(t0, t1, t2, t3, t4, t5)
+{ }
+
+PB_ASSOC_CLASS_T_DEC
+template<typename T0,
+ typename T1,
+ typename T2,
+ typename T3,
+ typename T4,
+ typename T5,
+ typename T6>
+inline
+PB_ASSOC_CLASS_C_DEC::
+basic_assoc_cntnr(T0 t0, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6) :
+ PB_ASSOC_DIRECT_BASE_C_DEC(t0, t1, t2, t3, t4, t5, t6)
+{ }
+
+PB_ASSOC_CLASS_T_DEC
+template<typename T0,
+ typename T1,
+ typename T2,
+ typename T3,
+ typename T4,
+ typename T5,
+ typename T6,
+ typename T7>
+inline
+PB_ASSOC_CLASS_C_DEC::
+basic_assoc_cntnr(T0 t0, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7) :
+ PB_ASSOC_DIRECT_BASE_C_DEC(t0, t1, t2, t3, t4, t5, t6, t7)
+{ }
+
+PB_ASSOC_CLASS_T_DEC
+template<typename T0,
+ typename T1,
+ typename T2,
+ typename T3,
+ typename T4,
+ typename T5,
+ typename T6,
+ typename T7,
+ typename T8>
+inline
+PB_ASSOC_CLASS_C_DEC::
+basic_assoc_cntnr(T0 t0, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8) :
+ PB_ASSOC_DIRECT_BASE_C_DEC(t0, t1, t2, t3, t4, t5, t6, t7, t8)
+{ }
+
+PB_ASSOC_CLASS_T_DEC
+inline
+PB_ASSOC_CLASS_C_DEC::
+basic_assoc_cntnr(const PB_ASSOC_CLASS_C_DEC& r_other) :
+ PB_ASSOC_DIRECT_BASE_C_DEC((const PB_ASSOC_DIRECT_BASE_C_DEC& )r_other)
+{ }
+
+PB_ASSOC_CLASS_T_DEC
+PB_ASSOC_CLASS_C_DEC::
+~basic_assoc_cntnr()
+{ }
diff --git a/libstdc++-v3/include/ext/pb_assoc/detail/basic_assoc_cntnr/constructors_destructor_fn_imps.hpp b/libstdc++-v3/include/ext/pb_assoc/detail/basic_assoc_cntnr/constructors_destructor_fn_imps.hpp
new file mode 100644
index 00000000000..9f85fad2004
--- /dev/null
+++ b/libstdc++-v3/include/ext/pb_assoc/detail/basic_assoc_cntnr/constructors_destructor_fn_imps.hpp
@@ -0,0 +1,48 @@
+// -*- C++ -*-
+
+// 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.
+
+// As a special exception, you may use this file as part of a free software
+// library without restriction. Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General 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 constructors_destructor_fn_imps.hpp
+ * Contains constructors and destructor implementation.
+ */
+
+PB_ASSOC_CLASS_T_DEC
+PB_ASSOC_CLASS_C_DEC::
+~basic_assoc_cntnr()
+{ }
diff --git a/libstdc++-v3/include/ext/pb_assoc/detail/basic_assoc_cntnr/d_extract_key.hpp b/libstdc++-v3/include/ext/pb_assoc/detail/basic_assoc_cntnr/d_extract_key.hpp
new file mode 100644
index 00000000000..31794ecf0d8
--- /dev/null
+++ b/libstdc++-v3/include/ext/pb_assoc/detail/basic_assoc_cntnr/d_extract_key.hpp
@@ -0,0 +1,51 @@
+// -*- C++ -*-
+
+// 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.
+
+// As a special exception, you may use this file as part of a free software
+// library without restriction. Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General 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 d_extract_key.hpp
+ * Contains implementations of info related functions.
+ */
+
+PB_ASSOC_CLASS_T_DEC
+inline typename PB_ASSOC_CLASS_C_DEC::const_key_reference
+PB_ASSOC_CLASS_C_DEC::
+extract_key(const_reference r_val)
+{
+ return (r_val.first);
+}
diff --git a/libstdc++-v3/include/ext/pb_assoc/detail/basic_assoc_cntnr/d_find_fn_imps.hpp b/libstdc++-v3/include/ext/pb_assoc/detail/basic_assoc_cntnr/d_find_fn_imps.hpp
new file mode 100644
index 00000000000..1c3c40252b0
--- /dev/null
+++ b/libstdc++-v3/include/ext/pb_assoc/detail/basic_assoc_cntnr/d_find_fn_imps.hpp
@@ -0,0 +1,51 @@
+// -*- C++ -*-
+
+// 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.
+
+// As a special exception, you may use this file as part of a free software
+// library without restriction. Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General 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 d_find_fn_imps.hpp
+ * Contains implementations of gp_ht_maps's find related functions.
+ */
+
+PB_ASSOC_CLASS_T_DEC
+inline typename PB_ASSOC_CLASS_C_DEC::const_data_reference
+PB_ASSOC_CLASS_C_DEC::
+operator[](const_key_reference r_key) const
+{
+ return (my_base::const_subscript_imp(r_key));
+}
diff --git a/libstdc++-v3/include/ext/pb_assoc/detail/basic_assoc_cntnr/d_insert_fn_imps.hpp b/libstdc++-v3/include/ext/pb_assoc/detail/basic_assoc_cntnr/d_insert_fn_imps.hpp
new file mode 100644
index 00000000000..e7878ce22b4
--- /dev/null
+++ b/libstdc++-v3/include/ext/pb_assoc/detail/basic_assoc_cntnr/d_insert_fn_imps.hpp
@@ -0,0 +1,51 @@
+// -*- C++ -*-
+
+// 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.
+
+// As a special exception, you may use this file as part of a free software
+// library without restriction. Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General 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 d_insert_fn_imps.hpp
+ * Contains implementations of gp_ht_maps's erase related functions.
+ */
+
+PB_ASSOC_CLASS_T_DEC
+inline typename PB_ASSOC_CLASS_C_DEC::data_reference
+PB_ASSOC_CLASS_C_DEC::
+operator[](const_key_reference r_key)
+{
+ return (my_base::subscript_imp(r_key));
+}
diff --git a/libstdc++-v3/include/ext/pb_assoc/detail/basic_assoc_cntnr/erase_fn_imps.hpp b/libstdc++-v3/include/ext/pb_assoc/detail/basic_assoc_cntnr/erase_fn_imps.hpp
new file mode 100644
index 00000000000..909cbeb1bb9
--- /dev/null
+++ b/libstdc++-v3/include/ext/pb_assoc/detail/basic_assoc_cntnr/erase_fn_imps.hpp
@@ -0,0 +1,68 @@
+// -*- C++ -*-
+
+// 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.
+
+// As a special exception, you may use this file as part of a free software
+// library without restriction. Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General 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 erase_fn_imps.hpp
+ * Contains implementations of gp_ht_maps's erase related functions.
+ */
+
+PB_ASSOC_CLASS_T_DEC
+inline typename PB_ASSOC_CLASS_C_DEC::size_type
+PB_ASSOC_CLASS_C_DEC::
+erase(const_key_reference r_key)
+{
+ return (my_base::erase(r_key));
+}
+
+PB_ASSOC_CLASS_T_DEC
+void
+PB_ASSOC_CLASS_C_DEC::
+clear()
+{
+ return (my_base::clear());
+}
+
+PB_ASSOC_CLASS_T_DEC
+template<class Pred>
+inline typename PB_ASSOC_CLASS_C_DEC::size_type
+PB_ASSOC_CLASS_C_DEC::
+erase_if(Pred pred)
+{
+ return (my_base::erase_if(pred));
+}
diff --git a/libstdc++-v3/include/ext/pb_assoc/detail/basic_assoc_cntnr/extract_key.hpp b/libstdc++-v3/include/ext/pb_assoc/detail/basic_assoc_cntnr/extract_key.hpp
new file mode 100644
index 00000000000..cd24328aa77
--- /dev/null
+++ b/libstdc++-v3/include/ext/pb_assoc/detail/basic_assoc_cntnr/extract_key.hpp
@@ -0,0 +1,51 @@
+// -*- C++ -*-
+
+// 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.
+
+// As a special exception, you may use this file as part of a free software
+// library without restriction. Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General 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 extract_key.hpp
+ * Contains implementations of info related functions.
+ */
+
+PB_ASSOC_CLASS_T_DEC
+inline typename PB_ASSOC_CLASS_C_DEC::const_key_reference
+PB_ASSOC_CLASS_C_DEC::
+extract_key(const_reference r_val)
+{
+ return (r_val);
+}
diff --git a/libstdc++-v3/include/ext/pb_assoc/detail/basic_assoc_cntnr/info_fn_imps.hpp b/libstdc++-v3/include/ext/pb_assoc/detail/basic_assoc_cntnr/info_fn_imps.hpp
new file mode 100644
index 00000000000..07a1ec885d3
--- /dev/null
+++ b/libstdc++-v3/include/ext/pb_assoc/detail/basic_assoc_cntnr/info_fn_imps.hpp
@@ -0,0 +1,67 @@
+// -*- C++ -*-
+
+// 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.
+
+// As a special exception, you may use this file as part of a free software
+// library without restriction. Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General 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 info_fn_imps.hpp
+ * Contains implementations of info related functions.
+ */
+
+PB_ASSOC_CLASS_T_DEC
+inline typename PB_ASSOC_CLASS_C_DEC::size_type
+PB_ASSOC_CLASS_C_DEC::
+size() const
+{
+ return (my_base::size());
+}
+
+PB_ASSOC_CLASS_T_DEC
+inline typename PB_ASSOC_CLASS_C_DEC::size_type
+PB_ASSOC_CLASS_C_DEC::
+max_size() const
+{
+ return (my_base::max_size());
+}
+
+PB_ASSOC_CLASS_T_DEC
+inline bool
+PB_ASSOC_CLASS_C_DEC::
+empty() const
+{
+ return (my_base::empty());
+}
diff --git a/libstdc++-v3/include/ext/pb_assoc/detail/basic_assoc_cntnr/insert_fn_imps.hpp b/libstdc++-v3/include/ext/pb_assoc/detail/basic_assoc_cntnr/insert_fn_imps.hpp
new file mode 100644
index 00000000000..919402e7a11
--- /dev/null
+++ b/libstdc++-v3/include/ext/pb_assoc/detail/basic_assoc_cntnr/insert_fn_imps.hpp
@@ -0,0 +1,51 @@
+// -*- C++ -*-
+
+// 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.
+
+// As a special exception, you may use this file as part of a free software
+// library without restriction. Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General 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 insert_fn_imps.hpp
+ * Contains implementations of gp_ht_maps's erase related functions.
+ */
+
+PB_ASSOC_CLASS_T_DEC
+inline std::pair<typename PB_ASSOC_CLASS_C_DEC::find_iterator, bool>
+PB_ASSOC_CLASS_C_DEC::
+insert(const_reference r_value)
+{
+ return (my_base::insert(r_value));
+}
diff --git a/libstdc++-v3/include/ext/pb_assoc/detail/basic_assoc_cntnr/iterators_fn_imps.hpp b/libstdc++-v3/include/ext/pb_assoc/detail/basic_assoc_cntnr/iterators_fn_imps.hpp
new file mode 100644
index 00000000000..c2c095480a8
--- /dev/null
+++ b/libstdc++-v3/include/ext/pb_assoc/detail/basic_assoc_cntnr/iterators_fn_imps.hpp
@@ -0,0 +1,76 @@
+// -*- C++ -*-
+
+// 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.
+
+// As a special exception, you may use this file as part of a free software
+// library without restriction. Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General 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 iterators_fn_imps.hpp
+ * Contains implementations of gp_ht_map_'s iterators related functions, e.g.,
+ * begin().
+ */
+
+PB_ASSOC_CLASS_T_DEC
+inline typename PB_ASSOC_CLASS_C_DEC::iterator
+PB_ASSOC_CLASS_C_DEC::
+begin()
+{
+ return (my_base::begin());
+}
+
+PB_ASSOC_CLASS_T_DEC
+inline typename PB_ASSOC_CLASS_C_DEC::iterator
+PB_ASSOC_CLASS_C_DEC::
+end()
+{
+ return (my_base::end());
+}
+
+PB_ASSOC_CLASS_T_DEC
+inline typename PB_ASSOC_CLASS_C_DEC::const_iterator
+PB_ASSOC_CLASS_C_DEC::
+begin() const
+{
+ return (my_base::begin());
+}
+
+PB_ASSOC_CLASS_T_DEC
+inline typename PB_ASSOC_CLASS_C_DEC::const_iterator
+PB_ASSOC_CLASS_C_DEC::
+end() const
+{
+ return (my_base::end());
+}
diff --git a/libstdc++-v3/include/ext/pb_assoc/detail/basic_hash_assoc_cntnr/constructor_destructor_fn_imps.hpp b/libstdc++-v3/include/ext/pb_assoc/detail/basic_hash_assoc_cntnr/constructor_destructor_fn_imps.hpp
new file mode 100644
index 00000000000..c9d33302c8a
--- /dev/null
+++ b/libstdc++-v3/include/ext/pb_assoc/detail/basic_hash_assoc_cntnr/constructor_destructor_fn_imps.hpp
@@ -0,0 +1,50 @@
+// -*- C++ -*-
+
+// 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.
+
+// As a special exception, you may use this file as part of a free software
+// library without restriction. Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General 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 constructor_destructor_fn_imps.hpp
+ * Contains implementations of cc_ht's constructors, destructor,
+ * and related functions.
+ */
+
+PB_ASSOC_CLASS_T_DEC
+PB_ASSOC_CLASS_C_DEC::
+~PB_ASSOC_CLASS_NAME()
+{ }
+
diff --git a/libstdc++-v3/include/ext/pb_assoc/detail/basic_hash_assoc_cntnr/constructors_destructor_fn_imps.hpp b/libstdc++-v3/include/ext/pb_assoc/detail/basic_hash_assoc_cntnr/constructors_destructor_fn_imps.hpp
new file mode 100644
index 00000000000..ba5cb5f9ecf
--- /dev/null
+++ b/libstdc++-v3/include/ext/pb_assoc/detail/basic_hash_assoc_cntnr/constructors_destructor_fn_imps.hpp
@@ -0,0 +1,50 @@
+// -*- C++ -*-
+
+// 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.
+
+// As a special exception, you may use this file as part of a free software
+// library without restriction. Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General 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 constructor_destructor_fn_imps.hpp
+ * Contains implementations of cc_ht's constructors, destructor,
+ * and related functions.
+ */
+
+PB_ASSOC_CLASS_T_DEC
+PB_ASSOC_CLASS_C_DEC::
+~basic_hash_assoc_cntnr()
+{ }
+
diff --git a/libstdc++-v3/include/ext/pb_assoc/detail/basic_hash_assoc_cntnr/resize_fn_imps.hpp b/libstdc++-v3/include/ext/pb_assoc/detail/basic_hash_assoc_cntnr/resize_fn_imps.hpp
new file mode 100644
index 00000000000..fc5cd65c6f8
--- /dev/null
+++ b/libstdc++-v3/include/ext/pb_assoc/detail/basic_hash_assoc_cntnr/resize_fn_imps.hpp
@@ -0,0 +1,51 @@
+// -*- C++ -*-
+
+// 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.
+
+// As a special exception, you may use this file as part of a free software
+// library without restriction. Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General 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 resize_fn_imps.hpp
+ * Contains implementations of resize functions
+ */
+
+PB_ASSOC_CLASS_T_DEC
+void
+PB_ASSOC_CLASS_C_DEC::
+do_resize(size_type new_size)
+{
+ return (my_base::do_resize(new_size));
+}
diff --git a/libstdc++-v3/include/ext/pb_assoc/detail/basic_tree_assoc_cntnr/constructor_destructor_fn_imps.hpp b/libstdc++-v3/include/ext/pb_assoc/detail/basic_tree_assoc_cntnr/constructor_destructor_fn_imps.hpp
new file mode 100644
index 00000000000..82f55368fe4
--- /dev/null
+++ b/libstdc++-v3/include/ext/pb_assoc/detail/basic_tree_assoc_cntnr/constructor_destructor_fn_imps.hpp
@@ -0,0 +1,50 @@
+// -*- C++ -*-
+
+// 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.
+
+// As a special exception, you may use this file as part of a free software
+// library without restriction. Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General 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 constructor_destructor_fn_imps.hpp
+ * Contains implementations of cc_ht's constructors, destructor,
+ * and related functions.
+ */
+
+PB_ASSOC_CLASS_T_DEC
+PB_ASSOC_CLASS_C_DEC::
+~basic_tree_assoc_cntnr()
+{ }
+
diff --git a/libstdc++-v3/include/ext/pb_assoc/detail/basic_tree_assoc_cntnr/constructors_destructor_fn_imps.hpp b/libstdc++-v3/include/ext/pb_assoc/detail/basic_tree_assoc_cntnr/constructors_destructor_fn_imps.hpp
new file mode 100644
index 00000000000..82f55368fe4
--- /dev/null
+++ b/libstdc++-v3/include/ext/pb_assoc/detail/basic_tree_assoc_cntnr/constructors_destructor_fn_imps.hpp
@@ -0,0 +1,50 @@
+// -*- C++ -*-
+
+// 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.
+
+// As a special exception, you may use this file as part of a free software
+// library without restriction. Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General 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 constructor_destructor_fn_imps.hpp
+ * Contains implementations of cc_ht's constructors, destructor,
+ * and related functions.
+ */
+
+PB_ASSOC_CLASS_T_DEC
+PB_ASSOC_CLASS_C_DEC::
+~basic_tree_assoc_cntnr()
+{ }
+
diff --git a/libstdc++-v3/include/ext/pb_assoc/detail/basic_tree_assoc_cntnr/erase_fn_imps.hpp b/libstdc++-v3/include/ext/pb_assoc/detail/basic_tree_assoc_cntnr/erase_fn_imps.hpp
new file mode 100644
index 00000000000..a69f6350dbc
--- /dev/null
+++ b/libstdc++-v3/include/ext/pb_assoc/detail/basic_tree_assoc_cntnr/erase_fn_imps.hpp
@@ -0,0 +1,60 @@
+// -*- C++ -*-
+
+// 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.
+
+// As a special exception, you may use this file as part of a free software
+// library without restriction. Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General 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 erase_fn_imps.hpp
+ * Contains implementations of rb_tree's find related functions,
+ * common to all tree container types.
+ */
+
+PB_ASSOC_CLASS_T_DEC
+inline typename PB_ASSOC_CLASS_C_DEC::size_type
+PB_ASSOC_CLASS_C_DEC::
+erase(const_key_reference r_key)
+{
+ return (my_base::erase(r_key));
+}
+
+PB_ASSOC_CLASS_T_DEC
+inline typename PB_ASSOC_CLASS_C_DEC::iterator
+PB_ASSOC_CLASS_C_DEC::
+erase(iterator it)
+{
+ return (my_base::erase(it));
+}
diff --git a/libstdc++-v3/include/ext/pb_assoc/detail/basic_tree_assoc_cntnr/node_iteration_fn_imps.hpp b/libstdc++-v3/include/ext/pb_assoc/detail/basic_tree_assoc_cntnr/node_iteration_fn_imps.hpp
new file mode 100644
index 00000000000..6f3f42370f3
--- /dev/null
+++ b/libstdc++-v3/include/ext/pb_assoc/detail/basic_tree_assoc_cntnr/node_iteration_fn_imps.hpp
@@ -0,0 +1,44 @@
+// -*- C++ -*-
+
+// 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.
+
+// As a special exception, you may use this file as part of a free software
+// library without restriction. Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General 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 node_iteration_fn_imps.hpp
+ * Contains a rb_tree set implementation.
+ */
+
diff --git a/libstdc++-v3/include/ext/pb_assoc/detail/basic_tree_assoc_cntnr/policy_access_fn_imps.hpp b/libstdc++-v3/include/ext/pb_assoc/detail/basic_tree_assoc_cntnr/policy_access_fn_imps.hpp
new file mode 100644
index 00000000000..c3e3794e3fb
--- /dev/null
+++ b/libstdc++-v3/include/ext/pb_assoc/detail/basic_tree_assoc_cntnr/policy_access_fn_imps.hpp
@@ -0,0 +1,76 @@
+// -*- C++ -*-
+
+// 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.
+
+// As a special exception, you may use this file as part of a free software
+// library without restriction. Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General 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 policy_access_fn_imps.hpp
+ * Contains implementation of rb trees
+ */
+
+PB_ASSOC_CLASS_T_DEC
+Cmp_Fn&
+PB_ASSOC_CLASS_C_DEC::
+get_cmp_fn()
+{
+ return (*this);
+}
+
+PB_ASSOC_CLASS_T_DEC
+const Cmp_Fn&
+PB_ASSOC_CLASS_C_DEC::
+get_cmp_fn() const
+{
+ return (*this);
+}
+
+PB_ASSOC_CLASS_T_DEC
+Node_Updator&
+PB_ASSOC_CLASS_C_DEC::
+get_node_updator()
+{
+ return (*this);
+}
+
+PB_ASSOC_CLASS_T_DEC
+const Node_Updator&
+PB_ASSOC_CLASS_C_DEC::
+get_node_updator() const
+{
+ return (*this);
+}
+
diff --git a/libstdc++-v3/include/ext/pb_assoc/detail/basic_tree_assoc_cntnr/r_erase_fn_imps.hpp b/libstdc++-v3/include/ext/pb_assoc/detail/basic_tree_assoc_cntnr/r_erase_fn_imps.hpp
new file mode 100644
index 00000000000..4dbaaec4600
--- /dev/null
+++ b/libstdc++-v3/include/ext/pb_assoc/detail/basic_tree_assoc_cntnr/r_erase_fn_imps.hpp
@@ -0,0 +1,44 @@
+// -*- C++ -*-
+
+// 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.
+
+// As a special exception, you may use this file as part of a free software
+// library without restriction. Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General 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 erase_fn_imps.hpp
+ * Contains implementations of rb_tree's find related functions,
+ * common to all tree container types.
+ */
diff --git a/libstdc++-v3/include/ext/pb_assoc/detail/basic_tree_assoc_cntnr/r_range_iteration_fn_imps.hpp b/libstdc++-v3/include/ext/pb_assoc/detail/basic_tree_assoc_cntnr/r_range_iteration_fn_imps.hpp
new file mode 100644
index 00000000000..67a2abaa9fe
--- /dev/null
+++ b/libstdc++-v3/include/ext/pb_assoc/detail/basic_tree_assoc_cntnr/r_range_iteration_fn_imps.hpp
@@ -0,0 +1,43 @@
+// -*- C++ -*-
+
+// 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.
+
+// As a special exception, you may use this file as part of a free software
+// library without restriction. Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General 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 range_iteration_fn_imps.hpp
+ * Contains a rb_tree set implementation.
+ */
diff --git a/libstdc++-v3/include/ext/pb_assoc/detail/basic_tree_assoc_cntnr/range_iteration_fn_imps.hpp b/libstdc++-v3/include/ext/pb_assoc/detail/basic_tree_assoc_cntnr/range_iteration_fn_imps.hpp
new file mode 100644
index 00000000000..67a2abaa9fe
--- /dev/null
+++ b/libstdc++-v3/include/ext/pb_assoc/detail/basic_tree_assoc_cntnr/range_iteration_fn_imps.hpp
@@ -0,0 +1,43 @@
+// -*- C++ -*-
+
+// 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.
+
+// As a special exception, you may use this file as part of a free software
+// library without restriction. Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General 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 range_iteration_fn_imps.hpp
+ * Contains a rb_tree set implementation.
+ */
diff --git a/libstdc++-v3/include/ext/pb_assoc/detail/basic_tree_assoc_cntnr/split_join_fn_imps.hpp b/libstdc++-v3/include/ext/pb_assoc/detail/basic_tree_assoc_cntnr/split_join_fn_imps.hpp
new file mode 100644
index 00000000000..18d30ba1dc6
--- /dev/null
+++ b/libstdc++-v3/include/ext/pb_assoc/detail/basic_tree_assoc_cntnr/split_join_fn_imps.hpp
@@ -0,0 +1,60 @@
+// -*- C++ -*-
+
+// 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.
+
+// As a special exception, you may use this file as part of a free software
+// library without restriction. Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General 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 split_join_fn_imps.hpp
+ * Contains implementation of rb trees
+ */
+
+PB_ASSOC_CLASS_T_DEC
+inline void
+PB_ASSOC_CLASS_C_DEC::
+join(PB_ASSOC_CLASS_C_DEC& r_other)
+{
+ return (my_base::join(r_other));
+}
+
+PB_ASSOC_CLASS_T_DEC
+inline void
+PB_ASSOC_CLASS_C_DEC::
+split(const_key_reference r_key, PB_ASSOC_CLASS_C_DEC& r_other)
+{
+ my_base::split(r_key, r_other);
+}
+
diff --git a/libstdc++-v3/include/ext/pb_assoc/detail/bin_search_tree_/bin_search_tree_.hpp b/libstdc++-v3/include/ext/pb_assoc/detail/bin_search_tree_/bin_search_tree_.hpp
new file mode 100644
index 00000000000..5667f0ac8bf
--- /dev/null
+++ b/libstdc++-v3/include/ext/pb_assoc/detail/bin_search_tree_/bin_search_tree_.hpp
@@ -0,0 +1,525 @@
+// -*- C++ -*-
+
+// 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.
+
+// As a special exception, you may use this file as part of a free software
+// library without restriction. Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General 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 bin_search_tree_.hpp
+ * Contains an implementation class for bin_search_tree_.
+ */
+/*
+ * This implementation uses an idea from the SGI STL (using a "header" node
+ * which is needed for efficient iteration).
+ */
+
+#include <ext/pb_assoc/exception.hpp>
+#include <ext/pb_assoc/detail/eq_fn/eq_by_less.hpp>
+#include <ext/pb_assoc/detail/types_traits.hpp>
+#include <ext/pb_assoc/detail/map_debug_base.hpp>
+#include <ext/pb_assoc/tree_policy.hpp>
+#include <ext/pb_assoc/detail/cond_dealtor.hpp>
+#include <ext/pb_assoc/detail/type_utils.hpp>
+#include <utility>
+#include <functional>
+#include <assert.h>
+
+namespace pb_assoc
+{
+
+ namespace detail
+ {
+
+#ifdef PB_ASSOC_BIN_SEARCH_TREE_DEBUG_
+#define PB_ASSOC_DBG_ASSERT(X) assert(X)
+#define PB_ASSOC_DBG_VERIFY(X) assert(X)
+#define PB_ASSOC_DBG_ONLY(X) X
+#else // #ifdef PB_ASSOC_BIN_SEARCH_TREE_DEBUG_
+#define PB_ASSOC_DBG_ASSERT(X)
+#define PB_ASSOC_DBG_VERIFY(X) {if((X)==0);}
+#define PB_ASSOC_DBG_ONLY(X) ;
+#endif // #ifdef PB_ASSOC_BIN_SEARCH_TREE_DEBUG_
+
+#define PB_ASSOC_CLASS_T_DEC \
+ template< \
+ typename Key, \
+ typename Data, \
+ class Node, \
+ class Cmp_Fn, \
+ class Allocator, \
+ class Node_Updator>
+
+#ifdef PB_ASSOC_DATA_TRUE_INDICATOR
+#define PB_ASSOC_CLASS_NAME \
+ bin_search_tree_data_
+#endif // #ifdef PB_ASSOC_DATA_TRUE_INDICATOR
+
+#ifdef PB_ASSOC_DATA_FALSE_INDICATOR
+#define PB_ASSOC_CLASS_NAME \
+ bin_search_tree_no_data_
+#endif // #ifdef PB_ASSOC_DATA_FALSE_INDICATOR
+
+#define PB_ASSOC_CLASS_C_DEC \
+ PB_ASSOC_CLASS_NAME< \
+ Key, \
+ Data, \
+ Node, \
+ Cmp_Fn, \
+ Allocator, \
+ Node_Updator>
+
+#define PB_ASSOC_TYPES_TRAITS_C_DEC \
+ pb_assoc::detail::types_traits< \
+ Key, \
+ Data, \
+ Allocator>
+
+#ifdef PB_ASSOC_USE_MAP_DEBUG_BASE
+#define PB_ASSOC_MAP_DEBUG_BASE_C_DEC \
+ pb_assoc::detail::map_debug_base< \
+ Key, \
+ eq_by_less<Key, Cmp_Fn> >
+#endif // #ifdef PB_ASSOC_USE_MAP_DEBUG_BASE
+
+#ifdef PB_ASSOC_DATA_TRUE_INDICATOR
+#define PB_ASSOC_V2F(X) (X).first
+#define PB_ASSOC_V2S(X) (X).second
+#define PB_ASSOC_EP2VP(X)& ((X)->m_value)
+#endif // #ifdef PB_ASSOC_DATA_TRUE_INDICATOR
+
+#ifdef PB_ASSOC_DATA_FALSE_INDICATOR
+#define PB_ASSOC_V2F(X) (X)
+#define PB_ASSOC_V2S(X) Mapped_Data()
+#define PB_ASSOC_EP2VP(X)& ((X)->m_value.first)
+#endif // #ifdef PB_ASSOC_DATA_FALSE_INDICATOR
+
+ template<typename Key,
+ typename Data,
+ class Node,
+ class Cmp_Fn,
+ class Allocator,
+ class Node_Updator>
+ class PB_ASSOC_CLASS_NAME :
+#ifdef PB_ASSOC_BIN_SEARCH_TREE_DEBUG_
+ protected PB_ASSOC_MAP_DEBUG_BASE_C_DEC,
+#endif // #ifdef PB_ASSOC_BIN_SEARCH_TREE_DEBUG_
+ protected Cmp_Fn,
+ public PB_ASSOC_TYPES_TRAITS_C_DEC,
+ public Node_Updator
+ {
+
+ protected:
+
+ typedef typename Allocator::size_type size_type;
+
+ typedef
+ typename PB_ASSOC_TYPES_TRAITS_C_DEC::const_key_reference
+ const_key_reference;
+
+ typedef typename PB_ASSOC_TYPES_TRAITS_C_DEC::data_type data_type;
+
+ typedef
+ typename PB_ASSOC_TYPES_TRAITS_C_DEC::data_reference
+ data_reference;
+
+ typedef
+ typename PB_ASSOC_TYPES_TRAITS_C_DEC::const_data_reference
+ const_data_reference;
+
+ typedef typename PB_ASSOC_TYPES_TRAITS_C_DEC::value_type value_type;
+
+ typedef typename PB_ASSOC_TYPES_TRAITS_C_DEC::pointer pointer;
+
+ typedef
+ typename PB_ASSOC_TYPES_TRAITS_C_DEC::const_pointer
+ const_pointer;
+
+ typedef typename PB_ASSOC_TYPES_TRAITS_C_DEC::reference reference;
+
+ typedef
+ typename PB_ASSOC_TYPES_TRAITS_C_DEC::const_reference
+ const_reference;
+
+ typedef PB_ASSOC_TYPES_TRAITS_C_DEC my_traits_base;
+
+ typedef Node node;
+
+ typedef
+ pb_assoc::detail::cond_dealtor<
+ node,
+ Allocator>
+ cond_dealtor_t;
+
+ typedef
+ typename Allocator::template rebind<node>::other
+ node_allocator;
+
+ typedef typename node_allocator::value_type node_type;
+
+ typedef typename node_allocator::pointer node_pointer;
+
+ typedef value_type mapped_value_type;
+
+ typedef reference mapped_reference;
+
+ typedef const_reference const_mapped_reference;
+
+ typedef pointer mapped_pointer;
+
+ typedef const_pointer const_mapped_pointer;
+
+#include <ext/pb_assoc/detail/bin_search_tree_/find_iterators.hpp>
+
+ typedef const_it_<true> const_find_iterator;
+
+ typedef it_<true> find_iterator;
+
+ typedef const_find_iterator const_iterator;
+
+ typedef find_iterator iterator;
+
+ typedef const_it_<false> const_reverse_iterator;
+
+ typedef it_<false> reverse_iterator;
+
+#include <ext/pb_assoc/detail/bin_search_tree_/node_iterators.hpp>
+
+ typedef const_node_it_ const_node_iterator;
+
+ typedef node_it_ node_iterator;
+
+ typedef Cmp_Fn cmp_fn;
+
+ typedef Allocator allocator;
+
+ private:
+
+#ifdef PB_ASSOC_BIN_SEARCH_TREE_DEBUG_
+ typedef PB_ASSOC_MAP_DEBUG_BASE_C_DEC my_map_debug_base;
+#endif // #ifdef PB_ASSOC_BIN_SEARCH_TREE_DEBUG_
+
+ protected:
+
+ PB_ASSOC_CLASS_NAME();
+
+ PB_ASSOC_CLASS_NAME(const Cmp_Fn& r_cmp_fn);
+
+ PB_ASSOC_CLASS_NAME(const Cmp_Fn& r_cmp_fn, const Node_Updator& r_updator);
+
+ PB_ASSOC_CLASS_NAME(const PB_ASSOC_CLASS_C_DEC& r_other);
+
+ void
+ swap(PB_ASSOC_CLASS_C_DEC& r_other);
+
+ ~PB_ASSOC_CLASS_NAME();
+
+ void
+ initialize_min_max();
+
+ template<class Other_Map_Type>
+ bool
+ cmp_with_other(const Other_Map_Type& r_other) const;
+
+ inline bool
+ empty() const;
+
+ inline size_type
+ size() const;
+
+ inline size_type
+ max_size() const;
+
+ Cmp_Fn&
+ get_cmp_fn();
+
+ const Cmp_Fn&
+ get_cmp_fn() const;
+
+ inline std::pair<find_iterator, bool>
+ insert_leaf(const_reference r_value);
+
+ inline find_iterator
+ lower_bound(const_key_reference r_key);
+
+ inline const_find_iterator
+ lower_bound(const_key_reference r_key) const;
+
+ inline find_iterator
+ upper_bound(const_key_reference r_key);
+
+ inline const_find_iterator
+ upper_bound(const_key_reference r_key) const;
+
+ inline find_iterator
+ find(const_key_reference r_key);
+
+ inline const_find_iterator
+ find(const_key_reference r_key) const;
+
+ inline void
+ update_min_max_for_erased_node(node_pointer p_nd);
+
+ inline void
+ actual_erase_node(node_pointer p_nd);
+
+ void
+ clear();
+
+ inline void
+ rotate_left(node_pointer p_x);
+
+ inline void
+ rotate_right(node_pointer p_y);
+
+ inline void
+ rotate_parent(node_pointer p_nd);
+
+ inline void
+ apply_update(node_pointer p_nd, pb_assoc::null_node_updator* );
+
+ template<class Node_Updator_>
+ inline void
+ apply_update(node_pointer p_nd, Node_Updator_* p_updator);
+
+ template<class Node_Updator_>
+ inline void
+ update_to_top(node_pointer p_nd, Node_Updator_* p_updator);
+
+ inline void
+ update_to_top(node_pointer p_nd, pb_assoc::null_node_updator* );
+
+ inline iterator
+ begin();
+
+ inline const_iterator
+ begin() const;
+
+ inline iterator
+ find_end();
+
+ inline const_iterator
+ find_end() const;
+
+ inline iterator
+ end();
+
+ inline const_iterator
+ end() const;
+
+ inline reverse_iterator
+ rbegin()
+ {
+ return (reverse_iterator(m_p_head->m_p_right));
+ }
+
+ inline const_reverse_iterator
+ rbegin() const;
+
+ inline reverse_iterator
+ find_rend();
+
+ inline const_reverse_iterator
+ find_rend() const;
+
+ inline reverse_iterator
+ rend();
+
+ inline const_reverse_iterator
+ rend() const;
+
+ bool
+ join_prep(PB_ASSOC_CLASS_C_DEC& r_other);
+
+ void
+ join_finish(PB_ASSOC_CLASS_C_DEC& r_other);
+
+ bool
+ split_prep(const_key_reference r_key, PB_ASSOC_CLASS_C_DEC& r_other);
+
+ void
+ split_finish(PB_ASSOC_CLASS_C_DEC& r_other);
+
+ size_type
+ recursive_count(node_pointer p_nd) const;
+
+ inline const_node_iterator
+ node_begin() const;
+
+ inline node_iterator
+ node_begin();
+
+ inline const_node_iterator
+ node_end() const;
+
+ inline node_iterator
+ node_end();
+
+ private:
+
+ inline std::pair<node_pointer, bool>
+ erase(node_pointer p_nd);
+
+#ifdef PB_ASSOC_BIN_SEARCH_TREE_DEBUG_
+
+ void
+ assert_valid(bool check_iterators, bool check_metadata) const;
+
+ std::pair<const_pointer, const_pointer>
+ assert_node_consistent(const node_pointer p_nd) const
+ {
+ if (p_nd == NULL)
+ return (std::make_pair((const_pointer)NULL,(const_pointer)NULL));
+
+ assert_node_consistent_with_left(p_nd);
+ assert_node_consistent_with_right(p_nd);
+
+ const std::pair<const_pointer, const_pointer>
+ l_range =
+ assert_node_consistent(p_nd->m_p_left);
+
+ if (l_range.second != NULL)
+ PB_ASSOC_DBG_ASSERT(Cmp_Fn::operator()(
+ PB_ASSOC_V2F(*l_range.second),
+ PB_ASSOC_V2F(p_nd->m_value)));
+
+ const std::pair<const_pointer, const_pointer>
+ r_range =
+ assert_node_consistent(p_nd->m_p_right);
+
+ if (r_range.first != NULL)
+ PB_ASSOC_DBG_ASSERT(Cmp_Fn::operator()(
+ PB_ASSOC_V2F(p_nd->m_value),
+ PB_ASSOC_V2F(*r_range.first)));
+
+ return (std::make_pair((l_range.first != NULL)? l_range.first :& p_nd->m_value,(r_range.second != NULL)? r_range.second :& p_nd->m_value));
+ }
+
+ void
+ assert_consistent_with_debug_base() const;
+
+ void
+ assert_node_consistent_with_left(const node_pointer p_nd) const;
+
+ void
+ assert_node_consistent_with_right(const node_pointer p_nd) const;
+
+ void
+ assert_consistent_with_debug_base(const node_pointer p_nd) const;
+
+ void
+ assert_min() const;
+
+ void
+ assert_min_imp(const node_pointer p_nd) const;
+
+ void
+ assert_max() const;
+
+ void
+ assert_max_imp(const node_pointer p_nd) const;
+
+ void
+ assert_iterators() const;
+
+ void
+ assert_size() const;
+
+#endif // #ifdef PB_ASSOC_BIN_SEARCH_TREE_DEBUG_
+
+ void
+ initialize();
+
+ node_pointer
+ recursive_copy_node(const node_pointer p_nd);
+
+ inline node_pointer
+ get_new_node_for_leaf_insert(const_reference r_val, pb_assoc::detail::int_to_type<false>);
+
+ inline node_pointer
+ get_new_node_for_leaf_insert(const_reference r_val, pb_assoc::detail::int_to_type<true>);
+
+ inline iterator
+ insert_imp_empty(const_reference r_value);
+
+ inline iterator
+ insert_leaf_new(const_reference r_value, node_pointer p_nd, bool left_nd);
+
+ static void
+ clear_imp(node_pointer p_nd);
+
+ protected:
+ node_pointer m_p_head;
+
+ iterator m_end_it;
+
+ reverse_iterator m_rend_it;
+
+ size_type m_size;
+
+ static node_allocator s_node_allocator;
+ };
+
+#include <ext/pb_assoc/detail/bin_search_tree_/constructors_destructor_fn_imps.hpp>
+#include <ext/pb_assoc/detail/bin_search_tree_/iterators_fn_imps.hpp>
+#include <ext/pb_assoc/detail/bin_search_tree_/debug_fn_imps.hpp>
+#include <ext/pb_assoc/detail/bin_search_tree_/insert_fn_imps.hpp>
+#include <ext/pb_assoc/detail/bin_search_tree_/erase_fn_imps.hpp>
+#include <ext/pb_assoc/detail/bin_search_tree_/find_fn_imps.hpp>
+#include <ext/pb_assoc/detail/bin_search_tree_/info_fn_imps.hpp>
+#include <ext/pb_assoc/detail/bin_search_tree_/split_join_fn_imps.hpp>
+#include <ext/pb_assoc/detail/bin_search_tree_/rotate_fn_imps.hpp>
+
+#undef PB_ASSOC_CLASS_C_DEC
+
+#undef PB_ASSOC_CLASS_T_DEC
+
+#undef PB_ASSOC_CLASS_NAME
+
+#undef PB_ASSOC_TYPES_TRAITS_C_DEC
+
+#undef PB_ASSOC_MAP_DEBUG_BASE_C_DEC
+
+#undef PB_ASSOC_V2F
+#undef PB_ASSOC_EP2VP
+#undef PB_ASSOC_V2S
+
+#undef PB_ASSOC_DBG_ASSERT
+#undef PB_ASSOC_DBG_VERIFY
+#undef PB_ASSOC_DBG_ONLY
+
+ } // namespace detail
+
+} // namespace pb_assoc
diff --git a/libstdc++-v3/include/ext/pb_assoc/detail/bin_search_tree_/cond_dtor_entry_dealtor.hpp b/libstdc++-v3/include/ext/pb_assoc/detail/bin_search_tree_/cond_dtor_entry_dealtor.hpp
new file mode 100644
index 00000000000..6061dec0b04
--- /dev/null
+++ b/libstdc++-v3/include/ext/pb_assoc/detail/bin_search_tree_/cond_dtor_entry_dealtor.hpp
@@ -0,0 +1,74 @@
+// -*- C++ -*-
+
+// 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.
+
+// As a special exception, you may use this file as part of a free software
+// library without restriction. Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General 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 cond_dtor_entry_dealtor.hpp
+ * Contains a binary tree container conditional deallocator
+ */
+
+class bin_search_tree_cond_dtor_entry_dealtor_
+{
+public:
+ inline
+ bin_search_tree_cond_dtor_entry_dealtor_(node_pointer p_nd) : m_p_nd(p_nd),
+ m_no_action_dtor(false)
+ { }
+
+ inline void
+ set_no_action_dtor()
+ {
+ m_no_action_dtor = true;
+ }
+
+ inline
+ ~bin_search_tree_cond_dtor_entry_dealtor_()
+ {
+ if (m_no_action_dtor)
+ return;
+
+ typename Allocator::template rebind<Node>::other().
+ deallocate(m_p_nd, 1);
+ }
+
+protected:
+ node_pointer m_p_nd;
+
+ bool m_no_action_dtor;
+};
+
diff --git a/libstdc++-v3/include/ext/pb_assoc/detail/bin_search_tree_/cond_key_dtor_entry_dealtor.hpp b/libstdc++-v3/include/ext/pb_assoc/detail/bin_search_tree_/cond_key_dtor_entry_dealtor.hpp
new file mode 100644
index 00000000000..0d536a03b4a
--- /dev/null
+++ b/libstdc++-v3/include/ext/pb_assoc/detail/bin_search_tree_/cond_key_dtor_entry_dealtor.hpp
@@ -0,0 +1,85 @@
+// -*- C++ -*-
+
+// 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.
+
+// As a special exception, you may use this file as part of a free software
+// library without restriction. Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General 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 cond_key_dtor_entry_dealtor.hpp
+ * Contains a binary tree container conditional deallocator
+ */
+
+class bin_seach_tree_cond_key_dtor_entry_dealtor_
+{
+public:
+ inline
+ bin_seach_tree_cond_key_dtor_entry_dealtor_(node_pointer p_nd) : m_p_nd(p_nd),
+ m_no_action_dtor(false),
+ m_key_destruct(false)
+ { }
+
+ inline void
+ set_no_action_dtor()
+ {
+ m_no_action_dtor = true;
+ }
+
+ inline void
+ set_key_destruct()
+ {
+ m_key_destruct = true;
+ }
+
+ inline
+ ~bin_seach_tree_cond_key_dtor_entry_dealtor_()
+ {
+ if (m_no_action_dtor)
+ return;
+
+ if (m_key_destruct)
+ m_p_nd->m_value.first.~Key();
+
+ my_bin_tree_base::s_alloc.deallocate(m_p_nd, 1);
+ }
+
+protected:
+ node_pointer m_p_nd;
+
+ bool m_no_action_dtor;
+
+ bool m_key_destruct;
+};
+
diff --git a/libstdc++-v3/include/ext/pb_assoc/detail/bin_search_tree_/constructors_destructor_fn_imps.hpp b/libstdc++-v3/include/ext/pb_assoc/detail/bin_search_tree_/constructors_destructor_fn_imps.hpp
new file mode 100644
index 00000000000..81454e242df
--- /dev/null
+++ b/libstdc++-v3/include/ext/pb_assoc/detail/bin_search_tree_/constructors_destructor_fn_imps.hpp
@@ -0,0 +1,258 @@
+// -*- C++ -*-
+
+// 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.
+
+// As a special exception, you may use this file as part of a free software
+// library without restriction. Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General 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 constructors_destructor_fn_imps.hpp
+ * Contains an implementation class for bin_search_tree_.
+ */
+
+PB_ASSOC_CLASS_T_DEC
+typename PB_ASSOC_CLASS_C_DEC::node_allocator
+PB_ASSOC_CLASS_C_DEC::s_node_allocator;
+
+PB_ASSOC_CLASS_T_DEC
+PB_ASSOC_CLASS_C_DEC::
+PB_ASSOC_CLASS_NAME() :
+ m_p_head(s_node_allocator.allocate(1)),
+ m_end_it(m_p_head),
+ m_rend_it(m_p_head),
+ m_size(0)
+{
+ initialize();
+
+ PB_ASSOC_DBG_ONLY(assert_valid(true, true);)
+ }
+
+PB_ASSOC_CLASS_T_DEC
+PB_ASSOC_CLASS_C_DEC::
+PB_ASSOC_CLASS_NAME(const Cmp_Fn& r_cmp_fn) :
+ Cmp_Fn(r_cmp_fn),
+ m_p_head(s_node_allocator.allocate(1)),
+ m_end_it(m_p_head),
+ m_rend_it(m_p_head),
+ m_size(0)
+{
+ initialize();
+
+ PB_ASSOC_DBG_ONLY(assert_valid(true, true);)
+ }
+
+PB_ASSOC_CLASS_T_DEC
+PB_ASSOC_CLASS_C_DEC::
+PB_ASSOC_CLASS_NAME(const Cmp_Fn& r_cmp_fn, const Node_Updator& r_node_updator) :
+ Cmp_Fn(r_cmp_fn),
+ Node_Updator(r_node_updator),
+ m_p_head(s_node_allocator.allocate(1)),
+ m_end_it(m_p_head),
+ m_rend_it(m_p_head),
+ m_size(0)
+{
+ initialize();
+
+ PB_ASSOC_DBG_ONLY(assert_valid(true, true);)
+ }
+
+PB_ASSOC_CLASS_T_DEC
+PB_ASSOC_CLASS_C_DEC::
+PB_ASSOC_CLASS_NAME(const PB_ASSOC_CLASS_C_DEC& r_other) :
+#ifdef PB_ASSOC_BIN_SEARCH_TREE_DEBUG_
+ my_map_debug_base(r_other),
+#endif // #ifdef PB_ASSOC_BIN_SEARCH_TREE_DEBUG_
+ Cmp_Fn(r_other),
+ Node_Updator(r_other),
+ m_p_head(s_node_allocator.allocate(1)),
+ m_end_it(m_p_head),
+ m_rend_it(m_p_head),
+ m_size(0)
+{
+ initialize();
+
+ m_size = r_other.m_size;
+
+ PB_ASSOC_DBG_ONLY(r_other.assert_valid(true, true);)
+
+ try
+ {
+ m_p_head->m_p_parent =
+ recursive_copy_node(r_other.m_p_head->m_p_parent);
+
+ if (m_p_head->m_p_parent != NULL)
+ m_p_head->m_p_parent->m_p_parent = m_p_head;
+
+ m_size = r_other.m_size;
+
+ initialize_min_max();
+ }
+ catch(...)
+ {
+ PB_ASSOC_DBG_ONLY(my_map_debug_base::clear();)
+
+ s_node_allocator.deallocate(m_p_head, 1);
+
+ throw;
+ }
+
+ PB_ASSOC_DBG_ONLY(assert_valid(true, true);)
+ }
+
+PB_ASSOC_CLASS_T_DEC
+void
+PB_ASSOC_CLASS_C_DEC::
+swap(PB_ASSOC_CLASS_C_DEC& r_other)
+{
+ PB_ASSOC_DBG_ONLY(assert_valid(true, true);)
+ PB_ASSOC_DBG_ONLY(r_other.assert_valid(true, true);)
+
+ PB_ASSOC_DBG_ONLY(my_map_debug_base::swap(r_other);)
+
+ std::swap(m_p_head, r_other.m_p_head);
+
+ std::swap(m_size, r_other.m_size);
+
+ std::swap(m_end_it, r_other.m_end_it);
+
+ std::swap(m_rend_it, r_other.m_rend_it);
+
+ std::swap((Cmp_Fn& )(*this), (Cmp_Fn& )r_other);
+
+ Node_Updator::swap(r_other);
+
+ PB_ASSOC_DBG_ONLY(assert_valid(true, true);)
+ PB_ASSOC_DBG_ONLY(r_other.assert_valid(true, true);)
+ }
+
+PB_ASSOC_CLASS_T_DEC
+PB_ASSOC_CLASS_C_DEC::
+~PB_ASSOC_CLASS_NAME()
+{
+ clear();
+
+ s_node_allocator.deallocate(m_p_head, 1);
+}
+
+PB_ASSOC_CLASS_T_DEC
+void
+PB_ASSOC_CLASS_C_DEC::
+initialize()
+{
+ m_p_head->m_p_parent = NULL;
+ m_p_head->m_p_left = m_p_head;
+ m_p_head->m_p_right = m_p_head;
+
+ m_size = 0;
+}
+
+PB_ASSOC_CLASS_T_DEC
+typename PB_ASSOC_CLASS_C_DEC::node_pointer
+PB_ASSOC_CLASS_C_DEC::
+recursive_copy_node(const node_pointer p_nd)
+{
+ if (p_nd == NULL)
+ return (NULL);
+
+ node_pointer p_ret = s_node_allocator.allocate(1);
+
+ try
+ {
+ new (p_ret) node(*p_nd);
+ }
+ catch(...)
+ {
+ s_node_allocator.deallocate(p_ret, 1);
+
+ throw;
+ }
+
+ p_ret->m_p_left = p_ret->m_p_right = NULL;
+
+ try
+ {
+ p_ret->m_p_left = recursive_copy_node(p_nd->m_p_left);
+
+ p_ret->m_p_right = recursive_copy_node(p_nd->m_p_right);
+ }
+ catch(...)
+ {
+ clear_imp(p_ret);
+
+ throw;
+ }
+
+ if (p_ret->m_p_left != NULL)
+ p_ret->m_p_left->m_p_parent = p_ret;
+
+ if (p_ret->m_p_right != NULL)
+ p_ret->m_p_right->m_p_parent = p_ret;
+
+ PB_ASSOC_DBG_ONLY(assert_node_consistent(p_ret);)
+
+ return (p_ret);
+}
+
+PB_ASSOC_CLASS_T_DEC
+void
+PB_ASSOC_CLASS_C_DEC::
+initialize_min_max()
+{
+ if (m_p_head->m_p_parent == NULL)
+ {
+ m_p_head->m_p_left = m_p_head->m_p_right = m_p_head;
+
+ return;
+ }
+
+ {
+ node_pointer p_min = m_p_head->m_p_parent;
+
+ while (p_min->m_p_left != NULL)
+ p_min = p_min->m_p_left;
+
+ m_p_head->m_p_left = p_min;
+ }
+
+ {
+ node_pointer p_max = m_p_head->m_p_parent;
+
+ while (p_max->m_p_right != NULL)
+ p_max = p_max->m_p_right;
+
+ m_p_head->m_p_right = p_max;
+ }
+}
+
diff --git a/libstdc++-v3/include/ext/pb_assoc/detail/bin_search_tree_/debug_fn_imps.hpp b/libstdc++-v3/include/ext/pb_assoc/detail/bin_search_tree_/debug_fn_imps.hpp
new file mode 100644
index 00000000000..9c31cb8efbf
--- /dev/null
+++ b/libstdc++-v3/include/ext/pb_assoc/detail/bin_search_tree_/debug_fn_imps.hpp
@@ -0,0 +1,278 @@
+// -*- C++ -*-
+
+// 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.
+
+// As a special exception, you may use this file as part of a free software
+// library without restriction. Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General 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_fn_imps.hpp
+ * Contains an implementation class for bin_search_tree_.
+ */
+
+#ifdef PB_ASSOC_BIN_SEARCH_TREE_DEBUG_
+
+PB_ASSOC_CLASS_T_DEC
+void
+PB_ASSOC_CLASS_C_DEC::
+assert_valid(bool check_iterators, bool check_metadata) const
+{
+ PB_ASSOC_DBG_ASSERT(m_p_head != NULL);
+
+ if (m_p_head->m_p_parent == NULL)
+ {
+ PB_ASSOC_DBG_ASSERT(m_p_head->m_p_left == m_p_head);
+ PB_ASSOC_DBG_ASSERT(m_p_head->m_p_right == m_p_head);
+
+ if (check_metadata)
+ PB_ASSOC_DBG_ASSERT(m_size == 0);
+ }
+ else
+ {
+ PB_ASSOC_DBG_ASSERT(m_p_head->m_p_parent->m_p_parent == m_p_head);
+
+ PB_ASSOC_DBG_ASSERT(m_p_head->m_p_left != m_p_head);
+ PB_ASSOC_DBG_ASSERT(m_p_head->m_p_right != m_p_head);
+
+ if (check_metadata)
+ PB_ASSOC_DBG_ASSERT(m_size > 0);
+ }
+
+ if (check_metadata)
+ assert_size();
+
+ if (m_p_head->m_p_parent != NULL)
+ assert_node_consistent(m_p_head->m_p_parent);
+
+ assert_min();
+ assert_max();
+
+ if (check_metadata)
+ assert_consistent_with_debug_base();
+
+ if (check_iterators&& check_metadata)
+ assert_iterators();
+}
+
+PB_ASSOC_CLASS_T_DEC
+void
+PB_ASSOC_CLASS_C_DEC::
+assert_node_consistent_with_left(const node_pointer p_nd) const
+{
+ if (p_nd->m_p_left == NULL)
+ return;
+
+ PB_ASSOC_DBG_ASSERT(p_nd->m_p_left->m_p_parent == p_nd);
+
+ PB_ASSOC_DBG_ASSERT(!Cmp_Fn::operator()(
+ PB_ASSOC_V2F(p_nd->m_value),
+ PB_ASSOC_V2F(p_nd->m_p_left->m_value)));
+}
+
+PB_ASSOC_CLASS_T_DEC
+void
+PB_ASSOC_CLASS_C_DEC::
+assert_node_consistent_with_right(const node_pointer p_nd) const
+{
+ if (p_nd->m_p_right == NULL)
+ return;
+
+ PB_ASSOC_DBG_ASSERT(p_nd->m_p_right->m_p_parent == p_nd);
+
+ PB_ASSOC_DBG_ASSERT(!Cmp_Fn::operator()(
+ PB_ASSOC_V2F(p_nd->m_p_right->m_value),
+ PB_ASSOC_V2F(p_nd->m_value)));
+}
+
+PB_ASSOC_CLASS_T_DEC
+void
+PB_ASSOC_CLASS_C_DEC::
+assert_min() const
+{
+ assert_min_imp(m_p_head->m_p_parent);
+}
+
+PB_ASSOC_CLASS_T_DEC
+void
+PB_ASSOC_CLASS_C_DEC::
+assert_min_imp(const node_pointer p_nd) const
+{
+ if (p_nd == NULL)
+ {
+ PB_ASSOC_DBG_ASSERT(m_p_head->m_p_left == m_p_head);
+
+ return;
+ }
+
+ if (p_nd->m_p_left == NULL)
+ {
+ PB_ASSOC_DBG_ASSERT(p_nd == m_p_head->m_p_left);
+
+ return;
+ }
+
+ assert_min_imp(p_nd->m_p_left);
+}
+
+PB_ASSOC_CLASS_T_DEC
+void
+PB_ASSOC_CLASS_C_DEC::
+assert_max() const
+{
+ assert_max_imp(m_p_head->m_p_parent);
+}
+
+PB_ASSOC_CLASS_T_DEC
+void
+PB_ASSOC_CLASS_C_DEC::
+assert_max_imp(const node_pointer p_nd) const
+{
+ if (p_nd == NULL)
+ {
+ PB_ASSOC_DBG_ASSERT(m_p_head->m_p_right == m_p_head);
+
+ return;
+ }
+
+ if (p_nd->m_p_right == NULL)
+ {
+ PB_ASSOC_DBG_ASSERT(p_nd == m_p_head->m_p_right);
+
+ return;
+ }
+
+ assert_max_imp(p_nd->m_p_right);
+}
+
+PB_ASSOC_CLASS_T_DEC
+void
+PB_ASSOC_CLASS_C_DEC::
+assert_iterators() const
+{
+ PB_ASSOC_DBG_ASSERT(m_end_it.m_p_nd == m_p_head);
+ PB_ASSOC_DBG_ASSERT(m_rend_it.m_p_nd == m_p_head);
+
+ size_type iterated_num = 0;
+
+ const_iterator prev_it = end();
+
+ for (const_iterator it = begin(); it != end(); ++it)
+ {
+ ++iterated_num;
+
+ PB_ASSOC_DBG_ASSERT(lower_bound(
+ PB_ASSOC_V2F(*it)).m_p_nd == it.m_p_nd);
+
+ const_iterator upper_bound_it = upper_bound(
+ PB_ASSOC_V2F(*it));
+
+ --upper_bound_it;
+
+ PB_ASSOC_DBG_ASSERT(upper_bound_it.m_p_nd == it.m_p_nd);
+
+ if (prev_it != end())
+ PB_ASSOC_DBG_ASSERT(Cmp_Fn::operator()(
+ PB_ASSOC_V2F(*prev_it),
+ PB_ASSOC_V2F(*it)));
+
+ prev_it = it;
+ }
+
+ PB_ASSOC_DBG_ASSERT(iterated_num == m_size);
+
+ size_type reverse_iterated_num = 0;
+
+ const_reverse_iterator reverse_prev_it = rend();
+
+ for (const_reverse_iterator reverse_it = rbegin(); reverse_it != rend();
+ ++reverse_it)
+ {
+ ++reverse_iterated_num;
+
+ PB_ASSOC_DBG_ASSERT(lower_bound(
+ PB_ASSOC_V2F(*reverse_it)).m_p_nd == reverse_it.m_p_nd);
+
+ const_iterator upper_bound_it = upper_bound(
+ PB_ASSOC_V2F(*reverse_it));
+
+ --upper_bound_it;
+
+ PB_ASSOC_DBG_ASSERT(upper_bound_it.m_p_nd == reverse_it.m_p_nd);
+
+ if (reverse_prev_it != rend())
+ PB_ASSOC_DBG_ASSERT(!Cmp_Fn::operator()(
+ PB_ASSOC_V2F(*reverse_prev_it),
+ PB_ASSOC_V2F(*reverse_it)));
+
+ reverse_prev_it = reverse_it;
+ }
+
+ PB_ASSOC_DBG_ASSERT(reverse_iterated_num == m_size);
+}
+
+PB_ASSOC_CLASS_T_DEC
+void
+PB_ASSOC_CLASS_C_DEC::
+assert_consistent_with_debug_base() const
+{
+ my_map_debug_base::check_size(m_size);
+
+ assert_consistent_with_debug_base(m_p_head->m_p_parent);
+}
+
+PB_ASSOC_CLASS_T_DEC
+void
+PB_ASSOC_CLASS_C_DEC::
+assert_consistent_with_debug_base(const node_pointer p_nd) const
+{
+ if (p_nd == NULL)
+ return;
+
+ my_map_debug_base::check_key_exists(
+ PB_ASSOC_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);
+}
+
+PB_ASSOC_CLASS_T_DEC
+void
+PB_ASSOC_CLASS_C_DEC::
+assert_size() const
+{
+ PB_ASSOC_DBG_ASSERT(recursive_count(m_p_head->m_p_parent) == m_size);
+}
+
+#endif // #ifdef PB_ASSOC_BIN_SEARCH_TREE_DEBUG_
diff --git a/libstdc++-v3/include/ext/pb_assoc/detail/bin_search_tree_/erase_fn_imps.hpp b/libstdc++-v3/include/ext/pb_assoc/detail/bin_search_tree_/erase_fn_imps.hpp
new file mode 100644
index 00000000000..872530b4102
--- /dev/null
+++ b/libstdc++-v3/include/ext/pb_assoc/detail/bin_search_tree_/erase_fn_imps.hpp
@@ -0,0 +1,124 @@
+// -*- C++ -*-
+
+// 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.
+
+// As a special exception, you may use this file as part of a free software
+// library without restriction. Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General 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 erase_fn_imps.hpp
+ * Contains an implementation class for bin_search_tree_.
+ */
+
+PB_ASSOC_CLASS_T_DEC
+inline void
+PB_ASSOC_CLASS_C_DEC::
+actual_erase_node(node_pointer p_z)
+{
+ PB_ASSOC_DBG_ASSERT(m_size > 0);
+ --m_size;
+
+ PB_ASSOC_DBG_ONLY(erase_existing(PB_ASSOC_V2F(p_z->m_value)));
+
+ p_z->~node();
+
+ s_node_allocator.deallocate(p_z, 1);
+}
+
+PB_ASSOC_CLASS_T_DEC
+inline void
+PB_ASSOC_CLASS_C_DEC::
+update_min_max_for_erased_node(node_pointer p_z)
+{
+ if (m_size == 1)
+ {
+ m_p_head->m_p_left = m_p_head->m_p_right = m_p_head;
+
+ return;
+ }
+
+ if (m_p_head->m_p_left == p_z)
+ {
+ iterator it(p_z);
+
+ ++it;
+
+ m_p_head->m_p_left = it.m_p_nd;
+ }
+ else if (m_p_head->m_p_right == p_z)
+ {
+ iterator it(p_z);
+
+ --it;
+
+ m_p_head->m_p_right = it.m_p_nd;
+ }
+}
+
+PB_ASSOC_CLASS_T_DEC
+void
+PB_ASSOC_CLASS_C_DEC::
+clear()
+{
+ PB_ASSOC_DBG_ONLY(assert_valid(true, true);)
+
+ clear_imp(m_p_head->m_p_parent);
+
+ m_size = 0;
+
+ initialize();
+
+ PB_ASSOC_DBG_ONLY(my_map_debug_base::clear();)
+
+ PB_ASSOC_DBG_ONLY(assert_valid(true, true);)
+ }
+
+PB_ASSOC_CLASS_T_DEC
+void
+PB_ASSOC_CLASS_C_DEC::
+clear_imp(node_pointer p_nd)
+{
+ if (p_nd == NULL)
+ return;
+
+ clear_imp(p_nd->m_p_left);
+
+ clear_imp(p_nd->m_p_right);
+
+ p_nd->~Node();
+
+ s_node_allocator.deallocate(p_nd, 1);
+}
+
diff --git a/libstdc++-v3/include/ext/pb_assoc/detail/bin_search_tree_/find_fn_imps.hpp b/libstdc++-v3/include/ext/pb_assoc/detail/bin_search_tree_/find_fn_imps.hpp
new file mode 100644
index 00000000000..1d8449c719d
--- /dev/null
+++ b/libstdc++-v3/include/ext/pb_assoc/detail/bin_search_tree_/find_fn_imps.hpp
@@ -0,0 +1,184 @@
+// -*- C++ -*-
+
+// 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.
+
+// As a special exception, you may use this file as part of a free software
+// library without restriction. Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General 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 find_fn_imps.hpp
+ * Contains an implementation class for bin_search_tree_.
+ */
+
+PB_ASSOC_CLASS_T_DEC
+inline typename PB_ASSOC_CLASS_C_DEC::const_find_iterator
+PB_ASSOC_CLASS_C_DEC::
+lower_bound(const_key_reference r_key) const
+{
+ node_pointer p_pot = m_p_head;
+ node_pointer p_nd = m_p_head->m_p_parent;
+
+ while (p_nd != NULL)
+ if (!Cmp_Fn::operator()(PB_ASSOC_V2F(p_nd->m_value), r_key))
+ {
+ p_pot = p_nd;
+
+ p_nd = p_nd->m_p_left;
+ }
+ else
+ p_nd = p_nd->m_p_right;
+
+ return (iterator(p_pot));
+}
+
+PB_ASSOC_CLASS_T_DEC
+inline typename PB_ASSOC_CLASS_C_DEC::find_iterator
+PB_ASSOC_CLASS_C_DEC::
+lower_bound(const_key_reference r_key)
+{
+ node_pointer p_pot = m_p_head;
+ node_pointer p_nd = m_p_head->m_p_parent;
+
+ while (p_nd != NULL)
+ if (!Cmp_Fn::operator()(
+ PB_ASSOC_V2F(p_nd->m_value),
+ r_key))
+ {
+ p_pot = p_nd;
+
+ p_nd = p_nd->m_p_left;
+ }
+ else
+ p_nd = p_nd->m_p_right;
+
+ return (iterator(p_pot));
+}
+
+PB_ASSOC_CLASS_T_DEC
+inline typename PB_ASSOC_CLASS_C_DEC::const_find_iterator
+PB_ASSOC_CLASS_C_DEC::
+upper_bound(const_key_reference r_key) const
+{
+ node_pointer p_pot = m_p_head;
+ node_pointer p_nd = m_p_head->m_p_parent;
+
+ while (p_nd != NULL)
+ if (Cmp_Fn::operator()(r_key,
+ PB_ASSOC_V2F(p_nd->m_value)))
+ {
+ p_pot = p_nd,
+
+ p_nd = p_nd->m_p_left;
+ }
+ else
+ p_nd = p_nd->m_p_right;
+
+ return (const_iterator(p_pot));
+}
+
+PB_ASSOC_CLASS_T_DEC
+inline typename PB_ASSOC_CLASS_C_DEC::find_iterator
+PB_ASSOC_CLASS_C_DEC::
+upper_bound(const_key_reference r_key)
+{
+ node_pointer p_pot = m_p_head;
+ node_pointer p_nd = m_p_head->m_p_parent;
+
+ while (p_nd != NULL)
+ if (Cmp_Fn::operator()(r_key,
+ PB_ASSOC_V2F(p_nd->m_value)))
+ {
+ p_pot = p_nd,
+
+ p_nd = p_nd->m_p_left;
+ }
+ else
+ p_nd = p_nd->m_p_right;
+
+ return (find_iterator(p_pot));
+}
+
+PB_ASSOC_CLASS_T_DEC
+inline typename PB_ASSOC_CLASS_C_DEC::find_iterator
+PB_ASSOC_CLASS_C_DEC::
+find(const_key_reference r_key)
+{
+ PB_ASSOC_DBG_ONLY(assert_valid(true, false);)
+
+ node_pointer p_pot = m_p_head;
+ node_pointer p_nd = m_p_head->m_p_parent;
+
+ while (p_nd != NULL)
+ if (!Cmp_Fn::operator()(PB_ASSOC_V2F(p_nd->m_value), r_key))
+ {
+ p_pot = p_nd;
+
+ p_nd = p_nd->m_p_left;
+ }
+ else
+ p_nd = p_nd->m_p_right;
+
+ return find_iterator((p_pot != m_p_head&& Cmp_Fn::operator()(
+ r_key,
+ PB_ASSOC_V2F(p_pot->m_value)))?
+ m_p_head : p_pot);
+}
+
+PB_ASSOC_CLASS_T_DEC
+inline typename PB_ASSOC_CLASS_C_DEC::const_find_iterator
+PB_ASSOC_CLASS_C_DEC::
+find(const_key_reference r_key) const
+{
+ PB_ASSOC_DBG_ONLY(assert_valid(true, true);)
+
+ node_pointer p_pot = m_p_head;
+ node_pointer p_nd = m_p_head->m_p_parent;
+
+ while (p_nd != NULL)
+ if (!Cmp_Fn::operator()(PB_ASSOC_V2F(p_nd->m_value), r_key))
+ {
+ p_pot = p_nd;
+
+ p_nd = p_nd->m_p_left;
+ }
+ else
+ p_nd = p_nd->m_p_right;
+
+ return const_find_iterator((p_pot != m_p_head&& Cmp_Fn::operator()(
+ r_key,
+ PB_ASSOC_V2F(p_pot->m_value)))?
+ m_p_head : p_pot);
+}
+
diff --git a/libstdc++-v3/include/ext/pb_assoc/detail/bin_search_tree_/find_iterators.hpp b/libstdc++-v3/include/ext/pb_assoc/detail/bin_search_tree_/find_iterators.hpp
new file mode 100644
index 00000000000..69821ee4ffc
--- /dev/null
+++ b/libstdc++-v3/include/ext/pb_assoc/detail/bin_search_tree_/find_iterators.hpp
@@ -0,0 +1,391 @@
+// -*- C++ -*-
+
+// 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.
+
+// As a special exception, you may use this file as part of a free software
+// library without restriction. Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General 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 find_iterators.hpp
+ * Contains an implementation class for bin_search_tree_.
+ */
+
+#define PB_ASSOC_CONST_IT_C_DEC \
+ const_it_< \
+ Is_Forward_Iterator>
+
+#define PB_ASSOC_CONST_ODIR_IT_C_DEC \
+ const_it_< \
+ !Is_Forward_Iterator>
+
+#define PB_ASSOC_IT_C_DEC \
+ it_< \
+ Is_Forward_Iterator>
+
+#define PB_ASSOC_ODIR_IT_C_DEC \
+ it_< \
+ !Is_Forward_Iterator>
+
+template<bool Is_Forward_Iterator>
+class const_it_
+{
+
+public:
+
+ typedef std::bidirectional_iterator_tag iterator_category;
+
+ typedef typename Allocator::difference_type difference_type;
+
+ typedef mapped_value_type value_type;
+
+ typedef mapped_pointer pointer;
+
+ typedef const_mapped_pointer const_pointer;
+
+ typedef mapped_reference reference;
+
+ typedef const_mapped_reference const_reference;
+
+public:
+
+ inline
+ const_it_(const node_pointer p_nd = NULL) : m_p_nd(const_cast<node_pointer>(p_nd))
+ { }
+
+ inline
+ const_it_(const PB_ASSOC_CONST_ODIR_IT_C_DEC&
+ r_other)
+
+ : m_p_nd(r_other.m_p_nd)
+ { }
+
+ inline
+ PB_ASSOC_CONST_IT_C_DEC&
+ operator=(const PB_ASSOC_CONST_IT_C_DEC&
+ r_other)
+ {
+ m_p_nd = r_other.m_p_nd;
+
+ return (*this);
+ }
+
+ inline
+ PB_ASSOC_CONST_IT_C_DEC&
+ operator=(const PB_ASSOC_CONST_ODIR_IT_C_DEC&
+ r_other)
+ {
+ m_p_nd = r_other.m_p_nd;
+
+ return (*this);
+ }
+
+ inline const_pointer
+ operator->() const
+ {
+ PB_ASSOC_DBG_ASSERT(m_p_nd != NULL);
+
+ return (&m_p_nd->m_value);
+ }
+
+ inline const_reference
+ operator*() const
+ {
+ PB_ASSOC_DBG_ASSERT(m_p_nd != NULL);
+
+ return (m_p_nd->m_value);
+ }
+
+ inline bool
+ operator==(const PB_ASSOC_CONST_IT_C_DEC
+ &r_other) const
+ {
+ return (m_p_nd == r_other.m_p_nd);
+ }
+
+ inline bool
+ operator==(const PB_ASSOC_CONST_ODIR_IT_C_DEC
+ &r_other) const
+ {
+ return (m_p_nd == r_other.m_p_nd);
+ }
+
+ inline bool
+ operator!=(const PB_ASSOC_CONST_IT_C_DEC&
+ r_other) const
+ {
+ return (m_p_nd != r_other.m_p_nd);
+ }
+
+ inline bool
+ operator!=(const PB_ASSOC_CONST_ODIR_IT_C_DEC&
+ r_other) const
+ {
+ return (m_p_nd != r_other.m_p_nd);
+ }
+
+ inline PB_ASSOC_CONST_IT_C_DEC&
+ operator++()
+ {
+ PB_ASSOC_DBG_ASSERT(m_p_nd != NULL);
+
+ inc(int_to_type<Is_Forward_Iterator>());
+
+ return (*this);
+ }
+
+ inline PB_ASSOC_CONST_IT_C_DEC
+ operator++(int)
+ {
+ PB_ASSOC_CONST_IT_C_DEC
+ ret_it(m_p_nd);
+
+ operator++();
+
+ return (ret_it);
+ }
+
+ inline PB_ASSOC_CONST_IT_C_DEC&
+ operator--()
+ {
+ dec(int_to_type<Is_Forward_Iterator>());
+
+ return (*this);
+ }
+
+ inline PB_ASSOC_CONST_IT_C_DEC
+ operator--(int)
+ {
+ PB_ASSOC_CONST_IT_C_DEC
+ ret_it(m_p_nd);
+
+ operator--();
+
+ return (ret_it);
+ }
+
+protected:
+ inline void
+ inc(int_to_type<false>)
+ {
+ dec(int_to_type<true>());
+ }
+
+ void
+ inc(int_to_type<true>)
+ {
+ if (m_p_nd->m_p_right != NULL)
+ {
+ m_p_nd = m_p_nd->m_p_right;
+
+ while (m_p_nd->m_p_left != NULL)
+ m_p_nd = m_p_nd->m_p_left;
+
+ return;
+ }
+
+ node_pointer p_y = m_p_nd->m_p_parent;
+
+ while (m_p_nd == p_y->m_p_right)
+ {
+ m_p_nd = p_y;
+
+ p_y = p_y->m_p_parent;
+ }
+
+ if (m_p_nd->m_p_right != p_y)
+ m_p_nd = p_y;
+ }
+
+ inline void
+ dec(int_to_type<false>)
+ {
+ inc(int_to_type<true>());
+ }
+
+ void
+ dec(int_to_type<true>)
+ {
+ if (m_p_nd->special_dec_check()&&
+ m_p_nd->m_p_parent->m_p_parent == m_p_nd)
+ {
+ m_p_nd = m_p_nd->m_p_right;
+
+ return;
+ }
+
+ if (m_p_nd->m_p_left != NULL)
+ {
+ node_pointer p_y = m_p_nd->m_p_left;
+
+ while (p_y->m_p_right != NULL)
+ p_y = p_y->m_p_right;
+
+ m_p_nd = p_y;
+
+ return;
+ }
+
+ node_pointer p_y = m_p_nd->m_p_parent;
+
+ while (m_p_nd == p_y->m_p_left)
+ {
+ m_p_nd = p_y;
+
+ p_y = p_y->m_p_parent;
+ }
+
+ /*
+ * This seems to correct an apparent bug in the SGI STL
+ * implementation. */
+ if (m_p_nd->m_p_left != p_y)
+ m_p_nd = p_y;
+ }
+
+ friend class PB_ASSOC_CLASS_C_DEC;
+
+public:
+ node_pointer m_p_nd;
+};
+
+template<bool Is_Forward_Iterator>
+class it_ :
+ public PB_ASSOC_CONST_IT_C_DEC
+
+{
+
+public:
+
+ inline
+ it_(const node_pointer p_nd = NULL) : PB_ASSOC_CONST_IT_C_DEC((node_pointer)p_nd)
+ { }
+
+ inline
+ it_(const PB_ASSOC_ODIR_IT_C_DEC&
+ r_other)
+
+ : PB_ASSOC_CONST_IT_C_DEC(
+ r_other.m_p_nd)
+ { }
+
+ inline
+ PB_ASSOC_IT_C_DEC&
+ operator=(const PB_ASSOC_IT_C_DEC&
+ r_other)
+ {
+ my_base_it::m_p_nd = r_other.m_p_nd;
+
+ return (*this);
+ }
+
+ inline
+ PB_ASSOC_IT_C_DEC&
+ operator=(const PB_ASSOC_ODIR_IT_C_DEC&
+ r_other)
+ {
+ my_base_it::m_p_nd = r_other.m_p_nd;
+
+ return (*this);
+ }
+
+ inline pointer
+ operator->()
+ {
+ PB_ASSOC_DBG_ASSERT(my_base_it::m_p_nd != NULL);
+
+ return (&my_base_it::m_p_nd->m_value);
+ }
+
+ inline reference
+ operator*()
+ {
+ PB_ASSOC_DBG_ASSERT(my_base_it::m_p_nd != NULL);
+
+ return (my_base_it::m_p_nd->m_value);
+ }
+
+ inline PB_ASSOC_IT_C_DEC&
+ operator++()
+ {
+ PB_ASSOC_CONST_IT_C_DEC::
+ operator++();
+
+ return (*this);
+ }
+
+ inline PB_ASSOC_IT_C_DEC
+ operator++(int)
+ {
+ PB_ASSOC_IT_C_DEC
+ ret_it(my_base_it::m_p_nd);
+
+ operator++();
+
+ return (ret_it);
+ }
+
+ inline PB_ASSOC_IT_C_DEC&
+ operator--()
+ {
+ PB_ASSOC_CONST_IT_C_DEC::
+ operator--();
+
+ return (*this);
+ }
+
+ inline PB_ASSOC_IT_C_DEC
+ operator--(int)
+ {
+ PB_ASSOC_IT_C_DEC
+ ret_it(my_base_it::m_p_nd);
+
+ operator--();
+
+ return (ret_it);
+ }
+
+protected:
+ typedef PB_ASSOC_CONST_IT_C_DEC my_base_it;
+
+ friend class PB_ASSOC_CLASS_C_DEC;
+};
+
+#undef PB_ASSOC_CONST_IT_C_DEC
+
+#undef PB_ASSOC_CONST_ODIR_IT_C_DEC
+
+#undef PB_ASSOC_IT_C_DEC
+
+#undef PB_ASSOC_ODIR_IT_C_DEC
+
diff --git a/libstdc++-v3/include/ext/pb_assoc/detail/bin_search_tree_/info_fn_imps.hpp b/libstdc++-v3/include/ext/pb_assoc/detail/bin_search_tree_/info_fn_imps.hpp
new file mode 100644
index 00000000000..d6d4f547b78
--- /dev/null
+++ b/libstdc++-v3/include/ext/pb_assoc/detail/bin_search_tree_/info_fn_imps.hpp
@@ -0,0 +1,87 @@
+// -*- C++ -*-
+
+// 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.
+
+// As a special exception, you may use this file as part of a free software
+// library without restriction. Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General 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 info_fn_imps.hpp
+ * Contains an implementation class for bin_search_tree_.
+ */
+
+PB_ASSOC_CLASS_T_DEC
+template<class Other_Map_Type>
+bool
+PB_ASSOC_CLASS_C_DEC::
+cmp_with_other(const Other_Map_Type& r_other) const
+{
+ PB_ASSOC_DBG_ONLY(assert_valid(true, true);)
+
+ if (m_size != r_other.size())
+ return (false);
+
+ for (typename Other_Map_Type::const_iterator it = r_other.begin();
+ it != r_other.end(); ++it)
+ if (find((const_key_reference)PB_ASSOC_V2F(*it)) == end())
+ return (false);
+
+ return (true);
+}
+
+PB_ASSOC_CLASS_T_DEC
+inline bool
+PB_ASSOC_CLASS_C_DEC::
+empty() const
+{
+ return (size() == 0);
+}
+
+PB_ASSOC_CLASS_T_DEC
+inline typename PB_ASSOC_CLASS_C_DEC::size_type
+PB_ASSOC_CLASS_C_DEC::
+max_size() const
+{
+ return (s_node_allocator.max_size());
+}
+
+PB_ASSOC_CLASS_T_DEC
+inline typename PB_ASSOC_CLASS_C_DEC::size_type
+PB_ASSOC_CLASS_C_DEC::
+size() const
+{
+ return (m_size);
+}
+
diff --git a/libstdc++-v3/include/ext/pb_assoc/detail/bin_search_tree_/insert_fn_imps.hpp b/libstdc++-v3/include/ext/pb_assoc/detail/bin_search_tree_/insert_fn_imps.hpp
new file mode 100644
index 00000000000..725f5007eff
--- /dev/null
+++ b/libstdc++-v3/include/ext/pb_assoc/detail/bin_search_tree_/insert_fn_imps.hpp
@@ -0,0 +1,215 @@
+// -*- C++ -*-
+
+// 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.
+
+// As a special exception, you may use this file as part of a free software
+// library without restriction. Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General 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 insert_fn_imps.hpp
+ * Contains an implementation class for bin_search_tree_.
+ */
+
+PB_ASSOC_CLASS_T_DEC
+inline std::pair<typename PB_ASSOC_CLASS_C_DEC::find_iterator, bool>
+PB_ASSOC_CLASS_C_DEC::
+insert_leaf(const_mapped_reference r_mapped_value)
+{
+ PB_ASSOC_DBG_ONLY(assert_valid(true, true);)
+
+ if (m_size == 0)
+ return (std::make_pair(
+ insert_imp_empty(r_mapped_value),
+ true));
+
+ node_pointer p_nd = m_p_head->m_p_parent;
+ node_pointer p_pot = m_p_head;
+
+ while (p_nd != NULL)
+ if (!Cmp_Fn::operator()(
+ PB_ASSOC_V2F(p_nd->m_value),
+ PB_ASSOC_V2F(r_mapped_value)))
+ {
+ p_pot = p_nd;
+
+ p_nd = p_nd->m_p_left;
+ }
+ else
+ p_nd = p_nd->m_p_right;
+
+ if (p_pot == m_p_head)
+ return (std::make_pair(
+ insert_leaf_new(r_mapped_value, m_p_head->m_p_right, false),
+ true));
+
+ if (!Cmp_Fn::operator()(
+ PB_ASSOC_V2F(r_mapped_value),
+ PB_ASSOC_V2F(p_pot->m_value)))
+ {
+ PB_ASSOC_DBG_ONLY(assert_valid(true, true);)
+
+ PB_ASSOC_DBG_ONLY(my_map_debug_base::check_key_exists(
+ PB_ASSOC_V2F(r_mapped_value)));
+
+ return (std::make_pair(p_pot, false));
+ }
+
+ PB_ASSOC_DBG_ONLY(my_map_debug_base::check_key_does_not_exist(
+ PB_ASSOC_V2F(r_mapped_value)));
+
+ p_nd = p_pot->m_p_left;
+ if (p_nd == NULL)
+ return (std::make_pair(
+ insert_leaf_new(r_mapped_value, p_pot, true),
+ true));
+
+ while (p_nd->m_p_right != NULL)
+ p_nd = p_nd->m_p_right;
+
+ return (std::make_pair(
+ insert_leaf_new(r_mapped_value, p_nd, false),
+ true));
+}
+
+PB_ASSOC_CLASS_T_DEC
+inline typename PB_ASSOC_CLASS_C_DEC::iterator
+PB_ASSOC_CLASS_C_DEC::
+insert_leaf_new(const_mapped_reference r_mapped_value, node_pointer p_nd, bool left_nd)
+{
+ node_pointer p_new_nd =
+ get_new_node_for_leaf_insert(r_mapped_value, my_traits_base::s_no_throw_copies_indicator);
+
+ if (left_nd)
+ {
+ PB_ASSOC_DBG_ASSERT(p_nd->m_p_left == NULL);
+ PB_ASSOC_DBG_ASSERT(Cmp_Fn::operator()(
+ PB_ASSOC_V2F(r_mapped_value),
+ PB_ASSOC_V2F(p_nd->m_value)));
+
+ p_nd->m_p_left = p_new_nd;
+
+ if (m_p_head->m_p_left == p_nd)
+ m_p_head->m_p_left = p_new_nd;
+ }
+ else
+ {
+ PB_ASSOC_DBG_ASSERT(p_nd->m_p_right == NULL);
+ PB_ASSOC_DBG_ASSERT(Cmp_Fn::operator()(
+ PB_ASSOC_V2F(p_nd->m_value),
+ PB_ASSOC_V2F(r_mapped_value)));
+
+ p_nd->m_p_right = p_new_nd;
+
+ if (m_p_head->m_p_right == p_nd)
+ m_p_head->m_p_right = p_new_nd;
+ }
+
+ p_new_nd->m_p_parent = p_nd;
+
+ p_new_nd->m_p_left = p_new_nd->m_p_right = NULL;
+
+ PB_ASSOC_DBG_ONLY(assert_node_consistent(p_nd));
+
+ update_to_top(p_new_nd, (Node_Updator* )this);
+
+ PB_ASSOC_DBG_ONLY(my_map_debug_base::insert_new(
+ PB_ASSOC_V2F(r_mapped_value)));
+
+ return (iterator(p_new_nd));
+}
+
+PB_ASSOC_CLASS_T_DEC
+inline typename PB_ASSOC_CLASS_C_DEC::iterator
+PB_ASSOC_CLASS_C_DEC::
+insert_imp_empty(const_mapped_reference r_mapped_value)
+{
+ node_pointer p_new_node =
+ get_new_node_for_leaf_insert(r_mapped_value, my_traits_base::s_no_throw_copies_indicator);
+
+ m_p_head->m_p_left = m_p_head->m_p_right =
+ m_p_head->m_p_parent = p_new_node;
+
+ p_new_node->m_p_parent = m_p_head;
+
+ p_new_node->m_p_left = p_new_node->m_p_right = NULL;
+
+ PB_ASSOC_DBG_ONLY(my_map_debug_base::insert_new(
+ PB_ASSOC_V2F(r_mapped_value)));
+
+ update_to_top(m_p_head->m_p_parent, (Node_Updator* )this);
+
+ return (iterator(p_new_node));
+}
+
+PB_ASSOC_CLASS_T_DEC
+inline typename PB_ASSOC_CLASS_C_DEC::node_pointer
+PB_ASSOC_CLASS_C_DEC::
+get_new_node_for_leaf_insert(const_mapped_reference r_val, pb_assoc::detail::int_to_type<false>)
+{
+ node_pointer p_new_nd = s_node_allocator.allocate(1);
+
+ cond_dealtor_t cond(p_new_nd);
+
+ new (const_cast<void* >(
+ static_cast<const void* >(&p_new_nd->m_value)))
+ typename Node::value_type(r_val);
+
+ cond.set_no_action();
+
+ p_new_nd->m_p_left = p_new_nd->m_p_right = NULL;
+
+ ++m_size;
+
+ return (p_new_nd);
+}
+
+PB_ASSOC_CLASS_T_DEC
+inline typename PB_ASSOC_CLASS_C_DEC::node_pointer
+PB_ASSOC_CLASS_C_DEC::
+get_new_node_for_leaf_insert(const_mapped_reference r_val, pb_assoc::detail::int_to_type<true>)
+{
+ node_pointer p_new_nd = s_node_allocator.allocate(1);
+
+ new (const_cast<void* >(
+ static_cast<const void* >(&p_new_nd->m_value)))
+ typename Node::value_type(r_val);
+
+ p_new_nd->m_p_left = p_new_nd->m_p_right = NULL;
+
+ ++m_size;
+
+ return (p_new_nd);
+}
+
diff --git a/libstdc++-v3/include/ext/pb_assoc/detail/bin_search_tree_/iterators_fn_imps.hpp b/libstdc++-v3/include/ext/pb_assoc/detail/bin_search_tree_/iterators_fn_imps.hpp
new file mode 100644
index 00000000000..275fc748e71
--- /dev/null
+++ b/libstdc++-v3/include/ext/pb_assoc/detail/bin_search_tree_/iterators_fn_imps.hpp
@@ -0,0 +1,164 @@
+// -*- C++ -*-
+
+// 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.
+
+// As a special exception, you may use this file as part of a free software
+// library without restriction. Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General 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 iterators_fn_imps.hpp
+ * Contains an implementation class for bin_search_tree_.
+ */
+
+PB_ASSOC_CLASS_T_DEC
+inline typename PB_ASSOC_CLASS_C_DEC::iterator
+PB_ASSOC_CLASS_C_DEC::
+find_end()
+{
+ return (m_end_it);
+}
+
+PB_ASSOC_CLASS_T_DEC
+inline typename PB_ASSOC_CLASS_C_DEC::const_iterator
+PB_ASSOC_CLASS_C_DEC::
+find_end() const
+{
+ return (m_end_it);
+}
+
+PB_ASSOC_CLASS_T_DEC
+inline typename PB_ASSOC_CLASS_C_DEC::iterator
+PB_ASSOC_CLASS_C_DEC::
+begin()
+{
+ return (iterator(m_p_head->m_p_left));
+}
+
+PB_ASSOC_CLASS_T_DEC
+inline typename PB_ASSOC_CLASS_C_DEC::const_iterator
+PB_ASSOC_CLASS_C_DEC::
+begin() const
+{
+ return (const_iterator(m_p_head->m_p_left));
+}
+
+PB_ASSOC_CLASS_T_DEC
+inline typename PB_ASSOC_CLASS_C_DEC::iterator
+PB_ASSOC_CLASS_C_DEC::
+end()
+{
+ return (m_end_it);
+}
+
+PB_ASSOC_CLASS_T_DEC
+inline typename PB_ASSOC_CLASS_C_DEC::const_iterator
+PB_ASSOC_CLASS_C_DEC::
+end() const
+{
+ return (m_end_it);
+}
+
+PB_ASSOC_CLASS_T_DEC
+inline typename PB_ASSOC_CLASS_C_DEC::reverse_iterator
+PB_ASSOC_CLASS_C_DEC::
+find_rend()
+{
+ return (m_end_it);
+}
+
+PB_ASSOC_CLASS_T_DEC
+inline typename PB_ASSOC_CLASS_C_DEC::const_reverse_iterator
+PB_ASSOC_CLASS_C_DEC::
+find_rend() const
+{
+ return (m_end_it);
+}
+
+PB_ASSOC_CLASS_T_DEC
+inline typename PB_ASSOC_CLASS_C_DEC::const_reverse_iterator
+PB_ASSOC_CLASS_C_DEC::
+rbegin() const
+{
+ return (const_reverse_iterator(m_p_head->m_p_right));
+}
+
+PB_ASSOC_CLASS_T_DEC
+inline typename PB_ASSOC_CLASS_C_DEC::reverse_iterator
+PB_ASSOC_CLASS_C_DEC::
+rend()
+{
+ return (m_rend_it);
+}
+
+PB_ASSOC_CLASS_T_DEC
+inline typename PB_ASSOC_CLASS_C_DEC::const_reverse_iterator
+PB_ASSOC_CLASS_C_DEC::
+rend() const
+{
+ return (m_rend_it);
+}
+
+PB_ASSOC_CLASS_T_DEC
+inline typename PB_ASSOC_CLASS_C_DEC::const_node_iterator
+PB_ASSOC_CLASS_C_DEC::
+node_begin() const
+{
+ return (const_node_iterator(m_p_head->m_p_parent));
+}
+
+PB_ASSOC_CLASS_T_DEC
+inline typename PB_ASSOC_CLASS_C_DEC::node_iterator
+PB_ASSOC_CLASS_C_DEC::
+node_begin()
+{
+ return (node_iterator(m_p_head->m_p_parent));
+}
+
+PB_ASSOC_CLASS_T_DEC
+inline typename PB_ASSOC_CLASS_C_DEC::const_node_iterator
+PB_ASSOC_CLASS_C_DEC::
+node_end() const
+{
+ return (const_node_iterator(NULL));
+}
+
+PB_ASSOC_CLASS_T_DEC
+inline typename PB_ASSOC_CLASS_C_DEC::node_iterator
+PB_ASSOC_CLASS_C_DEC::
+node_end()
+{
+ return (node_iterator(NULL));
+}
+
diff --git a/libstdc++-v3/include/ext/pb_assoc/detail/bin_search_tree_/node_iterators.hpp b/libstdc++-v3/include/ext/pb_assoc/detail/bin_search_tree_/node_iterators.hpp
new file mode 100644
index 00000000000..d7425b355d8
--- /dev/null
+++ b/libstdc++-v3/include/ext/pb_assoc/detail/bin_search_tree_/node_iterators.hpp
@@ -0,0 +1,144 @@
+// -*- C++ -*-
+
+// 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.
+
+// As a special exception, you may use this file as part of a free software
+// library without restriction. Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General 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 node_iterators.hpp
+ * Contains an implementation class for bin_search_tree_.
+ */
+
+class const_node_it_
+{
+
+public:
+
+ typedef trivial_iterator_tag iterator_category;
+
+ typedef trivial_iterator_difference_type difference_type;
+
+ typedef const_iterator value_type;
+
+ typedef const_iterator* pointer;
+
+ typedef const_iterator* const_pointer;
+
+ typedef const_iterator& reference;
+
+ typedef const iterator& const_reference;
+
+public:
+
+ inline
+ const_node_it_(const node_pointer p_nd = NULL)
+
+ : m_p_nd(const_cast<node_pointer>(p_nd))
+ { }
+
+ inline const_iterator
+ operator*() const
+ {
+ return (const_iterator(m_p_nd));
+ }
+
+ inline const_node_it_
+ l_child() const
+ {
+ return (const_node_it_(m_p_nd->m_p_left));
+ }
+
+ inline const_node_it_
+ r_child() const
+ {
+ return (const_node_it_(m_p_nd->m_p_right));
+ }
+
+ inline bool
+ operator==(const const_node_it_& r_other) const
+ {
+ return (m_p_nd == r_other.m_p_nd);
+ }
+
+ inline bool
+ operator!=(const const_node_it_& r_other) const
+ {
+ return (m_p_nd != r_other.m_p_nd);
+ }
+
+private:
+
+ friend class PB_ASSOC_CLASS_C_DEC;
+
+public:
+ node_pointer m_p_nd;
+};
+
+class node_it_ :
+ public const_node_it_
+
+{
+
+public:
+
+ inline
+ node_it_(const node_pointer p_nd = NULL)
+
+ : const_node_it_(const_cast<node_pointer>(p_nd))
+ { }
+
+ inline iterator
+ operator*() const
+ {
+ return (iterator(const_node_it_::m_p_nd));
+ }
+
+ inline node_it_
+ l_child()
+ {
+ return (node_it_(const_node_it_::m_p_nd->m_p_left));
+ }
+
+ inline node_it_
+ r_child()
+ {
+ return (node_it_(const_node_it_::m_p_nd->m_p_right));
+ }
+
+private:
+ friend class PB_ASSOC_CLASS_C_DEC;
+};
+
diff --git a/libstdc++-v3/include/ext/pb_assoc/detail/bin_search_tree_/r_erase_fn_imps.hpp b/libstdc++-v3/include/ext/pb_assoc/detail/bin_search_tree_/r_erase_fn_imps.hpp
new file mode 100644
index 00000000000..c80d04428ef
--- /dev/null
+++ b/libstdc++-v3/include/ext/pb_assoc/detail/bin_search_tree_/r_erase_fn_imps.hpp
@@ -0,0 +1,124 @@
+// -*- C++ -*-
+
+// 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.
+
+// As a special exception, you may use this file as part of a free software
+// library without restriction. Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General 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 r_erase_fn_imps.hpp
+ * Contains an implementation class for bin_search_tree_.
+ */
+
+PB_ASSOC_CLASS_T_DEC
+inline void
+PB_ASSOC_CLASS_C_DEC::
+actual_erase_node(node_pointer p_z)
+{
+ PB_ASSOC_DBG_ASSERT(m_size > 0);
+ --m_size;
+
+ PB_ASSOC_DBG_ONLY(erase_existing(PB_ASSOC_V2F(p_z->m_value)));
+
+ p_z->~node();
+
+ s_node_allocator.deallocate(p_z, 1);
+}
+
+PB_ASSOC_CLASS_T_DEC
+inline void
+PB_ASSOC_CLASS_C_DEC::
+update_min_max_for_erased_node(node_pointer p_z)
+{
+ if (m_size == 1)
+ {
+ m_p_head->m_p_left = m_p_head->m_p_right = m_p_head;
+
+ return;
+ }
+
+ if (m_p_head->m_p_left == p_z)
+ {
+ iterator it(p_z);
+
+ ++it;
+
+ m_p_head->m_p_left = it.m_p_nd;
+ }
+ else if (m_p_head->m_p_right == p_z)
+ {
+ iterator it(p_z);
+
+ --it;
+
+ m_p_head->m_p_right = it.m_p_nd;
+ }
+}
+
+PB_ASSOC_CLASS_T_DEC
+void
+PB_ASSOC_CLASS_C_DEC::
+clear()
+{
+ PB_ASSOC_DBG_ONLY(assert_valid(true, true);)
+
+ clear_imp(m_p_head->m_p_parent);
+
+ m_size = 0;
+
+ initialize();
+
+ PB_ASSOC_DBG_ONLY(my_map_debug_base::clear();)
+
+ PB_ASSOC_DBG_ONLY(assert_valid(true, true);)
+ }
+
+PB_ASSOC_CLASS_T_DEC
+void
+PB_ASSOC_CLASS_C_DEC::
+clear_imp(node_pointer p_nd)
+{
+ if (p_nd == NULL)
+ return;
+
+ clear_imp(p_nd->m_p_left);
+
+ clear_imp(p_nd->m_p_right);
+
+ p_nd->~Node();
+
+ s_node_allocator.deallocate(p_nd, 1);
+}
+
diff --git a/libstdc++-v3/include/ext/pb_assoc/detail/bin_search_tree_/rotate_fn_imps.hpp b/libstdc++-v3/include/ext/pb_assoc/detail/bin_search_tree_/rotate_fn_imps.hpp
new file mode 100644
index 00000000000..bbca8ea1fed
--- /dev/null
+++ b/libstdc++-v3/include/ext/pb_assoc/detail/bin_search_tree_/rotate_fn_imps.hpp
@@ -0,0 +1,163 @@
+// -*- C++ -*-
+
+// 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.
+
+// As a special exception, you may use this file as part of a free software
+// library without restriction. Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General 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 rotate_fn_imps.hpp
+ * Contains imps for rotating nodes.
+ */
+
+PB_ASSOC_CLASS_T_DEC
+inline void
+PB_ASSOC_CLASS_C_DEC::
+rotate_left(node_pointer p_x)
+{
+ node_pointer p_y = p_x->m_p_right;
+
+ p_x->m_p_right = p_y->m_p_left;
+
+ if (p_y->m_p_left != NULL)
+ p_y->m_p_left->m_p_parent = p_x;
+
+ p_y->m_p_parent = p_x->m_p_parent;
+
+ if (p_x == m_p_head->m_p_parent)
+ m_p_head->m_p_parent = p_y;
+ else if (p_x == p_x->m_p_parent->m_p_left)
+ p_x->m_p_parent->m_p_left = p_y;
+ else
+ p_x->m_p_parent->m_p_right = p_y;
+
+ p_y->m_p_left = p_x;
+ p_x->m_p_parent = p_y;
+
+ PB_ASSOC_DBG_ONLY(assert_node_consistent(p_x);)
+ PB_ASSOC_DBG_ONLY(assert_node_consistent(p_y);)
+
+ apply_update(p_x, (Node_Updator* )this);
+ apply_update(p_x->m_p_parent, (Node_Updator* )this);
+}
+
+PB_ASSOC_CLASS_T_DEC
+inline void
+PB_ASSOC_CLASS_C_DEC::
+rotate_right(node_pointer p_x)
+{
+ node_pointer p_y = p_x->m_p_left;
+
+ p_x->m_p_left = p_y->m_p_right;
+
+ if (p_y->m_p_right != NULL)
+ p_y->m_p_right->m_p_parent = p_x;
+
+ p_y->m_p_parent = p_x->m_p_parent;
+
+ if (p_x == m_p_head->m_p_parent)
+ m_p_head->m_p_parent = p_y;
+ else if (p_x == p_x->m_p_parent->m_p_right)
+ p_x->m_p_parent->m_p_right = p_y;
+ else
+ p_x->m_p_parent->m_p_left = p_y;
+
+ p_y->m_p_right = p_x;
+ p_x->m_p_parent = p_y;
+
+ PB_ASSOC_DBG_ONLY(assert_node_consistent(p_x);)
+ PB_ASSOC_DBG_ONLY(assert_node_consistent(p_y);)
+
+ apply_update(p_x, (Node_Updator* )this);
+ apply_update(p_x->m_p_parent, (Node_Updator* )this);
+}
+
+PB_ASSOC_CLASS_T_DEC
+inline void
+PB_ASSOC_CLASS_C_DEC::
+rotate_parent(node_pointer p_nd)
+{
+ node_pointer p_parent = p_nd->m_p_parent;
+
+ if (p_nd == p_parent->m_p_left)
+ rotate_right(p_parent);
+ else
+ rotate_left(p_parent);
+
+ PB_ASSOC_DBG_ASSERT(p_parent->m_p_parent = p_nd);
+ PB_ASSOC_DBG_ASSERT(p_nd->m_p_left == p_parent ||
+ p_nd->m_p_right == p_parent);
+}
+
+PB_ASSOC_CLASS_T_DEC
+inline void
+PB_ASSOC_CLASS_C_DEC::
+apply_update(node_pointer /*p_nd*/, pb_assoc::null_node_updator* /*p_updator*/)
+{ }
+
+PB_ASSOC_CLASS_T_DEC
+template<class Node_Updator_>
+inline void
+PB_ASSOC_CLASS_C_DEC::
+apply_update(node_pointer p_nd, Node_Updator_* p_updator)
+{
+ p_updator->operator()(
+ &PB_ASSOC_V2F(p_nd->m_value),(p_nd->m_p_left == NULL)?
+ NULL :
+ &PB_ASSOC_V2F(p_nd->m_p_left->m_value),(p_nd->m_p_right == NULL)?
+ NULL :
+ &PB_ASSOC_V2F(p_nd->m_p_right->m_value));
+}
+
+PB_ASSOC_CLASS_T_DEC
+template<class Node_Updator_>
+inline void
+PB_ASSOC_CLASS_C_DEC::
+update_to_top(node_pointer p_nd, Node_Updator_* p_updator)
+{
+ while (p_nd != m_p_head)
+ {
+ apply_update(p_nd, p_updator);
+
+ p_nd = p_nd->m_p_parent;
+ }
+}
+
+PB_ASSOC_CLASS_T_DEC
+inline void
+PB_ASSOC_CLASS_C_DEC::
+update_to_top(node_pointer /*p_nd*/, pb_assoc::null_node_updator* /*p_updator*/)
+{ }
+
diff --git a/libstdc++-v3/include/ext/pb_assoc/detail/bin_search_tree_/split_join_fn_imps.hpp b/libstdc++-v3/include/ext/pb_assoc/detail/bin_search_tree_/split_join_fn_imps.hpp
new file mode 100644
index 00000000000..116e793d009
--- /dev/null
+++ b/libstdc++-v3/include/ext/pb_assoc/detail/bin_search_tree_/split_join_fn_imps.hpp
@@ -0,0 +1,192 @@
+// -*- C++ -*-
+
+// 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.
+
+// As a special exception, you may use this file as part of a free software
+// library without restriction. Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General 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 split_join_fn_imps.hpp
+ * Contains an implementation class for bin_search_tree_.
+ */
+
+PB_ASSOC_CLASS_T_DEC
+bool
+PB_ASSOC_CLASS_C_DEC::
+join_prep(PB_ASSOC_CLASS_C_DEC& r_other)
+{
+ PB_ASSOC_DBG_ONLY(assert_valid(true, true);)
+ PB_ASSOC_DBG_ONLY(r_other.assert_valid(true, true);)
+
+ if (r_other.m_size == 0)
+ return (false);
+
+ if (m_size == 0)
+ {
+ swap(r_other);
+
+ return (false);
+ }
+
+ const bool greater = Cmp_Fn::operator()(
+ PB_ASSOC_V2F(m_p_head->m_p_right->m_value),
+ PB_ASSOC_V2F(r_other.m_p_head->m_p_left->m_value));
+
+ const bool lesser = Cmp_Fn::operator()(
+ PB_ASSOC_V2F(r_other.m_p_head->m_p_right->m_value),
+ PB_ASSOC_V2F(m_p_head->m_p_left->m_value));
+
+ if (!greater&& !lesser)
+ throw cannot_join();
+
+ if (lesser)
+ swap(r_other);
+
+ m_size += r_other.m_size;
+
+#ifdef PB_ASSOC_BIN_SEARCH_TREE_DEBUG_
+ for (const_iterator other_it = r_other.begin(); other_it != r_other.end();
+ ++other_it)
+ {
+ my_map_debug_base::insert_new(PB_ASSOC_V2F(*other_it));
+ r_other.my_map_debug_base::erase_existing(PB_ASSOC_V2F(*other_it));
+ }
+#endif // PB_ASSOC_BIN_SEARCH_TREE_DEBUG_
+
+ return (true);
+}
+
+PB_ASSOC_CLASS_T_DEC
+void
+PB_ASSOC_CLASS_C_DEC::
+join_finish(PB_ASSOC_CLASS_C_DEC& r_other)
+{
+ initialize_min_max();
+
+ r_other.initialize();
+}
+
+PB_ASSOC_CLASS_T_DEC
+bool
+PB_ASSOC_CLASS_C_DEC::
+split_prep(const_key_reference r_key, PB_ASSOC_CLASS_C_DEC& r_other)
+{
+ PB_ASSOC_DBG_ONLY(assert_valid(true, true);)
+ PB_ASSOC_DBG_ONLY(r_other.assert_valid(true, true);)
+
+ r_other.clear();
+
+ if (m_size == 0)
+ {
+ PB_ASSOC_DBG_ONLY(assert_valid(true, true);)
+ PB_ASSOC_DBG_ONLY(r_other.assert_valid(true, true);)
+
+ return (false);
+ }
+
+ if (Cmp_Fn::operator()(r_key, PB_ASSOC_V2F(m_p_head->m_p_left->m_value)))
+ {
+ swap(r_other);
+
+ PB_ASSOC_DBG_ONLY(assert_valid(true, true);)
+ PB_ASSOC_DBG_ONLY(r_other.assert_valid(true, true);)
+
+ return (false);
+ }
+
+ if (!Cmp_Fn::operator()(
+ r_key,
+ PB_ASSOC_V2F(m_p_head->m_p_right->m_value)))
+ {
+ PB_ASSOC_DBG_ONLY(assert_valid(true, true);)
+ PB_ASSOC_DBG_ONLY(r_other.assert_valid(true, true);)
+
+ return (false);
+ }
+
+ if (m_size == 1)
+ {
+ swap(r_other);
+
+ PB_ASSOC_DBG_ONLY(assert_valid(true, true);)
+ PB_ASSOC_DBG_ONLY(r_other.assert_valid(true, true);)
+
+ return (false);
+ }
+
+#ifdef PB_ASSOC_BIN_SEARCH_TREE_DEBUG_
+ for (const_iterator it = begin(); it != end(); ++it)
+ if (Cmp_Fn::operator()(
+ r_key,
+ PB_ASSOC_V2F(*it)))
+ {
+ my_map_debug_base::erase_existing(PB_ASSOC_V2F(*it));
+ r_other.my_map_debug_base::insert_new(PB_ASSOC_V2F(*it));
+ }
+#endif // PB_ASSOC_BIN_SEARCH_TREE_DEBUG_
+
+ return (true);
+}
+
+PB_ASSOC_CLASS_T_DEC
+void
+PB_ASSOC_CLASS_C_DEC::
+split_finish(PB_ASSOC_CLASS_C_DEC& r_other)
+{
+ r_other.m_size = r_other.recursive_count(r_other.m_p_head->m_p_parent);
+
+ r_other.initialize_min_max();
+
+ m_size -= r_other.m_size;
+
+ initialize_min_max();
+
+ PB_ASSOC_DBG_ONLY(assert_valid(true, true);)
+ PB_ASSOC_DBG_ONLY(r_other.assert_valid(true, true);)
+ }
+
+PB_ASSOC_CLASS_T_DEC
+typename PB_ASSOC_CLASS_C_DEC::size_type
+PB_ASSOC_CLASS_C_DEC::
+recursive_count(node_pointer p_nd) const
+{
+ if (p_nd == NULL)
+ return (0);
+
+ return (1 +
+ recursive_count(p_nd->m_p_left) +
+ recursive_count(p_nd->m_p_right));
+}
+
diff --git a/libstdc++-v3/include/ext/pb_assoc/detail/cc_hash_assoc_cntnr/constructor_destructor_fn_imps.hpp b/libstdc++-v3/include/ext/pb_assoc/detail/cc_hash_assoc_cntnr/constructor_destructor_fn_imps.hpp
new file mode 100644
index 00000000000..490ddb85fa5
--- /dev/null
+++ b/libstdc++-v3/include/ext/pb_assoc/detail/cc_hash_assoc_cntnr/constructor_destructor_fn_imps.hpp
@@ -0,0 +1,153 @@
+// -*- C++ -*-
+
+// 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.
+
+// As a special exception, you may use this file as part of a free software
+// library without restriction. Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General 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 constructor_destructor_fn_imps.hpp
+ * Contains implementations of cc_ht's constructors, destructor,
+ * and related functions.
+ */
+
+PB_ASSOC_CLASS_T_DEC
+PB_ASSOC_CLASS_C_DEC::
+cc_hash_assoc_cntnr()
+{ }
+
+PB_ASSOC_CLASS_T_DEC
+PB_ASSOC_CLASS_C_DEC::
+cc_hash_assoc_cntnr(const Hash_Fn& r_hash_fn) :
+ my_base(r_hash_fn)
+{ }
+
+PB_ASSOC_CLASS_T_DEC
+PB_ASSOC_CLASS_C_DEC::
+cc_hash_assoc_cntnr(const Hash_Fn& r_hash_fn, const Eq_Fn& r_eq_fn) :
+ my_base(r_hash_fn, r_eq_fn)
+{ }
+
+PB_ASSOC_CLASS_T_DEC
+PB_ASSOC_CLASS_C_DEC::
+cc_hash_assoc_cntnr(const Hash_Fn& r_hash_fn, const Eq_Fn& r_eq_fn, const Comb_Hash_Fn& r_comb_hash_fn) :
+ my_base(r_hash_fn, r_eq_fn, r_comb_hash_fn)
+{ }
+
+PB_ASSOC_CLASS_T_DEC
+PB_ASSOC_CLASS_C_DEC::
+cc_hash_assoc_cntnr(const Hash_Fn& r_hash_fn, const Eq_Fn& r_eq_fn, const Comb_Hash_Fn& r_comb_hash_fn, const Resize_Policy& r_resize_policy) :
+ my_base(r_hash_fn, r_eq_fn, r_comb_hash_fn, r_resize_policy)
+{ }
+
+PB_ASSOC_CLASS_T_DEC
+PB_ASSOC_CLASS_C_DEC&
+PB_ASSOC_CLASS_C_DEC::
+operator=(const PB_ASSOC_CLASS_C_DEC& r_other)
+{
+ if (this !=& r_other)
+ {
+ PB_ASSOC_CLASS_C_DEC tmp(r_other);
+
+ swap(tmp);
+ }
+
+ return (*this);
+}
+
+PB_ASSOC_CLASS_T_DEC
+template<class It>
+PB_ASSOC_CLASS_C_DEC::
+cc_hash_assoc_cntnr(It first_it, It last_it)
+{
+ my_base::copy_from_range(first_it, last_it);
+}
+
+PB_ASSOC_CLASS_T_DEC
+template<class It>
+PB_ASSOC_CLASS_C_DEC::
+cc_hash_assoc_cntnr(It first_it, It last_it, const Hash_Fn& r_hash_fn) :
+ my_base(r_hash_fn)
+{
+ copy_from_range(first_it, last_it);
+}
+
+// Tmp Ami make all methods in assoc_cntnr.hpp inline
+
+PB_ASSOC_CLASS_T_DEC
+template<class It>
+PB_ASSOC_CLASS_C_DEC::
+cc_hash_assoc_cntnr(It first_it, It last_it, const Hash_Fn& r_hash_fn, const Eq_Fn& r_eq_fn) :
+ my_base(r_hash_fn, r_eq_fn)
+{
+ copy_from_range(first_it, last_it);
+}
+
+PB_ASSOC_CLASS_T_DEC
+template<class It>
+PB_ASSOC_CLASS_C_DEC::
+cc_hash_assoc_cntnr(It first_it, It last_it, const Hash_Fn& r_hash_fn, const Eq_Fn& r_eq_fn, const Comb_Hash_Fn& r_comb_hash_fn) :
+ my_base(r_hash_fn, r_eq_fn, r_comb_hash_fn)
+{
+ copy_from_range(first_it, last_it);
+}
+
+PB_ASSOC_CLASS_T_DEC
+template<class It>
+PB_ASSOC_CLASS_C_DEC::
+cc_hash_assoc_cntnr(It first_it, It last_it, const Hash_Fn& r_hash_fn, const Eq_Fn& r_eq_fn, const Comb_Hash_Fn& r_comb_hash_fn, const Resize_Policy& r_resize_policy) :
+ my_base(r_hash_fn, r_eq_fn, r_comb_hash_fn, r_resize_policy)
+{
+ copy_from_range(first_it, last_it);
+}
+
+PB_ASSOC_CLASS_T_DEC
+PB_ASSOC_CLASS_C_DEC::
+cc_hash_assoc_cntnr(const PB_ASSOC_CLASS_C_DEC& r_other) :
+ PB_ASSOC_BASE_C_DEC((const PB_ASSOC_BASE_C_DEC& )r_other)
+{ }
+
+PB_ASSOC_CLASS_T_DEC
+PB_ASSOC_CLASS_C_DEC::
+~cc_hash_assoc_cntnr()
+{ }
+
+PB_ASSOC_CLASS_T_DEC
+void
+PB_ASSOC_CLASS_C_DEC::
+swap(PB_ASSOC_CLASS_C_DEC& r_other)
+{
+ my_base::swap(r_other);
+}
diff --git a/libstdc++-v3/include/ext/pb_assoc/detail/cc_ht_map_/cc_ht_map_.hpp b/libstdc++-v3/include/ext/pb_assoc/detail/cc_ht_map_/cc_ht_map_.hpp
new file mode 100644
index 00000000000..3425ebf8ee8
--- /dev/null
+++ b/libstdc++-v3/include/ext/pb_assoc/detail/cc_ht_map_/cc_ht_map_.hpp
@@ -0,0 +1,602 @@
+// -*- C++ -*-
+
+// 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.
+
+// As a special exception, you may use this file as part of a free software
+// library without restriction. Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General 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 cc_ht_map_.hpp
+ * Contains an implementation class for cc_ht_map_.
+ */
+
+#include <utility>
+#include <iterator>
+#include <ext/pb_assoc/detail/cond_dealtor.hpp>
+#include <ext/pb_assoc/trivial_iterator_def.hpp>
+#include <ext/pb_assoc/detail/hash_fn/ranged_hash_fn.hpp>
+#include <ext/pb_assoc/detail/hash_types_traits.hpp>
+#include <ext/pb_assoc/detail/types_traits.hpp>
+#include <ext/pb_assoc/exception.hpp>
+#include <ext/pb_assoc/detail/map_debug_base.hpp>
+#include <ext/pb_assoc/detail/eq_fn/hash_eq_fn.hpp>
+
+namespace pb_assoc
+{
+
+ namespace detail
+ {
+
+#ifdef PB_ASSOC_CC_HT_MAP_DEBUG
+#define PB_ASSOC_DBG_ASSERT(X) assert(X)
+#define PB_ASSOC_DBG_VERIFY(X) assert(X)
+#define PB_ASSOC_DBG_ONLY(X) X
+#else // #ifdef PB_ASSOC_CC_HT_MAP_DEBUG
+#define PB_ASSOC_DBG_ASSERT(X)
+#define PB_ASSOC_DBG_VERIFY(X) {if((X)==0);}
+#define PB_ASSOC_DBG_ONLY(X) ;
+#endif // #ifdef PB_ASSOC_CC_HT_MAP_DEBUG
+
+#define PB_ASSOC_CLASS_T_DEC \
+ template< \
+ typename Key, \
+ typename Data, \
+ class Hash_Fn, \
+ class Eq_Fn, \
+ class Allocator, \
+ bool Store_Hash, \
+ class Comb_Hash_Fn, \
+ class Resize_Policy>
+
+#ifdef PB_ASSOC_DATA_TRUE_INDICATOR
+#define PB_ASSOC_CLASS_NAME \
+ cc_ht_map_data_
+#endif // #ifdef PB_ASSOC_DATA_TRUE_INDICATOR
+
+#ifdef PB_ASSOC_DATA_FALSE_INDICATOR
+#define PB_ASSOC_CLASS_NAME \
+ cc_ht_map_no_data_
+#endif // #ifdef PB_ASSOC_DATA_FALSE_INDICATOR
+
+#define PB_ASSOC_CLASS_C_DEC \
+ PB_ASSOC_CLASS_NAME< \
+ Key, \
+ Data, \
+ Hash_Fn, \
+ Eq_Fn, \
+ Allocator, \
+ Store_Hash, \
+ Comb_Hash_Fn, \
+ Resize_Policy >
+
+#define PB_ASSOC_HASH_EQ_FN_C_DEC \
+ pb_assoc::detail::hash_eq_fn< \
+ Key, \
+ Eq_Fn, \
+ Allocator, \
+ Store_Hash>
+
+#define PB_ASSOC_RANGED_HASH_FN_C_DEC \
+ pb_assoc::detail::ranged_hash_fn< \
+ Key, \
+ Hash_Fn, \
+ Allocator, \
+ Comb_Hash_Fn, \
+ Store_Hash>
+
+#define PB_ASSOC_TYPES_TRAITS_C_DEC \
+ types_traits< \
+ Key, \
+ Data, \
+ Allocator>
+
+#define PB_ASSOC_HASH_TYPES_TRAITS_C_DEC \
+ hash_types_traits< \
+ typename Allocator::size_type, \
+ Store_Hash>
+
+#ifdef PB_ASSOC_USE_MAP_DEBUG_BASE
+#define PB_ASSOC_MAP_DEBUG_BASE_C_DEC \
+ pb_assoc::detail::map_debug_base< \
+ Key, \
+ Eq_Fn>
+#endif // #ifdef PB_ASSOC_USE_MAP_DEBUG_BASE
+
+#ifdef PB_ASSOC_DATA_TRUE_INDICATOR
+#define PB_ASSOC_V2F(X) (X).first
+#define PB_ASSOC_V2S(X) (X).second
+#endif // #ifdef PB_ASSOC_DATA_TRUE_INDICATOR
+
+#ifdef PB_ASSOC_DATA_FALSE_INDICATOR
+#define PB_ASSOC_V2F(X) (X)
+#define PB_ASSOC_V2S(X) Mapped_Data()
+#endif // #ifdef PB_ASSOC_DATA_FALSE_INDICATOR
+
+#define PB_ASSOC_STATIC_ASSERT(UNIQUE, E) \
+ typedef \
+ pb_assoc::detail::static_assert_dummy_class< \
+ sizeof(pb_assoc::detail::static_assert<(bool)(E)>)> \
+ UNIQUE##static_assert_type
+
+ template<typename Key,
+ typename Data,
+ class Hash_Fn,
+ class Eq_Fn,
+ class Allocator,
+ bool Store_Hash,
+ class Comb_Hash_Fn,
+ class Resize_Policy >
+ class PB_ASSOC_CLASS_NAME:
+#ifdef PB_ASSOC_CC_HT_MAP_DEBUG
+ protected PB_ASSOC_MAP_DEBUG_BASE_C_DEC,
+#endif // #ifdef PB_ASSOC_CC_HT_MAP_DEBUG
+ public PB_ASSOC_HASH_EQ_FN_C_DEC,
+ public Resize_Policy,
+ public PB_ASSOC_RANGED_HASH_FN_C_DEC,
+ public PB_ASSOC_TYPES_TRAITS_C_DEC,
+ public PB_ASSOC_HASH_TYPES_TRAITS_C_DEC
+ {
+
+ public:
+
+ typedef typename Allocator::size_type size_type;
+
+ typedef
+ typename PB_ASSOC_TYPES_TRAITS_C_DEC::const_key_reference
+ const_key_reference;
+
+ typedef typename PB_ASSOC_TYPES_TRAITS_C_DEC::data_type data_type;
+
+ typedef
+ typename PB_ASSOC_TYPES_TRAITS_C_DEC::data_reference
+ data_reference;
+
+ typedef
+ typename PB_ASSOC_TYPES_TRAITS_C_DEC::const_data_reference
+ const_data_reference;
+
+ typedef typename PB_ASSOC_TYPES_TRAITS_C_DEC::value_type value_type;
+
+ typedef typename PB_ASSOC_TYPES_TRAITS_C_DEC::pointer pointer;
+
+ typedef
+ typename PB_ASSOC_TYPES_TRAITS_C_DEC::const_pointer
+ const_pointer;
+
+ typedef typename PB_ASSOC_TYPES_TRAITS_C_DEC::reference reference;
+
+ typedef
+ typename PB_ASSOC_TYPES_TRAITS_C_DEC::const_reference
+ const_reference;
+
+ protected:
+
+ typedef typename PB_ASSOC_HASH_TYPES_TRAITS_C_DEC::comp_hash comp_hash;
+
+ struct no_store_hash_entry
+ {
+ value_type m_value;
+
+ typename Allocator::template rebind<
+ no_store_hash_entry>::other::pointer m_p_next;
+ };
+
+ struct store_hash_entry
+ {
+ value_type m_value;
+
+ size_type m_hash;
+
+ typename Allocator::template rebind<
+ store_hash_entry>::other::pointer m_p_next;
+ };
+
+ typedef
+ typename cond_type<
+ Store_Hash,
+ store_hash_entry,
+ no_store_hash_entry>::type
+ entry;
+
+ typedef
+ typename Allocator::template rebind<entry>::other
+ entry_allocator;
+
+ typedef typename entry_allocator::pointer entry_pointer;
+
+ typedef typename entry_allocator::const_pointer const_entry_pointer;
+
+ typedef typename entry_allocator::reference entry_reference;
+
+ typedef
+ typename entry_allocator::const_reference
+ const_entry_reference;
+
+ typedef
+ typename Allocator::template rebind<entry_pointer>::other
+ entry_pointer_allocator;
+
+ typedef typename entry_pointer_allocator::pointer entry_pointer_array;
+
+ typedef value_type mapped_value_type;
+
+ typedef pointer mapped_pointer;
+
+ typedef const_pointer const_mapped_pointer;
+
+ typedef reference mapped_reference;
+
+ typedef const_reference const_mapped_reference;
+
+#define PB_ASSOC_GEN_POS std::pair<entry_pointer, size_type>
+
+#include <ext/pb_assoc/detail/unordered_iterator/const_find_iterator.hpp>
+#include <ext/pb_assoc/detail/unordered_iterator/find_iterator.hpp>
+#include <ext/pb_assoc/detail/unordered_iterator/const_iterator.hpp>
+#include <ext/pb_assoc/detail/unordered_iterator/iterator.hpp>
+
+#undef PB_ASSOC_GEN_POS
+
+ typedef find_iterator_ find_iterator;
+
+ typedef const_find_iterator_ const_find_iterator;
+
+ typedef iterator_ iterator;
+
+ typedef const_iterator_ const_iterator;
+
+ typedef Hash_Fn hash_fn;
+
+ typedef Eq_Fn eq_fn;
+
+ typedef Allocator allocator;
+
+ typedef Resize_Policy resize_policy;
+
+ protected:
+
+ PB_ASSOC_CLASS_NAME();
+
+ PB_ASSOC_CLASS_NAME(const Hash_Fn& r_hash_fn);
+
+ PB_ASSOC_CLASS_NAME(const Hash_Fn& r_hash_fn, const Eq_Fn& r_eq_fn);
+
+ PB_ASSOC_CLASS_NAME(const Hash_Fn& r_hash_fn, const Eq_Fn& r_eq_fn, const Comb_Hash_Fn& r_comb_hash_fn);
+
+ PB_ASSOC_CLASS_NAME(const Hash_Fn& r_hash_fn, const Eq_Fn& r_eq_fn, const Comb_Hash_Fn& r_comb_hash_fn, const Resize_Policy& r_resize_policy);
+
+ PB_ASSOC_CLASS_NAME(const PB_ASSOC_CLASS_C_DEC& r_other);
+
+ virtual
+ ~PB_ASSOC_CLASS_NAME();
+
+ void
+ swap(PB_ASSOC_CLASS_C_DEC& r_other);
+
+ template<class It>
+ void
+ copy_from_range(It first_it, It last_it);
+
+ inline size_type
+ size() const;
+
+ inline size_type
+ max_size() const;
+
+ inline bool
+ empty() const;
+
+ Hash_Fn&
+ get_hash_fn();
+
+ const Hash_Fn&
+ get_hash_fn() const;
+
+ Eq_Fn&
+ get_eq_fn();
+
+ const Eq_Fn&
+ get_eq_fn() const;
+
+ Comb_Hash_Fn&
+ get_comb_hash_fn();
+
+ const Comb_Hash_Fn&
+ get_comb_hash_fn() const;
+
+ Resize_Policy&
+ get_resize_policy();
+
+ const Resize_Policy&
+ get_resize_policy() const;
+
+ inline std::pair<find_iterator, bool>
+ insert(const_reference r_val);
+
+ inline data_reference
+ subscript_imp(const_key_reference r_key);
+
+ inline find_iterator
+ find(const_key_reference r_key);
+
+ inline const_find_iterator
+ find(const_key_reference r_key) const;
+
+ inline find_iterator
+ find_end();
+
+ inline const_find_iterator
+ find_end() const;
+
+ template<class T>
+ inline size_type
+ erase(T r_t, bool erase_entry_if_last, pb_assoc::detail::int_to_type<false>);
+
+ template<class T>
+ inline size_type
+ erase(T r_t, bool erase_entry_if_last, pb_assoc::detail::int_to_type<true>);
+
+ template<class Pred>
+ inline size_type
+ erase_if(Pred& r_pred);
+
+ void
+ clear();
+
+ inline iterator
+ begin();
+
+ inline const_iterator
+ begin() const;
+
+ inline iterator
+ end();
+
+ inline const_iterator
+ end() const;
+
+#ifdef PB_ASSOC_CC_HT_MAP_DEBUG
+
+ virtual void
+ assert_valid() const;
+
+#endif // #ifdef PB_ASSOC_CC_HT_MAP_DEBUG
+
+ virtual void
+ do_resize(size_type new_size);
+
+ private:
+
+ typedef PB_ASSOC_TYPES_TRAITS_C_DEC my_traits_base;
+
+ typedef PB_ASSOC_HASH_TYPES_TRAITS_C_DEC my_hash_traits_base;
+
+ typedef PB_ASSOC_RANGED_HASH_FN_C_DEC my_ranged_hash_fn_base;
+
+ typedef PB_ASSOC_HASH_EQ_FN_C_DEC my_hash_eq_fn_base;
+
+ typedef Resize_Policy my_resize_base;
+
+#ifdef PB_ASSOC_USE_MAP_DEBUG_BASE
+ typedef PB_ASSOC_MAP_DEBUG_BASE_C_DEC my_map_debug_base;
+#endif // #ifdef PB_ASSOC_USE_MAP_DEBUG_BASE
+
+ private:
+
+ inline bool
+ do_resize_if_needed();
+
+ inline void
+ do_resize_if_needed_no_throw();
+
+ void
+ resize_imp_no_exceptions(size_type new_size, entry_pointer_array a_p_entries_resized, size_type old_size);
+
+ inline entry_pointer
+ resize_imp_no_exceptions_reassign_pointer(entry_pointer p_e, entry_pointer_array a_p_entries_resized, int_to_type<false>);
+
+ inline entry_pointer
+ resize_imp_no_exceptions_reassign_pointer(entry_pointer p_e, entry_pointer_array a_p_entries_resized, int_to_type<true>);
+
+ template<class For_Each_Fn>
+ void
+ do_for_each(For_Each_Fn fn);
+
+ void
+ deallocate_links_in_list(entry_pointer p_e);
+
+ inline entry_pointer
+ get_entry(const_reference r_val, int_to_type<false>);
+
+ inline entry_pointer
+ get_entry(const_reference r_val, int_to_type<true>);
+
+ inline void
+ rels_entry(entry_pointer p_e);
+
+ void
+ constructor_insert_new_imp(const_reference r_val, size_type pos, int_to_type<false>);
+
+ void
+ constructor_insert_new_imp(const_reference r_val, size_type pos, int_to_type<true>);
+
+ void
+ deallocate_all();
+
+ inline data_reference
+ subscript_imp(const_key_reference r_key, int_to_type<false>);
+
+ inline data_reference
+ subscript_imp(const_key_reference r_key, int_to_type<true>);
+
+ inline std::pair<find_iterator, bool>
+ insert_imp(const_reference r_val, int_to_type<false>);
+
+ inline std::pair<find_iterator, bool>
+ insert_imp(const_reference r_val, int_to_type<true>);
+
+ inline pointer
+ insert_new_imp(const_reference r_val, size_type pos);
+
+ inline pointer
+ insert_new_imp(const_reference r_val, comp_hash& r_pos_hash_pair);
+
+ inline const_data_reference
+ const_subscript_imp(const_key_reference r_key, int_to_type<false>) const;
+
+ inline const_data_reference
+ const_subscript_imp(const_key_reference r_key, int_to_type<true>) const;
+
+ inline pointer
+ find_key_pointer(const_key_reference r_key, int_to_type<false>);
+
+ inline pointer
+ find_key_pointer(const_key_reference r_key, int_to_type<true>);
+
+ template<class T>
+ inline size_type
+ erase_in_pos_imp(T r_t, bool erase_entry_if_last, size_type pos);
+
+ template<class T>
+ inline size_type
+ erase_in_pos_imp(T r_t, bool erase_entry_if_last, const comp_hash& r_pos_hash_pair);
+
+ inline void
+ erase_entry_pointer(entry_pointer& r_p_e);
+
+#ifdef PB_ASSOC_DATA_TRUE_INDICATOR
+ void
+ inc_it_state(pointer& r_p_value, std::pair<entry_pointer, size_type>& r_pos) const;
+#endif // #ifdef PB_ASSOC_DATA_TRUE_INDICATOR
+
+ void
+ inc_it_state(const_pointer& r_p_value, std::pair<entry_pointer, size_type>& r_pos) const;
+
+ void
+ get_start_it_state(pointer& r_p_value, std::pair<entry_pointer, size_type>& r_pos) const;
+
+#ifdef PB_ASSOC_CC_HT_MAP_DEBUG
+
+ void
+ assert_entry_pointer_array_valid(const entry_pointer_array a_p_entries) const;
+
+ void
+ assert_entry_pointer_valid(const entry_pointer p_e, store_hash_true_indicator) const;
+
+ void
+ assert_entry_pointer_valid(const entry_pointer p_e, store_hash_false_indicator) const;
+
+#endif // #ifdef PB_ASSOC_CC_HT_MAP_DEBUG
+
+ private:
+ static entry_allocator s_entry_allocator;
+
+ static entry_pointer_allocator s_entry_pointer_allocator;
+
+ typedef
+ pb_assoc::detail::cond_dealtor<
+ entry,
+ Allocator>
+ cond_dealtor_t;
+
+ entry_pointer_array m_a_p_entries;
+
+ size_type m_num_e_p;
+
+ size_type m_num_used_e;
+
+ friend class iterator_;
+
+ friend class const_iterator_;
+
+ static iterator s_end_it;
+
+ static const_iterator s_const_end_it;
+
+ static find_iterator s_find_end_it;
+
+ static const_find_iterator s_const_find_end_it;
+
+ enum
+ {
+ store_hash_ok =
+ !Store_Hash ||
+ !pb_assoc::detail::is_same_type<
+ Hash_Fn,
+ pb_assoc::null_hash_fn>::value
+ };
+
+ PB_ASSOC_STATIC_ASSERT(sth, store_hash_ok);
+ };
+
+#include <ext/pb_assoc/detail/cc_ht_map_/constructor_destructor_fn_imps.hpp>
+#include <ext/pb_assoc/detail/cc_ht_map_/entry_list_fn_imps.hpp>
+#include <ext/pb_assoc/detail/cc_ht_map_/find_fn_imps.hpp>
+#include <ext/pb_assoc/detail/cc_ht_map_/resize_fn_imps.hpp>
+#include <ext/pb_assoc/detail/cc_ht_map_/debug_fn_imps.hpp>
+#include <ext/pb_assoc/detail/cc_ht_map_/size_fn_imps.hpp>
+#include <ext/pb_assoc/detail/cc_ht_map_/policy_access_fn_imps.hpp>
+#include <ext/pb_assoc/detail/cc_ht_map_/erase_fn_imps.hpp>
+#include <ext/pb_assoc/detail/cc_ht_map_/iterators_fn_imps.hpp>
+#include <ext/pb_assoc/detail/cc_ht_map_/insert_fn_imps.hpp>
+
+#undef PB_ASSOC_CLASS_T_DEC
+
+#undef PB_ASSOC_CLASS_C_DEC
+
+#undef PB_ASSOC_HASH_EQ_FN_C_DEC
+
+#undef PB_ASSOC_RANGED_HASH_FN_C_DEC
+
+#undef PB_ASSOC_TYPES_TRAITS_C_DEC
+
+#undef PB_ASSOC_HASH_TYPES_TRAITS_C_DEC
+
+#undef PB_ASSOC_MAP_DEBUG_BASE_C_DEC
+
+#undef PB_ASSOC_CLASS_NAME
+
+#undef PB_ASSOC_V2F
+#undef PB_ASSOC_V2S
+
+#undef PB_ASSOC_DBG_ASSERT
+#undef PB_ASSOC_DBG_VERIFY
+#undef PB_ASSOC_DBG_ONLY
+
+#undef PB_ASSOC_STATIC_ASSERT
+
+ } // namespace detail
+
+} // namespace pb_assoc
diff --git a/libstdc++-v3/include/ext/pb_assoc/detail/cc_ht_map_/cmp_fn_imps.hpp b/libstdc++-v3/include/ext/pb_assoc/detail/cc_ht_map_/cmp_fn_imps.hpp
new file mode 100644
index 00000000000..7eac5808df8
--- /dev/null
+++ b/libstdc++-v3/include/ext/pb_assoc/detail/cc_ht_map_/cmp_fn_imps.hpp
@@ -0,0 +1,92 @@
+// -*- C++ -*-
+
+// 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.
+
+// As a special exception, you may use this file as part of a free software
+// library without restriction. Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General 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 cmp_fn_imps.hpp
+ * Contains implementations of cc_ht_map_'s entire container comparison related
+ * functions.
+ */
+
+PB_ASSOC_CLASS_T_DEC
+template<class Other_HT_Map_Type>
+bool
+PB_ASSOC_CLASS_C_DEC::
+operator==(const Other_HT_Map_Type& r_other) const
+{
+ return (cmp_with_other(r_other));
+}
+
+PB_ASSOC_CLASS_T_DEC
+template<class Other_Map_Type>
+bool
+PB_ASSOC_CLASS_C_DEC::
+cmp_with_other(const Other_Map_Type& r_other) const
+{
+ if (size() != r_other.size())
+ return (false);
+
+ for (typename Other_Map_Type::const_iterator it = r_other.begin();
+ it != r_other.end(); ++it)
+ {
+ const_key_reference r_key =(const_key_reference)PB_ASSOC_V2F(*it);
+
+ const_mapped_pointer p_mapped_value =
+ const_cast<PB_ASSOC_CLASS_C_DEC& >(*this).
+ find_key_pointer(r_key, my_traits_base::m_store_hash_indicator);
+
+ if (p_mapped_value == NULL)
+ return (false);
+
+#ifdef PB_ASSOC_DATA_TRUE_INDICATOR
+ if (p_mapped_value->second != it->second)
+ return (false);
+#endif // #ifdef PB_ASSOC_DATA_TRUE_INDICATOR
+ }
+
+ return (true);
+}
+
+PB_ASSOC_CLASS_T_DEC
+template<class Other_HT_Map_Type>
+bool
+PB_ASSOC_CLASS_C_DEC::
+operator!=(const Other_HT_Map_Type& r_other) const
+{
+ return (!operator==(r_other));
+}
diff --git a/libstdc++-v3/include/ext/pb_assoc/detail/cc_ht_map_/cond_key_dtor_entry_dealtor.hpp b/libstdc++-v3/include/ext/pb_assoc/detail/cc_ht_map_/cond_key_dtor_entry_dealtor.hpp
new file mode 100644
index 00000000000..864b80541bc
--- /dev/null
+++ b/libstdc++-v3/include/ext/pb_assoc/detail/cc_ht_map_/cond_key_dtor_entry_dealtor.hpp
@@ -0,0 +1,138 @@
+// -*- C++ -*-
+
+// 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.
+
+// As a special exception, you may use this file as part of a free software
+// library without restriction. Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General 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 cond_key_dtor_entry_dealtor.hpp
+ * Contains a conditional key destructor, used for exception handling.
+ */
+
+namespace pb_assoc
+{
+
+ namespace detail
+ {
+
+#define PB_ASSOC_CLASS_T_DEC \
+ template<class HT_Map>
+
+#define PB_ASSOC_CLASS_C_DEC \
+ PB_ASSOC_CKDED_CLASS_NAME< \
+ HT_Map>
+
+ /**
+ * A conditional key destructor, used for exception handling.
+ **/
+ template<class HT_Map>
+ class PB_ASSOC_CKDED_CLASS_NAME
+ {
+ public:
+ typedef typename HT_Map::entry entry;
+
+ typedef typename HT_Map::entry_allocator entry_allocator;
+
+ typedef typename HT_Map::key_type key_type;
+
+ public:
+ inline
+ PB_ASSOC_CKDED_CLASS_NAME(entry_allocator* p_a, entry* p_e);
+
+ inline
+ ~PB_ASSOC_CKDED_CLASS_NAME();
+
+ inline void
+ set_key_destruct();
+
+ inline void
+ set_no_action_destructor();
+
+ protected:
+ entry_allocator* const m_p_a;
+ entry* const m_p_e;
+
+ bool m_key_destruct;
+ bool m_no_action_destructor;
+ };
+
+ PB_ASSOC_CLASS_T_DEC
+ inline
+ PB_ASSOC_CLASS_C_DEC::
+ PB_ASSOC_CKDED_CLASS_NAME(entry_allocator* p_a, entry* p_e) :
+ m_p_a(p_a),
+ m_p_e(p_e),
+ m_key_destruct(false),
+ m_no_action_destructor(false)
+ { }
+
+ PB_ASSOC_CLASS_T_DEC
+ inline void
+ PB_ASSOC_CLASS_C_DEC::
+ set_key_destruct()
+ {
+ m_key_destruct = true;
+ }
+
+ PB_ASSOC_CLASS_T_DEC
+ inline void
+ PB_ASSOC_CLASS_C_DEC::
+ set_no_action_destructor()
+ {
+ m_no_action_destructor = true;
+ }
+
+ PB_ASSOC_CLASS_T_DEC
+ inline
+ PB_ASSOC_CLASS_C_DEC::
+ ~PB_ASSOC_CKDED_CLASS_NAME()
+ {
+ if (m_no_action_destructor)
+ return;
+
+ if (m_key_destruct)
+ m_p_e->m_value.first.~key_type();
+
+ m_p_a->deallocate(m_p_e, 1);
+ }
+
+#undef PB_ASSOC_CLASS_T_DEC
+#undef PB_ASSOC_CLASS_C_DEC
+
+ } // namespace detail
+
+} // namespace pb_assoc
+
diff --git a/libstdc++-v3/include/ext/pb_assoc/detail/cc_ht_map_/constructor_destructor_fn_imps.hpp b/libstdc++-v3/include/ext/pb_assoc/detail/cc_ht_map_/constructor_destructor_fn_imps.hpp
new file mode 100644
index 00000000000..90fa272b6c4
--- /dev/null
+++ b/libstdc++-v3/include/ext/pb_assoc/detail/cc_ht_map_/constructor_destructor_fn_imps.hpp
@@ -0,0 +1,227 @@
+// -*- C++ -*-
+
+// 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.
+
+// As a special exception, you may use this file as part of a free software
+// library without restriction. Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General 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 constructor_destructor_fn_imps.hpp
+ * Contains implementations of cc_ht_map_'s constructors, destructor,
+ * and related functions.
+ */
+
+PB_ASSOC_CLASS_T_DEC
+typename PB_ASSOC_CLASS_C_DEC::entry_allocator
+PB_ASSOC_CLASS_C_DEC::s_entry_allocator;
+
+PB_ASSOC_CLASS_T_DEC
+typename PB_ASSOC_CLASS_C_DEC::entry_pointer_allocator
+PB_ASSOC_CLASS_C_DEC::s_entry_pointer_allocator;
+
+PB_ASSOC_CLASS_T_DEC
+template<class It>
+void
+PB_ASSOC_CLASS_C_DEC::
+copy_from_range(It first_it, It last_it)
+{
+ while (first_it != last_it)
+ insert(*(first_it++));
+}
+
+PB_ASSOC_CLASS_T_DEC
+PB_ASSOC_CLASS_C_DEC::
+PB_ASSOC_CLASS_NAME() :
+ my_ranged_hash_fn_base(Resize_Policy::get_init_size()),
+ m_a_p_entries(s_entry_pointer_allocator.allocate(
+ Resize_Policy::get_init_size())),
+ m_num_e_p(Resize_Policy::get_init_size()),
+ m_num_used_e(0)
+{
+ std::fill(m_a_p_entries, m_a_p_entries + m_num_e_p, (entry_pointer)NULL);
+
+ PB_ASSOC_DBG_ONLY(PB_ASSOC_CLASS_C_DEC::assert_valid();)
+ }
+
+PB_ASSOC_CLASS_T_DEC
+PB_ASSOC_CLASS_C_DEC::
+PB_ASSOC_CLASS_NAME(const Hash_Fn& r_hash_fn) :
+ my_ranged_hash_fn_base(Resize_Policy::get_init_size(),
+ r_hash_fn),
+ m_a_p_entries(s_entry_pointer_allocator.allocate(
+ Resize_Policy::get_init_size())),
+ m_num_e_p(Resize_Policy::get_init_size()),
+ m_num_used_e(0)
+{
+ std::fill(m_a_p_entries, m_a_p_entries + m_num_e_p, (entry_pointer)NULL);
+
+ PB_ASSOC_DBG_ONLY(PB_ASSOC_CLASS_C_DEC::assert_valid();)
+ }
+
+PB_ASSOC_CLASS_T_DEC
+PB_ASSOC_CLASS_C_DEC::
+PB_ASSOC_CLASS_NAME(const Hash_Fn& r_hash_fn, const Eq_Fn& r_eq_fn) :
+ PB_ASSOC_HASH_EQ_FN_C_DEC(r_eq_fn),
+ my_ranged_hash_fn_base(Resize_Policy::get_init_size(),
+ r_hash_fn),
+ m_a_p_entries(s_entry_pointer_allocator.allocate(
+ Resize_Policy::get_init_size())),
+ m_num_e_p(Resize_Policy::get_init_size()),
+ m_num_used_e(0)
+{
+ std::fill(m_a_p_entries, m_a_p_entries + m_num_e_p, (entry_pointer)NULL);
+
+ PB_ASSOC_DBG_ONLY(PB_ASSOC_CLASS_C_DEC::assert_valid();)
+ }
+
+PB_ASSOC_CLASS_T_DEC
+PB_ASSOC_CLASS_C_DEC::
+PB_ASSOC_CLASS_NAME(const Hash_Fn& r_hash_fn, const Eq_Fn& r_eq_fn, const Comb_Hash_Fn& r_comb_hash_fn) :
+ PB_ASSOC_HASH_EQ_FN_C_DEC(r_eq_fn),
+ my_ranged_hash_fn_base(Resize_Policy::get_init_size(),
+ r_hash_fn, r_comb_hash_fn),
+ m_a_p_entries(s_entry_pointer_allocator.allocate(
+ Resize_Policy::get_init_size())),
+ m_num_e_p(Resize_Policy::get_init_size()),
+ m_num_used_e(0)
+{
+ std::fill(m_a_p_entries, m_a_p_entries + m_num_e_p, (entry_pointer)NULL);
+
+ PB_ASSOC_DBG_ONLY(PB_ASSOC_CLASS_C_DEC::assert_valid();)
+ }
+
+PB_ASSOC_CLASS_T_DEC
+PB_ASSOC_CLASS_C_DEC::
+PB_ASSOC_CLASS_NAME(const Hash_Fn& r_hash_fn, const Eq_Fn& r_eq_fn, const Comb_Hash_Fn& r_comb_hash_fn, const Resize_Policy& r_resize_policy) :
+ PB_ASSOC_HASH_EQ_FN_C_DEC(r_eq_fn),
+ Resize_Policy(r_resize_policy),
+ my_ranged_hash_fn_base(Resize_Policy::get_init_size(),
+ r_hash_fn, r_comb_hash_fn),
+ m_a_p_entries(s_entry_pointer_allocator.allocate(
+ Resize_Policy::get_init_size())),
+ m_num_e_p(Resize_Policy::get_init_size()),
+ m_num_used_e(0)
+{
+ std::fill(m_a_p_entries, m_a_p_entries + m_num_e_p, (entry_pointer)NULL);
+
+ PB_ASSOC_DBG_ONLY(PB_ASSOC_CLASS_C_DEC::assert_valid();)
+ }
+
+PB_ASSOC_CLASS_T_DEC
+PB_ASSOC_CLASS_C_DEC::
+PB_ASSOC_CLASS_NAME(const PB_ASSOC_CLASS_C_DEC& r_other) :
+ PB_ASSOC_HASH_EQ_FN_C_DEC(r_other),
+ my_resize_base(r_other),
+ my_ranged_hash_fn_base(r_other),
+ m_a_p_entries(s_entry_pointer_allocator.allocate(
+ r_other.m_num_e_p)),
+ m_num_e_p(r_other.m_num_e_p),
+ m_num_used_e(r_other.m_num_used_e)
+{
+ PB_ASSOC_DBG_ONLY(r_other.assert_valid();)
+
+ std::fill(m_a_p_entries, m_a_p_entries + m_num_e_p, (entry_pointer)NULL);
+
+ try
+ {
+ for (size_type i = 0; i < m_num_e_p; ++i)
+ {
+ entry_pointer p_e = r_other.m_a_p_entries[i];
+
+ while (p_e != NULL)
+ {
+ constructor_insert_new_imp(
+ const_mapped_reference(p_e->m_value), i,
+ my_hash_traits_base::s_store_hash_indicator);
+
+ p_e = p_e->m_p_next;
+ }
+ }
+ }
+ catch(...)
+ {
+ deallocate_all();
+
+ throw;
+ }
+
+ PB_ASSOC_DBG_ONLY(PB_ASSOC_CLASS_C_DEC::assert_valid();)
+ }
+
+PB_ASSOC_CLASS_T_DEC
+PB_ASSOC_CLASS_C_DEC::
+~PB_ASSOC_CLASS_NAME()
+{
+ deallocate_all();
+}
+
+PB_ASSOC_CLASS_T_DEC
+void
+PB_ASSOC_CLASS_C_DEC::
+swap(PB_ASSOC_CLASS_C_DEC& r_other)
+{
+ PB_ASSOC_DBG_ONLY(assert_valid());
+ PB_ASSOC_DBG_ONLY(r_other.assert_valid());
+
+ std::swap(m_a_p_entries, r_other.m_a_p_entries);
+
+ std::swap(m_num_e_p, r_other.m_num_e_p);
+
+ std::swap(m_num_used_e, r_other.m_num_used_e);
+
+ my_ranged_hash_fn_base::swap(r_other);
+
+ my_hash_eq_fn_base::swap(r_other);
+
+ my_resize_base::swap(r_other);
+
+ PB_ASSOC_DBG_ONLY(my_map_debug_base::swap(r_other));
+
+ PB_ASSOC_DBG_ONLY(assert_valid());
+ PB_ASSOC_DBG_ONLY(r_other.assert_valid());
+}
+
+PB_ASSOC_CLASS_T_DEC
+void
+PB_ASSOC_CLASS_C_DEC::
+deallocate_all()
+{
+ clear();
+
+ s_entry_pointer_allocator.deallocate(m_a_p_entries, m_num_e_p);
+}
+
+#include <ext/pb_assoc/detail/cc_ht_map_/constructor_destructor_store_hash_fn_imps.hpp>
+#include <ext/pb_assoc/detail/cc_ht_map_/constructor_destructor_no_store_hash_fn_imps.hpp>
diff --git a/libstdc++-v3/include/ext/pb_assoc/detail/cc_ht_map_/constructor_destructor_no_store_hash_fn_imps.hpp b/libstdc++-v3/include/ext/pb_assoc/detail/cc_ht_map_/constructor_destructor_no_store_hash_fn_imps.hpp
new file mode 100644
index 00000000000..79641a6bc18
--- /dev/null
+++ b/libstdc++-v3/include/ext/pb_assoc/detail/cc_ht_map_/constructor_destructor_no_store_hash_fn_imps.hpp
@@ -0,0 +1,61 @@
+// -*- C++ -*-
+
+// 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.
+
+// As a special exception, you may use this file as part of a free software
+// library without restriction. Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General 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 constructor_destructor_no_store_hash_fn_imps.hpp
+ * Contains implementations of cc_ht_map_'s constructors, destructor,
+ * and related functions.
+ */
+
+PB_ASSOC_CLASS_T_DEC
+inline void
+PB_ASSOC_CLASS_C_DEC::
+constructor_insert_new_imp(const_mapped_reference r_val, size_type pos, int_to_type<false>)
+{
+ // Following lines might throw an exception.
+ entry_pointer p_e = get_entry(r_val, my_traits_base::s_no_throw_copies_indicator);
+
+ // At this point no exceptions can be thrown.
+
+ p_e->m_p_next = m_a_p_entries[pos];
+
+ m_a_p_entries[pos] = p_e;
+
+ PB_ASSOC_DBG_ONLY(my_map_debug_base::insert_new(r_key);)
+ }
diff --git a/libstdc++-v3/include/ext/pb_assoc/detail/cc_ht_map_/constructor_destructor_store_hash_fn_imps.hpp b/libstdc++-v3/include/ext/pb_assoc/detail/cc_ht_map_/constructor_destructor_store_hash_fn_imps.hpp
new file mode 100644
index 00000000000..551ae8663e2
--- /dev/null
+++ b/libstdc++-v3/include/ext/pb_assoc/detail/cc_ht_map_/constructor_destructor_store_hash_fn_imps.hpp
@@ -0,0 +1,63 @@
+// -*- C++ -*-
+
+// 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.
+
+// As a special exception, you may use this file as part of a free software
+// library without restriction. Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General 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 constructor_destructor_no_store_hash_fn_imps.hpp
+ * Contains implementations of cc_ht_map_'s constructors, destructor,
+ * and related functions.
+ */
+
+PB_ASSOC_CLASS_T_DEC
+inline void
+PB_ASSOC_CLASS_C_DEC::
+constructor_insert_new_imp(const_reference r_val, size_type pos, int_to_type<true>)
+{
+ // Following lines might throw an exception.
+ entry_pointer p_e = get_entry(r_val, my_traits_base::s_no_throw_copies_indicator);
+
+ // At this point no exceptions can be thrown.
+
+ p_e->m_p_next = m_a_p_entries[pos];
+
+ p_e->m_hash = my_ranged_hash_fn_base::operator()((const_key_reference)(PB_ASSOC_V2F(p_e->m_value))).second;
+
+ m_a_p_entries[pos] = p_e;
+
+ PB_ASSOC_DBG_ONLY(my_map_debug_base::insert_new(r_key);)
+ }
diff --git a/libstdc++-v3/include/ext/pb_assoc/detail/cc_ht_map_/debug_fn_imps.hpp b/libstdc++-v3/include/ext/pb_assoc/detail/cc_ht_map_/debug_fn_imps.hpp
new file mode 100644
index 00000000000..639f74d4bd4
--- /dev/null
+++ b/libstdc++-v3/include/ext/pb_assoc/detail/cc_ht_map_/debug_fn_imps.hpp
@@ -0,0 +1,83 @@
+// -*- C++ -*-
+
+// 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.
+
+// As a special exception, you may use this file as part of a free software
+// library without restriction. Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General 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_fn_imps.hpp
+ * Contains implementations of cc_ht_map_'s debug-mode functions.
+ */
+
+#ifdef PB_ASSOC_CC_HT_MAP_DEBUG
+
+PB_ASSOC_CLASS_T_DEC
+void
+PB_ASSOC_CLASS_C_DEC::
+assert_valid() const
+{
+ my_map_debug_base::check_size(m_num_used_e);
+
+ assert_entry_pointer_array_valid(m_a_p_entries);
+}
+
+PB_ASSOC_CLASS_T_DEC
+void
+PB_ASSOC_CLASS_C_DEC::
+assert_entry_pointer_array_valid(const entry_pointer_array a_p_entries) const
+{
+ size_type iterated_num_used_e = 0;
+
+ for (size_type pos = 0; pos < m_num_e_p; ++pos)
+ {
+ entry_pointer p_e = a_p_entries[pos];
+
+ while (p_e != NULL)
+ {
+ ++iterated_num_used_e;
+
+ assert_entry_pointer_valid(p_e, my_traits_base::m_store_hash_indicator);
+
+ p_e = p_e->m_p_next;
+ }
+ }
+
+ PB_ASSOC_DBG_ASSERT(iterated_num_used_e == m_num_used_e);
+}
+
+#include <ext/pb_assoc/detail/cc_ht_map_/debug_store_hash_fn_imps.hpp>
+#include <ext/pb_assoc/detail/cc_ht_map_/debug_no_store_hash_fn_imps.hpp>
+#endif // #ifdef PB_ASSOC_CC_HT_MAP_DEBUG
diff --git a/libstdc++-v3/include/ext/pb_assoc/detail/cc_ht_map_/debug_no_store_hash_fn_imps.hpp b/libstdc++-v3/include/ext/pb_assoc/detail/cc_ht_map_/debug_no_store_hash_fn_imps.hpp
new file mode 100644
index 00000000000..1af3be69d48
--- /dev/null
+++ b/libstdc++-v3/include/ext/pb_assoc/detail/cc_ht_map_/debug_no_store_hash_fn_imps.hpp
@@ -0,0 +1,54 @@
+// -*- C++ -*-
+
+// 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.
+
+// As a special exception, you may use this file as part of a free software
+// library without restriction. Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General 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_no_store_hash_fn_imps.hpp
+ * Contains implementations of cc_ht_map_'s debug-mode functions.
+ */
+
+#ifdef PB_ASSOC_CC_HT_MAP_DEBUG
+
+PB_ASSOC_CLASS_T_DEC
+void
+PB_ASSOC_CLASS_C_DEC::
+assert_entry_pointer_valid(const entry_pointer p_e, store_hash_false_indicator) const
+{
+ my_map_debug_base::check_key_exists(p_e->m_value.first);
+}
+#endif // #ifdef PB_ASSOC_CC_HT_MAP_DEBUG
diff --git a/libstdc++-v3/include/ext/pb_assoc/detail/cc_ht_map_/debug_store_hash_fn_imps.hpp b/libstdc++-v3/include/ext/pb_assoc/detail/cc_ht_map_/debug_store_hash_fn_imps.hpp
new file mode 100644
index 00000000000..ae9800301f2
--- /dev/null
+++ b/libstdc++-v3/include/ext/pb_assoc/detail/cc_ht_map_/debug_store_hash_fn_imps.hpp
@@ -0,0 +1,59 @@
+// -*- C++ -*-
+
+// 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.
+
+// As a special exception, you may use this file as part of a free software
+// library without restriction. Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General 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_store_hash_fn_imps.hpp
+ * Contains implementations of cc_ht_map_'s debug-mode functions.
+ */
+
+#ifdef PB_ASSOC_CC_HT_MAP_DEBUG
+
+PB_ASSOC_CLASS_T_DEC
+void
+PB_ASSOC_CLASS_C_DEC::
+assert_entry_pointer_valid(const entry_pointer p_e, store_hash_true_indicator) const
+{
+ my_map_debug_base::check_key_exists(p_e->m_value.first);
+
+ comp_hash pos_hash_pair =
+ my_ranged_hash_fn_base::operator()(p_e->m_value.first);
+
+ PB_ASSOC_DBG_ASSERT(p_e->m_hash == pos_hash_pair.second);
+}
+#endif // #ifdef PB_ASSOC_CC_HT_MAP_DEBUG
diff --git a/libstdc++-v3/include/ext/pb_assoc/detail/cc_ht_map_/entry_list_fn_imps.hpp b/libstdc++-v3/include/ext/pb_assoc/detail/cc_ht_map_/entry_list_fn_imps.hpp
new file mode 100644
index 00000000000..9ea01b549af
--- /dev/null
+++ b/libstdc++-v3/include/ext/pb_assoc/detail/cc_ht_map_/entry_list_fn_imps.hpp
@@ -0,0 +1,111 @@
+// -*- C++ -*-
+
+// 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.
+
+// As a special exception, you may use this file as part of a free software
+// library without restriction. Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General 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 entry_list_fn_imps.hpp
+ * Contains implementations of cc_ht_map_'s entry-list related functions.
+ */
+
+PB_ASSOC_CLASS_T_DEC
+void
+PB_ASSOC_CLASS_C_DEC::
+deallocate_links_in_list(entry_pointer p_e)
+{
+ while (p_e != NULL)
+ {
+ entry_pointer p_dealloc_e = p_e;
+
+ p_e = p_e->m_p_next;
+
+ s_entry_allocator.deallocate(p_dealloc_e, 1);
+ }
+}
+
+PB_ASSOC_CLASS_T_DEC
+inline typename PB_ASSOC_CLASS_C_DEC::entry_pointer
+PB_ASSOC_CLASS_C_DEC::
+get_entry(const_mapped_reference r_val, int_to_type<true>)
+{
+ // Following line might throw an exception.
+
+ entry_pointer p_e = s_entry_allocator.allocate(1);
+
+ // Following lines* cannot* throw an exception.
+
+ new (&p_e->m_value) mapped_value_type(r_val);
+
+ return (p_e);
+}
+
+PB_ASSOC_CLASS_T_DEC
+inline typename PB_ASSOC_CLASS_C_DEC::entry_pointer
+PB_ASSOC_CLASS_C_DEC::
+get_entry(const_mapped_reference r_val, int_to_type<false>)
+{
+ // Following line might throw an exception.
+
+ entry_pointer p_e = s_entry_allocator.allocate(1);
+
+ cond_dealtor_t cond(p_e);
+
+ // Following lines might throw an exception.
+
+ new (&p_e->m_value) mapped_value_type(r_val);
+
+ cond.set_no_action();
+
+ return (p_e);
+}
+
+PB_ASSOC_CLASS_T_DEC
+inline void
+PB_ASSOC_CLASS_C_DEC::
+rels_entry(entry_pointer p_e)
+{
+ /* The following lines cannot throw exceptions
+ * (unless if key-data dtors do). */
+
+ PB_ASSOC_V2F(p_e->m_value).~Key();
+#ifdef PB_ASSOC_DATA_TRUE_INDICATOR
+ p_e->m_value.second.~data_type();
+#endif // #ifdef PB_ASSOC_DATA_TRUE_INDICATOR
+
+ s_entry_allocator.deallocate(p_e, 1);
+}
+
diff --git a/libstdc++-v3/include/ext/pb_assoc/detail/cc_ht_map_/erase_fn_imps.hpp b/libstdc++-v3/include/ext/pb_assoc/detail/cc_ht_map_/erase_fn_imps.hpp
new file mode 100644
index 00000000000..525a41a4fa9
--- /dev/null
+++ b/libstdc++-v3/include/ext/pb_assoc/detail/cc_ht_map_/erase_fn_imps.hpp
@@ -0,0 +1,114 @@
+// -*- C++ -*-
+
+// 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.
+
+// As a special exception, you may use this file as part of a free software
+// library without restriction. Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General 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 erase_fn_imps.hpp
+ * Contains implementations of cc_ht_map_'s erase related functions.
+ */
+
+PB_ASSOC_CLASS_T_DEC
+inline void
+PB_ASSOC_CLASS_C_DEC::
+erase_entry_pointer(entry_pointer& r_p_e)
+{
+ PB_ASSOC_DBG_ONLY(my_map_debug_base::erase_existing(r_p_e->m_value.first));
+
+ entry_pointer p_e = r_p_e;
+
+ r_p_e = r_p_e->m_p_next;
+
+ rels_entry(p_e);
+
+ PB_ASSOC_DBG_ASSERT(m_num_used_e > 0);
+ my_resize_base::notify_erased(--m_num_used_e);
+}
+
+PB_ASSOC_CLASS_T_DEC
+template<class Pred>
+inline typename PB_ASSOC_CLASS_C_DEC::size_type
+PB_ASSOC_CLASS_C_DEC::
+erase_if(Pred& r_pred)
+{
+ size_type num_num_ersd = 0;
+
+ for (size_type pos = 0; pos < m_num_e_p; ++pos)
+ {
+ size_t num_ersd = 0;
+
+ if (m_a_p_entries[pos] != NULL&&
+ r_pred(m_a_p_entries[pos]->m_value))
+ {
+ ++num_ersd;
+
+ erase_entry_pointer(m_a_p_entries[pos]);
+ }
+
+ entry_pointer p_e = m_a_p_entries[pos];
+
+ while (p_e != NULL&& p_e->m_p_next != NULL)
+ if (r_pred(p_e->m_p_next->m_value))
+ {
+ ++num_num_ersd;
+
+ erase_entry_pointer(p_e->m_p_next);
+ }
+ }
+
+ do_resize_if_needed_no_throw();
+
+ return (num_num_ersd);
+}
+
+PB_ASSOC_CLASS_T_DEC
+void
+PB_ASSOC_CLASS_C_DEC::
+clear()
+{
+ for (size_type pos = 0; pos < m_num_e_p; ++pos)
+ while (m_a_p_entries[pos] != NULL)
+ erase_entry_pointer(m_a_p_entries[pos]);
+
+ do_resize_if_needed_no_throw();
+
+ my_resize_base::notify_cleared();
+}
+
+#include <ext/pb_assoc/detail/cc_ht_map_/erase_no_store_hash_fn_imps.hpp>
+#include <ext/pb_assoc/detail/cc_ht_map_/erase_store_hash_fn_imps.hpp>
+
diff --git a/libstdc++-v3/include/ext/pb_assoc/detail/cc_ht_map_/erase_no_store_hash_fn_imps.hpp b/libstdc++-v3/include/ext/pb_assoc/detail/cc_ht_map_/erase_no_store_hash_fn_imps.hpp
new file mode 100644
index 00000000000..1b3e3c5e330
--- /dev/null
+++ b/libstdc++-v3/include/ext/pb_assoc/detail/cc_ht_map_/erase_no_store_hash_fn_imps.hpp
@@ -0,0 +1,159 @@
+// -*- C++ -*-
+
+// 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.
+
+// As a special exception, you may use this file as part of a free software
+// library without restriction. Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General 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 erase_no_store_hash_fn_imps.hpp
+ * Contains implementations of cc_ht_map_'s erase related functions, when the hash
+ * value is not stored.
+ */
+
+PB_ASSOC_CLASS_T_DEC
+template<class T>
+inline typename PB_ASSOC_CLASS_C_DEC::size_type
+PB_ASSOC_CLASS_C_DEC::
+erase(T r_t, bool erase_entry_if_last, pb_assoc::detail::int_to_type<false>)
+{
+ PB_ASSOC_DBG_ONLY(assert_valid();)
+
+ return (erase_in_pos_imp<T>(r_t,
+ erase_entry_if_last,
+ my_ranged_hash_fn_base::operator()(
+ my_traits_base::ext_eraser::extract_key(r_t))));
+}
+
+PB_ASSOC_CLASS_T_DEC
+template<class T>
+inline typename PB_ASSOC_CLASS_C_DEC::size_type
+PB_ASSOC_CLASS_C_DEC::
+erase_in_pos_imp(T r_t, bool erase_entry_if_last, size_type pos)
+{
+ PB_ASSOC_DBG_ONLY(assert_valid();)
+
+ entry_pointer p_e = m_a_p_entries[pos];
+
+ my_resize_base::notify_erase_search_start();
+
+ if (p_e == NULL)
+ {
+ my_resize_base::notify_erase_search_end();
+
+ PB_ASSOC_DBG_ONLY(my_map_debug_base::check_key_does_not_exist(
+ ext_eraser::extract_key(r_t));)
+
+ PB_ASSOC_DBG_ONLY(assert_valid();)
+
+ return (0);
+ }
+
+ if (my_hash_eq_fn_base::operator()(
+ p_e->m_value.first,
+ my_traits_base::ext_eraser::extract_key(r_t)))
+ {
+ my_resize_base::notify_erase_search_end();
+
+ PB_ASSOC_DBG_ONLY(my_map_debug_base::
+ check_key_exists(my_traits_base::ext_eraser::extract_key(r_t));)
+
+ std::pair<size_type, bool> ers_pair =
+ my_traits_base::ext_eraser::erase(
+ PB_ASSOC_EP2VP(m_a_p_entries[pos]),
+ r_t, erase_entry_if_last);
+
+ if (ers_pair.second)
+ {
+ erase_entry_pointer(m_a_p_entries[pos]);
+
+ do_resize_if_needed_no_throw();
+ }
+
+ PB_ASSOC_DBG_ONLY(assert_valid();)
+
+ return (ers_pair.first);
+ }
+
+ while (true)
+ {
+ entry_pointer p_next_e = p_e->m_p_next;
+
+ if (p_next_e == NULL)
+ {
+ my_resize_base::notify_erase_search_end();
+
+ PB_ASSOC_DBG_ONLY(my_map_debug_base::
+ check_key_does_not_exist(
+ my_traits_base::ext_eraser::extract_key(r_t));)
+
+ PB_ASSOC_DBG_ONLY(assert_valid();)
+
+ return (0);
+ }
+
+ if (my_hash_eq_fn_base::operator()(
+ p_next_e->m_value.first,
+ my_traits_base::ext_eraser::extract_key(r_t)))
+ {
+ my_resize_base::notify_erase_search_end();
+
+ PB_ASSOC_DBG_ONLY(my_map_debug_base::
+ check_key_exists(
+ my_traits_base::ext_eraser::extract_key(r_t));)
+
+ std::pair<size_type, bool> ers_pair =
+ my_traits_base::ext_eraser::erase(
+ PB_ASSOC_EP2VP(p_e->m_p_next),
+ r_t, erase_entry_if_last);
+
+ if (ers_pair.second)
+ {
+ erase_entry_pointer(p_e->m_p_next);
+
+ do_resize_if_needed_no_throw();
+ }
+
+ PB_ASSOC_DBG_ONLY(assert_valid();)
+
+ return (ers_pair.first);
+ }
+
+ my_resize_base::notify_erase_search_collision();
+
+ p_e = p_next_e;
+ }
+}
+
diff --git a/libstdc++-v3/include/ext/pb_assoc/detail/cc_ht_map_/erase_store_hash_fn_imps.hpp b/libstdc++-v3/include/ext/pb_assoc/detail/cc_ht_map_/erase_store_hash_fn_imps.hpp
new file mode 100644
index 00000000000..2762eba3606
--- /dev/null
+++ b/libstdc++-v3/include/ext/pb_assoc/detail/cc_ht_map_/erase_store_hash_fn_imps.hpp
@@ -0,0 +1,159 @@
+// -*- C++ -*-
+
+// 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.
+
+// As a special exception, you may use this file as part of a free software
+// library without restriction. Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General 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 erase_store_hash_fn_imps.hpp
+ * Contains implementations of cc_ht_map_'s erase related functions, when the hash
+ * value is stored.
+ */
+
+PB_ASSOC_CLASS_T_DEC
+template<class T>
+inline typename PB_ASSOC_CLASS_C_DEC::size_type
+PB_ASSOC_CLASS_C_DEC::
+erase(T r_t, bool erase_entry_if_last, pb_assoc::detail::int_to_type<true>)
+{
+ PB_ASSOC_DBG_ONLY(assert_valid();)
+
+ return (erase_in_pos_imp<T>(r_t, erase_entry_if_last,
+ my_ranged_hash_fn_base::operator()(
+ my_traits_base::ext_eraser::extract_key(r_t))));
+}
+
+PB_ASSOC_CLASS_T_DEC
+template<class T>
+inline typename PB_ASSOC_CLASS_C_DEC::size_type
+PB_ASSOC_CLASS_C_DEC::
+erase_in_pos_imp(T r_t, bool erase_entry_if_last, const comp_hash& r_pos_hash_pair)
+{
+ PB_ASSOC_DBG_ONLY(assert_valid();)
+
+ entry_pointer p_e = m_a_p_entries[r_pos_hash_pair.first];
+
+ my_resize_base::notify_erase_search_start();
+
+ if (p_e == NULL)
+ {
+ my_resize_base::notify_erase_search_end();
+
+ PB_ASSOC_DBG_ONLY(my_map_debug_base::
+ check_key_does_not_exist(
+ my_traits_base::ext_eraser::extract_key(r_t));)
+
+ PB_ASSOC_DBG_ONLY(assert_valid();)
+
+ return (0);
+ }
+
+ if (my_hash_eq_fn_base::operator()(p_e->m_value.first, p_e->m_hash,
+ my_traits_base::ext_eraser::extract_key(r_t), r_pos_hash_pair.second))
+ {
+ my_resize_base::notify_erase_search_end();
+
+ PB_ASSOC_DBG_ONLY(my_map_debug_base::check_key_exists(
+ my_traits_base::ext_eraser::extract_key(r_t));)
+
+ std::pair<size_type, bool> ers_pair =
+ my_traits_base::ext_eraser::erase(
+ PB_ASSOC_EP2VP(m_a_p_entries[r_pos_hash_pair.first]),
+ r_t, erase_entry_if_last);
+
+ if (ers_pair.second)
+ {
+ erase_entry_pointer(m_a_p_entries[r_pos_hash_pair.first]);
+
+ do_resize_if_needed_no_throw();
+ }
+
+ PB_ASSOC_DBG_ONLY(assert_valid();)
+
+ return (ers_pair.first);
+ }
+
+ while (true)
+ {
+ entry_pointer p_next_e = p_e->m_p_next;
+
+ if (p_next_e == NULL)
+ {
+ my_resize_base::notify_erase_search_end();
+
+ PB_ASSOC_DBG_ONLY(my_map_debug_base::
+ check_key_does_not_exist(
+ my_traits_base::ext_eraser::extract_key(r_t));)
+
+ PB_ASSOC_DBG_ONLY(assert_valid();)
+
+ return (0);
+ }
+
+ if (my_hash_eq_fn_base::operator()(
+ p_next_e->m_value.first, p_next_e->m_hash,
+ my_traits_base::ext_eraser::extract_key(r_t),
+ r_pos_hash_pair.second))
+ {
+ my_resize_base::notify_erase_search_end();
+
+ PB_ASSOC_DBG_ONLY(my_map_debug_base::
+ check_key_exists(
+ my_traits_base::ext_eraser::extract_key(r_t));)
+
+ std::pair<size_type, bool> ers_pair =
+ my_traits_base::ext_eraser::erase(
+ PB_ASSOC_EP2VP(p_e->m_p_next),
+ r_t, erase_entry_if_last);
+
+ if (ers_pair.second)
+ {
+ erase_entry_pointer(p_e->m_p_next);
+
+ do_resize_if_needed_no_throw();
+ }
+
+ PB_ASSOC_DBG_ONLY(assert_valid();)
+
+ return (ers_pair.first);
+ }
+
+ my_resize_base::notify_erase_search_collision();
+
+ p_e = p_next_e;
+ }
+}
+
diff --git a/libstdc++-v3/include/ext/pb_assoc/detail/cc_ht_map_/find_fn_imps.hpp b/libstdc++-v3/include/ext/pb_assoc/detail/cc_ht_map_/find_fn_imps.hpp
new file mode 100644
index 00000000000..c72aa512226
--- /dev/null
+++ b/libstdc++-v3/include/ext/pb_assoc/detail/cc_ht_map_/find_fn_imps.hpp
@@ -0,0 +1,83 @@
+// -*- C++ -*-
+
+// 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.
+
+// As a special exception, you may use this file as part of a free software
+// library without restriction. Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General 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 find_fn_imps.hpp
+ * Contains implementations of cc_ht_map_'s find related functions.
+ */
+
+PB_ASSOC_CLASS_T_DEC
+inline typename PB_ASSOC_CLASS_C_DEC::find_iterator
+PB_ASSOC_CLASS_C_DEC::
+find(const_key_reference r_key)
+{
+ PB_ASSOC_DBG_ONLY(assert_valid();)
+
+ return (find_key_pointer(r_key, my_hash_traits_base::s_store_hash_indicator));
+}
+
+PB_ASSOC_CLASS_T_DEC
+inline typename PB_ASSOC_CLASS_C_DEC::const_find_iterator
+PB_ASSOC_CLASS_C_DEC::
+find(const_key_reference r_key) const
+{
+ PB_ASSOC_DBG_ONLY(assert_valid();)
+
+ return (const_cast<PB_ASSOC_CLASS_C_DEC& >(*this).find_key_pointer(r_key, my_hash_traits_base::s_store_hash_indicator));
+}
+
+PB_ASSOC_CLASS_T_DEC
+inline typename PB_ASSOC_CLASS_C_DEC::find_iterator
+PB_ASSOC_CLASS_C_DEC::
+find_end()
+{
+ return (NULL);
+}
+
+PB_ASSOC_CLASS_T_DEC
+inline typename PB_ASSOC_CLASS_C_DEC::const_find_iterator
+PB_ASSOC_CLASS_C_DEC::
+find_end() const
+{
+ return (NULL);
+}
+
+#include <ext/pb_assoc/detail/cc_ht_map_/find_no_store_hash_fn_imps.hpp>
+#include <ext/pb_assoc/detail/cc_ht_map_/find_store_hash_fn_imps.hpp>
+
diff --git a/libstdc++-v3/include/ext/pb_assoc/detail/cc_ht_map_/find_no_store_hash_fn_imps.hpp b/libstdc++-v3/include/ext/pb_assoc/detail/cc_ht_map_/find_no_store_hash_fn_imps.hpp
new file mode 100644
index 00000000000..ff876ff3c51
--- /dev/null
+++ b/libstdc++-v3/include/ext/pb_assoc/detail/cc_ht_map_/find_no_store_hash_fn_imps.hpp
@@ -0,0 +1,86 @@
+// -*- C++ -*-
+
+// 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.
+
+// As a special exception, you may use this file as part of a free software
+// library without restriction. Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General 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 find_no_store_hash_fn_imps.hpp
+ * Contains implementations of cc_ht_map_'s find related functions, when the hash
+ * value is not stored.
+ */
+
+PB_ASSOC_CLASS_T_DEC
+inline typename PB_ASSOC_CLASS_C_DEC::const_data_reference
+PB_ASSOC_CLASS_C_DEC::
+const_subscript_imp(const_key_reference r_key, int_to_type<false>) const
+{
+ PB_ASSOC_DBG_ONLY(assert_valid();)
+
+ return (const_cast<PB_ASSOC_CLASS_C_DEC& >(*this).
+ find_key_pointer(r_key, my_hash_traits_base::s_store_hash_indicator)->second);
+}
+
+PB_ASSOC_CLASS_T_DEC
+inline typename PB_ASSOC_CLASS_C_DEC::pointer
+PB_ASSOC_CLASS_C_DEC::
+find_key_pointer(const_key_reference r_key, int_to_type<false>)
+{
+ entry_pointer p_e =
+ m_a_p_entries[my_ranged_hash_fn_base::operator()(r_key)];
+
+ my_resize_base::notify_find_search_start();
+
+ while (p_e != NULL&&
+ !my_hash_eq_fn_base::operator()(PB_ASSOC_V2F(p_e->m_value), r_key))
+ {
+ my_resize_base::notify_find_search_collision();
+
+ p_e = p_e->m_p_next;
+ }
+
+ my_resize_base::notify_find_search_end();
+
+#ifdef PB_ASSOC_CC_HT_MAP_DEBUG
+ if (p_e == NULL)
+ my_map_debug_base::check_key_does_not_exist(r_key);
+ else
+ my_map_debug_base::check_key_exists(r_key);
+#endif // #ifdef PB_ASSOC_CC_HT_MAP_DEBUG
+
+ return (&p_e->m_value);
+}
+
diff --git a/libstdc++-v3/include/ext/pb_assoc/detail/cc_ht_map_/find_store_hash_fn_imps.hpp b/libstdc++-v3/include/ext/pb_assoc/detail/cc_ht_map_/find_store_hash_fn_imps.hpp
new file mode 100644
index 00000000000..3db3dd31263
--- /dev/null
+++ b/libstdc++-v3/include/ext/pb_assoc/detail/cc_ht_map_/find_store_hash_fn_imps.hpp
@@ -0,0 +1,88 @@
+// -*- C++ -*-
+
+// 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.
+
+// As a special exception, you may use this file as part of a free software
+// library without restriction. Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General 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 find_store_hash_fn_imps.hpp
+ * Contains implementations of cc_ht_map_'s find related functions, when the hash
+ * value is stored.
+ */
+
+PB_ASSOC_CLASS_T_DEC
+inline typename PB_ASSOC_CLASS_C_DEC::const_data_reference
+PB_ASSOC_CLASS_C_DEC::
+const_subscript_imp(const_key_reference r_key, int_to_type<true>) const
+{
+ PB_ASSOC_DBG_ONLY(assert_valid();)
+
+ return (const_cast<PB_ASSOC_CLASS_C_DEC& >(*this).find_key_pointer(r_key, my_traits_base::m_store_hash_indicator)->second);
+}
+
+PB_ASSOC_CLASS_T_DEC
+inline typename PB_ASSOC_CLASS_C_DEC::pointer
+PB_ASSOC_CLASS_C_DEC::
+find_key_pointer(const_key_reference r_key, int_to_type<true>)
+{
+ comp_hash pos_hash_pair = my_ranged_hash_fn_base::operator()(r_key);
+
+ entry_pointer p_e = m_a_p_entries[pos_hash_pair.first];
+
+ my_resize_base::notify_find_search_start();
+
+ while (p_e != NULL&&
+ !my_hash_eq_fn_base::operator()(PB_ASSOC_V2F(p_e->m_value),
+ p_e->m_hash,
+ r_key,
+ pos_hash_pair.second))
+ {
+ my_resize_base::notify_find_search_collision();
+
+ p_e = p_e->m_p_next;
+ }
+
+ my_resize_base::notify_find_search_end();
+
+#ifdef PB_ASSOC_CC_HT_MAP_DEBUG
+ if (p_e == NULL)
+ my_map_debug_base::check_key_does_not_exist(r_key);
+ else
+ my_map_debug_base::check_key_exists(r_key);
+#endif // #ifdef PB_ASSOC_CC_HT_MAP_DEBUG
+
+ return (const_cast<pointer>(&p_e->m_value));
+}
diff --git a/libstdc++-v3/include/ext/pb_assoc/detail/cc_ht_map_/info_fn_imps.hpp b/libstdc++-v3/include/ext/pb_assoc/detail/cc_ht_map_/info_fn_imps.hpp
new file mode 100644
index 00000000000..f464e789fc6
--- /dev/null
+++ b/libstdc++-v3/include/ext/pb_assoc/detail/cc_ht_map_/info_fn_imps.hpp
@@ -0,0 +1,68 @@
+// -*- C++ -*-
+
+// 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.
+
+// As a special exception, you may use this file as part of a free software
+// library without restriction. Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General 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 info_fn_imps.hpp
+ * Contains implementations of cc_ht_map_'s entire container info related
+ * functions.
+ */
+
+PB_ASSOC_CLASS_T_DEC
+inline typename PB_ASSOC_CLASS_C_DEC::size_type
+PB_ASSOC_CLASS_C_DEC::
+size() const
+{
+ return (m_num_used_e);
+}
+
+PB_ASSOC_CLASS_T_DEC
+inline typename PB_ASSOC_CLASS_C_DEC::size_type
+PB_ASSOC_CLASS_C_DEC::
+max_size() const
+{
+ return (m_entry_allocator.max_size());
+}
+
+PB_ASSOC_CLASS_T_DEC
+inline bool
+PB_ASSOC_CLASS_C_DEC::
+empty() const
+{
+ return (size() == 0);
+}
diff --git a/libstdc++-v3/include/ext/pb_assoc/detail/cc_ht_map_/insert_fn_imps.hpp b/libstdc++-v3/include/ext/pb_assoc/detail/cc_ht_map_/insert_fn_imps.hpp
new file mode 100644
index 00000000000..2d0a88e3931
--- /dev/null
+++ b/libstdc++-v3/include/ext/pb_assoc/detail/cc_ht_map_/insert_fn_imps.hpp
@@ -0,0 +1,63 @@
+// -*- C++ -*-
+
+// 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.
+
+// As a special exception, you may use this file as part of a free software
+// library without restriction. Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General 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 insert_fn_imps.hpp
+ * Contains implementations of cc_ht_map_'s insert related functions.
+ */
+
+PB_ASSOC_CLASS_T_DEC
+inline std::pair<typename PB_ASSOC_CLASS_C_DEC::find_iterator, bool>
+PB_ASSOC_CLASS_C_DEC::
+insert(const_reference r_val)
+{
+ return (insert_imp(r_val, my_hash_traits_base::s_store_hash_indicator));
+}
+
+PB_ASSOC_CLASS_T_DEC
+inline typename PB_ASSOC_CLASS_C_DEC::data_reference
+PB_ASSOC_CLASS_C_DEC::
+subscript_imp(const_key_reference r_key)
+{
+ return (subscript_imp(r_key, my_hash_traits_base::s_store_hash_indicator));
+}
+
+#include <ext/pb_assoc/detail/cc_ht_map_/insert_no_store_hash_fn_imps.hpp>
+#include <ext/pb_assoc/detail/cc_ht_map_/insert_store_hash_fn_imps.hpp>
+
diff --git a/libstdc++-v3/include/ext/pb_assoc/detail/cc_ht_map_/insert_no_store_hash_fn_imps.hpp b/libstdc++-v3/include/ext/pb_assoc/detail/cc_ht_map_/insert_no_store_hash_fn_imps.hpp
new file mode 100644
index 00000000000..1d628fd55ba
--- /dev/null
+++ b/libstdc++-v3/include/ext/pb_assoc/detail/cc_ht_map_/insert_no_store_hash_fn_imps.hpp
@@ -0,0 +1,148 @@
+// -*- C++ -*-
+
+// 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.
+
+// As a special exception, you may use this file as part of a free software
+// library without restriction. Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General 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 insert_no_store_hash_fn_imps.hpp
+ * Contains implementations of cc_ht_map_'s insert related functions, when the hash
+ * value is not stored.
+ */
+
+PB_ASSOC_CLASS_T_DEC
+inline typename PB_ASSOC_CLASS_C_DEC::data_reference
+PB_ASSOC_CLASS_C_DEC::
+subscript_imp(const_key_reference r_key, int_to_type<false>)
+{
+ PB_ASSOC_DBG_ONLY(assert_valid();)
+
+ const size_type pos = my_ranged_hash_fn_base::operator()(r_key);
+
+ entry_pointer p_e = m_a_p_entries[pos];
+
+ my_resize_base::notify_insert_search_start();
+
+ while (p_e != NULL&&
+ !my_hash_eq_fn_base::operator()(p_e->m_value.first, r_key))
+ {
+ my_resize_base::notify_insert_search_collision();
+
+ p_e = p_e->m_p_next;
+ }
+
+ my_resize_base::notify_insert_search_end();
+
+ if (p_e != NULL)
+ {
+ PB_ASSOC_DBG_ONLY(my_map_debug_base::check_key_exists(r_key);)
+
+ return (p_e->m_value.second);
+ }
+
+ PB_ASSOC_DBG_ONLY(my_map_debug_base::check_key_does_not_exist(r_key);)
+
+ return (insert_new_imp(std::make_pair(r_key, data_type()), pos)->second);
+}
+
+PB_ASSOC_CLASS_T_DEC
+inline std::pair<typename PB_ASSOC_CLASS_C_DEC::find_iterator, bool>
+PB_ASSOC_CLASS_C_DEC::
+insert_imp(const_reference r_val, int_to_type<false>)
+{
+ PB_ASSOC_DBG_ONLY(assert_valid();)
+
+ const_key_reference r_key = PB_ASSOC_V2F(r_val);
+
+ const size_type pos = my_ranged_hash_fn_base::operator()(r_key);
+
+ entry_pointer p_e = m_a_p_entries[pos];
+
+ my_resize_base::notify_insert_search_start();
+
+ while (p_e != NULL&&
+ !my_hash_eq_fn_base::operator()(
+ PB_ASSOC_V2F(p_e->m_value),
+ r_key))
+ {
+ my_resize_base::notify_insert_search_collision();
+
+ p_e = p_e->m_p_next;
+ }
+
+ my_resize_base::notify_insert_search_end();
+
+ if (p_e != NULL)
+ {
+ PB_ASSOC_DBG_ONLY(my_map_debug_base::check_key_exists(r_key);)
+
+ return (std::make_pair(&p_e->m_value, false));
+ }
+
+ PB_ASSOC_DBG_ONLY(my_map_debug_base::check_key_does_not_exist(r_key);)
+
+ return (
+ std::make_pair(
+ insert_new_imp(r_val, pos),
+ true));
+}
+
+PB_ASSOC_CLASS_T_DEC
+inline typename PB_ASSOC_CLASS_C_DEC::pointer
+PB_ASSOC_CLASS_C_DEC::
+insert_new_imp(const_reference r_val, size_type pos)
+{
+ if (do_resize_if_needed())
+ pos = my_ranged_hash_fn_base::operator()(PB_ASSOC_V2F(r_val));
+
+ // Following lines might throw an exception.
+ entry_pointer p_e = get_entry(r_val, my_traits_base::s_no_throw_copies_indicator);
+
+ // At this point no exceptions can be thrown.
+
+ p_e->m_p_next = m_a_p_entries[pos];
+
+ m_a_p_entries[pos] = p_e;
+
+ my_resize_base::notify_inserted(++m_num_used_e);
+
+ PB_ASSOC_DBG_ONLY(my_map_debug_base::insert_new(r_key);)
+
+ PB_ASSOC_DBG_ONLY(assert_valid();)
+
+ return (&p_e->m_value);
+}
+
diff --git a/libstdc++-v3/include/ext/pb_assoc/detail/cc_ht_map_/insert_store_hash_fn_imps.hpp b/libstdc++-v3/include/ext/pb_assoc/detail/cc_ht_map_/insert_store_hash_fn_imps.hpp
new file mode 100644
index 00000000000..5c546e11d2a
--- /dev/null
+++ b/libstdc++-v3/include/ext/pb_assoc/detail/cc_ht_map_/insert_store_hash_fn_imps.hpp
@@ -0,0 +1,157 @@
+// -*- C++ -*-
+
+// 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.
+
+// As a special exception, you may use this file as part of a free software
+// library without restriction. Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General 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 insert_store_hash_fn_imps.hpp
+ * Contains implementations of cc_ht_map_'s insert related functions, when the hash
+ * value is stored.
+ */
+
+PB_ASSOC_CLASS_T_DEC
+inline typename PB_ASSOC_CLASS_C_DEC::data_reference
+PB_ASSOC_CLASS_C_DEC::
+subscript_imp(const_key_reference r_key, int_to_type<true>)
+{
+ PB_ASSOC_DBG_ONLY(assert_valid();)
+
+ comp_hash pos_hash_pair = my_ranged_hash_fn_base::operator()(r_key);
+
+ entry_pointer p_e = m_a_p_entries[pos_hash_pair.first];
+
+ my_resize_base::notify_insert_search_start();
+
+ while (p_e != NULL&&
+ !my_hash_eq_fn_base::operator()(p_e->m_value.first, p_e->m_hash, r_key, pos_hash_pair.second))
+ {
+ my_resize_base::notify_insert_search_collision();
+
+ p_e = p_e->m_p_next;
+ }
+
+ my_resize_base::notify_insert_search_end();
+
+ if (p_e != NULL)
+ {
+ PB_ASSOC_DBG_ONLY(my_map_debug_base::check_key_exists(r_key);)
+
+ return (p_e->m_value.second);
+ }
+
+ PB_ASSOC_DBG_ONLY(my_map_debug_base::check_key_does_not_exist(r_key);)
+
+ return (insert_new_imp(
+ value_type(r_key, Data()), pos_hash_pair)->second);
+}
+
+PB_ASSOC_CLASS_T_DEC
+inline std::pair<typename PB_ASSOC_CLASS_C_DEC::find_iterator, bool>
+PB_ASSOC_CLASS_C_DEC::
+insert_imp(const_reference r_val, int_to_type<true>)
+{
+ PB_ASSOC_DBG_ONLY(assert_valid();)
+
+ const_key_reference r_key = PB_ASSOC_V2F(r_val);
+
+ comp_hash pos_hash_pair = my_ranged_hash_fn_base::operator()(r_key);
+
+ entry_pointer p_e = m_a_p_entries[pos_hash_pair.first];
+
+ my_resize_base::notify_insert_search_start();
+
+ while (p_e != NULL&&
+ !my_hash_eq_fn_base::operator()(
+ PB_ASSOC_V2F(p_e->m_value),
+ p_e->m_hash,
+ r_key, pos_hash_pair.second))
+ {
+ my_resize_base::notify_insert_search_collision();
+
+ p_e = p_e->m_p_next;
+ }
+
+ my_resize_base::notify_insert_search_end();
+
+ if (p_e != NULL)
+ {
+ PB_ASSOC_DBG_ONLY(my_map_debug_base::check_key_exists(r_key);)
+
+ return (
+ std::make_pair(
+ static_cast<pointer>(&p_e->m_value),
+ false));
+ }
+
+ PB_ASSOC_DBG_ONLY(my_map_debug_base::check_key_does_not_exist(r_key);)
+
+ return (
+ std::make_pair(
+ insert_new_imp(r_val, pos_hash_pair),
+ true));
+}
+
+PB_ASSOC_CLASS_T_DEC
+inline typename PB_ASSOC_CLASS_C_DEC::pointer
+PB_ASSOC_CLASS_C_DEC::
+insert_new_imp(const_reference r_val, comp_hash& r_pos_hash_pair)
+{
+ // Following lines might throw an exception.
+
+ if (do_resize_if_needed())
+ r_pos_hash_pair = my_ranged_hash_fn_base::operator()(
+ PB_ASSOC_V2F(r_val));
+
+ entry_pointer p_e = get_entry(r_val, my_traits_base::s_no_throw_copies_indicator);
+
+ // At this point no exceptions can be thrown.
+
+ p_e->m_hash = r_pos_hash_pair.second;
+
+ p_e->m_p_next = m_a_p_entries[r_pos_hash_pair.first];
+
+ m_a_p_entries[r_pos_hash_pair.first] = p_e;
+
+ my_resize_base::notify_inserted(++m_num_used_e);
+
+ PB_ASSOC_DBG_ONLY(my_map_debug_base::insert_new(r_key);)
+
+ PB_ASSOC_DBG_ONLY(assert_valid();)
+
+ return (static_cast<pointer>(&p_e->m_value));
+}
+
diff --git a/libstdc++-v3/include/ext/pb_assoc/detail/cc_ht_map_/iterators_fn_imps.hpp b/libstdc++-v3/include/ext/pb_assoc/detail/cc_ht_map_/iterators_fn_imps.hpp
new file mode 100644
index 00000000000..1bdde7562a4
--- /dev/null
+++ b/libstdc++-v3/include/ext/pb_assoc/detail/cc_ht_map_/iterators_fn_imps.hpp
@@ -0,0 +1,153 @@
+// -*- C++ -*-
+
+// 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.
+
+// As a special exception, you may use this file as part of a free software
+// library without restriction. Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General 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 iterators_fn_imps.hpp
+ * Contains implementations of cc_ht_map_'s iterators related functions, e.g.,
+ * begin().
+ */
+
+PB_ASSOC_CLASS_T_DEC
+typename PB_ASSOC_CLASS_C_DEC::iterator
+PB_ASSOC_CLASS_C_DEC::s_end_it;
+
+PB_ASSOC_CLASS_T_DEC
+typename PB_ASSOC_CLASS_C_DEC::const_iterator
+PB_ASSOC_CLASS_C_DEC::s_const_end_it;
+
+PB_ASSOC_CLASS_T_DEC
+inline typename PB_ASSOC_CLASS_C_DEC::iterator
+PB_ASSOC_CLASS_C_DEC::
+begin()
+{
+ pointer p_value;
+ std::pair<entry_pointer, size_type> pos;
+
+ get_start_it_state(p_value, pos);
+
+ return (iterator(p_value, pos, this));
+}
+
+PB_ASSOC_CLASS_T_DEC
+inline typename PB_ASSOC_CLASS_C_DEC::iterator
+PB_ASSOC_CLASS_C_DEC::
+end()
+{
+ return (s_end_it);
+}
+
+PB_ASSOC_CLASS_T_DEC
+inline typename PB_ASSOC_CLASS_C_DEC::const_iterator
+PB_ASSOC_CLASS_C_DEC::
+begin() const
+{
+ pointer p_value;
+
+ std::pair<entry_pointer, size_type> pos;
+
+ get_start_it_state(p_value, pos);
+
+ return (const_iterator(p_value, pos, this));
+}
+
+PB_ASSOC_CLASS_T_DEC
+inline typename PB_ASSOC_CLASS_C_DEC::const_iterator
+PB_ASSOC_CLASS_C_DEC::
+end() const
+{
+ return (s_const_end_it);
+}
+
+#ifdef PB_ASSOC_DATA_TRUE_INDICATOR
+PB_ASSOC_CLASS_T_DEC
+void
+PB_ASSOC_CLASS_C_DEC::
+inc_it_state(pointer& r_p_value, std::pair<entry_pointer, size_type>& r_pos) const
+{
+ inc_it_state((const_pointer& )r_p_value, r_pos);
+}
+#endif // #ifdef PB_ASSOC_DATA_TRUE_INDICATOR
+
+PB_ASSOC_CLASS_T_DEC
+void
+PB_ASSOC_CLASS_C_DEC::
+inc_it_state(const_pointer& r_p_value, std::pair<entry_pointer, size_type>& r_pos) const
+{
+ PB_ASSOC_DBG_ASSERT(r_p_value != NULL);
+
+ r_pos.first = r_pos.first->m_p_next;
+
+ if (r_pos.first != NULL)
+ {
+ r_p_value =& r_pos.first->m_value;
+
+ return;
+ }
+
+ for (++r_pos.second; r_pos.second < m_num_e_p; ++r_pos.second)
+ if (m_a_p_entries[r_pos.second] != NULL)
+ {
+ r_pos.first = m_a_p_entries[r_pos.second];
+
+ r_p_value =& r_pos.first->m_value;
+
+ return;
+ }
+
+ r_p_value = NULL;
+}
+
+PB_ASSOC_CLASS_T_DEC
+void
+PB_ASSOC_CLASS_C_DEC::
+get_start_it_state(pointer& r_p_value, std::pair<entry_pointer, size_type>& r_pos) const
+{
+ for (r_pos.second = 0; r_pos.second < m_num_e_p; ++r_pos.second)
+ if (m_a_p_entries[r_pos.second] != NULL)
+ {
+ r_pos.first = m_a_p_entries[r_pos.second];
+
+ r_p_value = (pointer)(r_pos.first);
+
+ return;
+ }
+
+ r_p_value = NULL;
+}
+
diff --git a/libstdc++-v3/include/ext/pb_assoc/detail/cc_ht_map_/policy_access_fn_imps.hpp b/libstdc++-v3/include/ext/pb_assoc/detail/cc_ht_map_/policy_access_fn_imps.hpp
new file mode 100644
index 00000000000..2448d6068de
--- /dev/null
+++ b/libstdc++-v3/include/ext/pb_assoc/detail/cc_ht_map_/policy_access_fn_imps.hpp
@@ -0,0 +1,108 @@
+// -*- C++ -*-
+
+// 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.
+
+// As a special exception, you may use this file as part of a free software
+// library without restriction. Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General 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 policy_access_fn_imps.hpp
+ * Contains implementations of cc_ht_map_'s policy access
+ * functions.
+ */
+
+PB_ASSOC_CLASS_T_DEC
+Hash_Fn&
+PB_ASSOC_CLASS_C_DEC::
+get_hash_fn()
+{
+ return (*this);
+}
+
+PB_ASSOC_CLASS_T_DEC
+const Hash_Fn&
+PB_ASSOC_CLASS_C_DEC::
+get_hash_fn() const
+{
+ return (*this);
+}
+
+PB_ASSOC_CLASS_T_DEC
+Eq_Fn&
+PB_ASSOC_CLASS_C_DEC::
+get_eq_fn()
+{
+ return (*this);
+}
+
+PB_ASSOC_CLASS_T_DEC
+const Eq_Fn&
+PB_ASSOC_CLASS_C_DEC::
+get_eq_fn() const
+{
+ return (*this);
+}
+
+PB_ASSOC_CLASS_T_DEC
+Comb_Hash_Fn&
+PB_ASSOC_CLASS_C_DEC::
+get_comb_hash_fn()
+{
+ return (*this);
+}
+
+PB_ASSOC_CLASS_T_DEC
+const Comb_Hash_Fn&
+PB_ASSOC_CLASS_C_DEC::
+get_comb_hash_fn() const
+{
+ return (*this);
+}
+
+PB_ASSOC_CLASS_T_DEC
+Resize_Policy&
+PB_ASSOC_CLASS_C_DEC::
+get_resize_policy()
+{
+ return (*this);
+}
+
+PB_ASSOC_CLASS_T_DEC
+const Resize_Policy&
+PB_ASSOC_CLASS_C_DEC::
+get_resize_policy() const
+{
+ return (*this);
+}
diff --git a/libstdc++-v3/include/ext/pb_assoc/detail/cc_ht_map_/resize_fn_imps.hpp b/libstdc++-v3/include/ext/pb_assoc/detail/cc_ht_map_/resize_fn_imps.hpp
new file mode 100644
index 00000000000..a9b979ea934
--- /dev/null
+++ b/libstdc++-v3/include/ext/pb_assoc/detail/cc_ht_map_/resize_fn_imps.hpp
@@ -0,0 +1,146 @@
+// -*- C++ -*-
+
+// 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.
+
+// As a special exception, you may use this file as part of a free software
+// library without restriction. Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General 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 resize_fn_imps.hpp
+ * Contains implementations of cc_ht_map_'s resize related functions.
+ */
+
+PB_ASSOC_CLASS_T_DEC
+inline bool
+PB_ASSOC_CLASS_C_DEC::
+do_resize_if_needed()
+{
+ if (!my_resize_base::is_resize_needed())
+ return (false);
+
+ do
+ do_resize(my_resize_base::get_new_size(m_num_e_p, m_num_used_e));
+ while (my_resize_base::is_resize_needed());
+
+ return (true);
+}
+
+PB_ASSOC_CLASS_T_DEC
+inline void
+PB_ASSOC_CLASS_C_DEC::
+do_resize_if_needed_no_throw()
+{
+ if (!my_resize_base::is_resize_needed())
+ return;
+
+ try
+ {
+ do
+ do_resize(my_resize_base::get_new_size(m_num_e_p, m_num_used_e));
+ while (my_resize_base::is_resize_needed());
+ }
+ catch(...)
+ { }
+
+ PB_ASSOC_DBG_ONLY(assert_valid();)
+ }
+
+PB_ASSOC_CLASS_T_DEC
+void
+PB_ASSOC_CLASS_C_DEC::
+do_resize(size_type new_size)
+{
+ PB_ASSOC_DBG_ONLY(assert_valid();)
+
+ const size_type old_size = m_num_e_p;
+
+ entry_pointer_array a_p_entries_resized;
+
+ // Following line might throw an exception.
+
+ my_ranged_hash_fn_base::notify_resized(new_size);
+
+ try
+ {
+ // Following line might throw an exception.
+
+ a_p_entries_resized = s_entry_pointer_allocator.allocate(new_size);
+
+ m_num_e_p = new_size;
+ }
+ catch(...)
+ {
+ my_ranged_hash_fn_base::notify_resized(old_size);
+
+ throw;
+ }
+
+ // At this point no exceptions can be thrown.
+
+ resize_imp_no_exceptions(new_size, a_p_entries_resized, old_size);
+
+ Resize_Policy::notify_resized(new_size);
+
+ PB_ASSOC_DBG_ONLY(assert_valid();)
+ }
+
+PB_ASSOC_CLASS_T_DEC
+void
+PB_ASSOC_CLASS_C_DEC::
+resize_imp_no_exceptions(size_type new_size, entry_pointer_array a_p_entries_resized, size_type old_size)
+{
+ std::fill(a_p_entries_resized, a_p_entries_resized + m_num_e_p,(entry_pointer)NULL);
+
+ for (size_type pos = 0; pos < old_size; ++pos)
+ {
+ entry_pointer p_e = m_a_p_entries[pos];
+
+ while (p_e != NULL)
+ p_e = resize_imp_no_exceptions_reassign_pointer(p_e, a_p_entries_resized, my_hash_traits_base::s_store_hash_indicator);
+ }
+
+ m_num_e_p = new_size;
+
+ PB_ASSOC_DBG_ONLY(assert_entry_pointer_array_valid(a_p_entries_resized);)
+
+ s_entry_pointer_allocator.deallocate(m_a_p_entries, old_size);
+
+ m_a_p_entries = a_p_entries_resized;
+
+ PB_ASSOC_DBG_ONLY(assert_valid();)
+ }
+
+#include <ext/pb_assoc/detail/cc_ht_map_/resize_no_store_hash_fn_imps.hpp>
+#include <ext/pb_assoc/detail/cc_ht_map_/resize_store_hash_fn_imps.hpp>
diff --git a/libstdc++-v3/include/ext/pb_assoc/detail/cc_ht_map_/resize_no_store_hash_fn_imps.hpp b/libstdc++-v3/include/ext/pb_assoc/detail/cc_ht_map_/resize_no_store_hash_fn_imps.hpp
new file mode 100644
index 00000000000..331391d6c7e
--- /dev/null
+++ b/libstdc++-v3/include/ext/pb_assoc/detail/cc_ht_map_/resize_no_store_hash_fn_imps.hpp
@@ -0,0 +1,61 @@
+// -*- C++ -*-
+
+// 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.
+
+// As a special exception, you may use this file as part of a free software
+// library without restriction. Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General 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 resize_no_store_hash_fn_imps.hpp
+ * Contains implementations of cc_ht_map_'s resize related functions, when the
+ * hash value is not stored.
+ */
+
+PB_ASSOC_CLASS_T_DEC
+inline typename PB_ASSOC_CLASS_C_DEC::entry_pointer
+PB_ASSOC_CLASS_C_DEC::
+resize_imp_no_exceptions_reassign_pointer(entry_pointer p_e, entry_pointer_array a_p_entries_resized, int_to_type<false>)
+{
+ const size_type hash_pos =
+ my_ranged_hash_fn_base::operator()(PB_ASSOC_V2F(p_e->m_value));
+
+ entry_pointer const p_next_e = p_e->m_p_next;
+
+ p_e->m_p_next = a_p_entries_resized[hash_pos];
+
+ a_p_entries_resized[hash_pos] = p_e;
+
+ return (p_next_e);
+}
diff --git a/libstdc++-v3/include/ext/pb_assoc/detail/cc_ht_map_/resize_store_hash_fn_imps.hpp b/libstdc++-v3/include/ext/pb_assoc/detail/cc_ht_map_/resize_store_hash_fn_imps.hpp
new file mode 100644
index 00000000000..7f02f6df11b
--- /dev/null
+++ b/libstdc++-v3/include/ext/pb_assoc/detail/cc_ht_map_/resize_store_hash_fn_imps.hpp
@@ -0,0 +1,63 @@
+// -*- C++ -*-
+
+// 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.
+
+// As a special exception, you may use this file as part of a free software
+// library without restriction. Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General 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 resize_store_hash_fn_imps.hpp
+ * Contains implementations of cc_ht_map_'s resize related functions, when the
+ * hash value is stored.
+ */
+
+PB_ASSOC_CLASS_T_DEC
+inline typename PB_ASSOC_CLASS_C_DEC::entry_pointer
+PB_ASSOC_CLASS_C_DEC::
+resize_imp_no_exceptions_reassign_pointer(entry_pointer p_e, entry_pointer_array a_p_entries_resized, int_to_type<true>)
+{
+ const comp_hash pos_hash_pair =
+ my_ranged_hash_fn_base::operator()(
+ PB_ASSOC_V2F(p_e->m_value),
+ p_e->m_hash);
+
+ entry_pointer const p_next_e = p_e->m_p_next;
+
+ p_e->m_p_next = a_p_entries_resized[pos_hash_pair.first];
+
+ a_p_entries_resized[pos_hash_pair.first] = p_e;
+
+ return (p_next_e);
+}
diff --git a/libstdc++-v3/include/ext/pb_assoc/detail/cc_ht_map_/size_fn_imps.hpp b/libstdc++-v3/include/ext/pb_assoc/detail/cc_ht_map_/size_fn_imps.hpp
new file mode 100644
index 00000000000..940a165a9a4
--- /dev/null
+++ b/libstdc++-v3/include/ext/pb_assoc/detail/cc_ht_map_/size_fn_imps.hpp
@@ -0,0 +1,69 @@
+// -*- C++ -*-
+
+// 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.
+
+// As a special exception, you may use this file as part of a free software
+// library without restriction. Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General 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 size_fn_imps.hpp
+ * Contains implementations of cc_ht_map_'s entire container size related
+ * functions.
+ */
+
+PB_ASSOC_CLASS_T_DEC
+inline typename PB_ASSOC_CLASS_C_DEC::size_type
+PB_ASSOC_CLASS_C_DEC::
+size() const
+{
+ return (m_num_used_e);
+}
+
+PB_ASSOC_CLASS_T_DEC
+inline bool
+PB_ASSOC_CLASS_C_DEC::
+empty() const
+{
+ return (size() == 0);
+}
+
+PB_ASSOC_CLASS_T_DEC
+inline typename PB_ASSOC_CLASS_C_DEC::size_type
+PB_ASSOC_CLASS_C_DEC::
+max_size() const
+{
+ return (s_entry_allocator.max_size());
+}
+
diff --git a/libstdc++-v3/include/ext/pb_assoc/detail/cc_ht_map_/standard_policies.hpp b/libstdc++-v3/include/ext/pb_assoc/detail/cc_ht_map_/standard_policies.hpp
new file mode 100644
index 00000000000..f25135d3792
--- /dev/null
+++ b/libstdc++-v3/include/ext/pb_assoc/detail/cc_ht_map_/standard_policies.hpp
@@ -0,0 +1,50 @@
+// -*- C++ -*-
+
+// 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.
+
+// As a special exception, you may use this file as part of a free software
+// library without restriction. Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General 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 standard_policies.hpp
+ * Contains standard policies for cc_ht_map types.
+ */
+
+#ifndef CC_HT_MAP_STANDARD_POLICIES_HPP
+#define CC_HT_MAP_STANDARD_POLICIES_HPP
+
+#include <ext/pb_assoc/detail/standard_policies.hpp>
+
+#endif // #ifndef CC_HT_MAP_STANDARD_POLICIES_HPP
diff --git a/libstdc++-v3/include/ext/pb_assoc/detail/cond_dealtor.hpp b/libstdc++-v3/include/ext/pb_assoc/detail/cond_dealtor.hpp
new file mode 100644
index 00000000000..238e0c65ded
--- /dev/null
+++ b/libstdc++-v3/include/ext/pb_assoc/detail/cond_dealtor.hpp
@@ -0,0 +1,129 @@
+// -*- C++ -*-
+
+// 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.
+
+// As a special exception, you may use this file as part of a free software
+// library without restriction. Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General 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 cond_dealtor.hpp
+ * Contains a conditional deallocator.
+ */
+
+#ifndef COND_DEALTOR_HPP
+#define COND_DEALTOR_HPP
+
+namespace pb_assoc
+{
+
+ namespace detail
+ {
+
+#define PB_ASSOC_COND_DEALTOR_CLASS_T_DEC \
+ template<class Entry, class Allocator>
+
+#define PB_ASSOC_COND_DEALTOR_CLASS_C_DEC \
+ cond_dealtor< \
+ Entry, \
+ Allocator>
+
+ template<class Entry, class Allocator>
+ class cond_dealtor
+ {
+ public:
+ typedef
+ typename Allocator::template rebind<Entry>::other
+ entry_allocator;
+
+ typedef typename entry_allocator::pointer entry_pointer;
+
+ public:
+ inline
+ cond_dealtor(entry_pointer p_e);
+
+ inline
+ ~cond_dealtor();
+
+ inline void
+ set_no_action();
+
+ private:
+ entry_pointer m_p_e;
+
+ bool m_no_action_destructor;
+
+ static entry_allocator s_alloc;
+ };
+
+ PB_ASSOC_COND_DEALTOR_CLASS_T_DEC
+ typename PB_ASSOC_COND_DEALTOR_CLASS_C_DEC::entry_allocator
+ PB_ASSOC_COND_DEALTOR_CLASS_C_DEC::s_alloc;
+
+ PB_ASSOC_COND_DEALTOR_CLASS_T_DEC
+ inline
+ PB_ASSOC_COND_DEALTOR_CLASS_C_DEC::
+ cond_dealtor(entry_pointer p_e) :
+ m_p_e(p_e),
+ m_no_action_destructor(false)
+ { }
+
+ PB_ASSOC_COND_DEALTOR_CLASS_T_DEC
+ inline void
+ PB_ASSOC_COND_DEALTOR_CLASS_C_DEC::
+ set_no_action()
+ {
+ m_no_action_destructor = true;
+ }
+
+ PB_ASSOC_COND_DEALTOR_CLASS_T_DEC
+ inline
+ PB_ASSOC_COND_DEALTOR_CLASS_C_DEC::
+ ~cond_dealtor()
+ {
+ if (m_no_action_destructor)
+ return;
+
+ s_alloc.deallocate(m_p_e, 1);
+ }
+
+#undef PB_ASSOC_COND_DEALTOR_CLASS_T_DEC
+#undef PB_ASSOC_COND_DEALTOR_CLASS_C_DEC
+
+ } // namespace detail
+
+} // namespace pb_assoc
+
+#endif // #ifndef COND_DEALTOR_HPP
+
diff --git a/libstdc++-v3/include/ext/pb_assoc/detail/constructors_destructor_fn_imps.hpp b/libstdc++-v3/include/ext/pb_assoc/detail/constructors_destructor_fn_imps.hpp
new file mode 100644
index 00000000000..6ac0391351f
--- /dev/null
+++ b/libstdc++-v3/include/ext/pb_assoc/detail/constructors_destructor_fn_imps.hpp
@@ -0,0 +1,126 @@
+// -*- C++ -*-
+
+// 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.
+
+// As a special exception, you may use this file as part of a free software
+// library without restriction. Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General 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 constructors_destructor_fn_imps.hpp
+ * Contains constructors_destructor_fn_imps applicable to different containers.
+ */
+
+inline
+PB_ASSOC_CLASS_NAME()
+{ }
+
+inline
+PB_ASSOC_CLASS_NAME(const PB_ASSOC_CLASS_C_DEC& r_other) : PB_ASSOC_DIRECT_BASE_C_DEC((const PB_ASSOC_DIRECT_BASE_CAST_C_DEC& )r_other)
+{ }
+
+template<typename T0>
+inline
+PB_ASSOC_CLASS_NAME(T0 t0) : PB_ASSOC_DIRECT_BASE_C_DEC(t0)
+{ }
+
+template<typename T0, typename T1>
+inline
+PB_ASSOC_CLASS_NAME(T0 t0, T1 t1) : PB_ASSOC_DIRECT_BASE_C_DEC(t0, t1)
+{ }
+
+template<typename T0, typename T1, typename T2>
+inline
+PB_ASSOC_CLASS_NAME(T0 t0, T1 t1, T2 t2) : PB_ASSOC_DIRECT_BASE_C_DEC(t0, t1, t2)
+{ }
+
+template<typename T0, typename T1, typename T2, typename T3>
+inline
+PB_ASSOC_CLASS_NAME(T0 t0, T1 t1, T2 t2, T3 t3) : PB_ASSOC_DIRECT_BASE_C_DEC(t0, t1, t2, t3)
+{ }
+
+template<typename T0,
+ typename T1,
+ typename T2,
+ typename T3,
+ typename T4>
+inline
+PB_ASSOC_CLASS_NAME(T0 t0, T1 t1, T2 t2, T3 t3, T4 t4) : PB_ASSOC_DIRECT_BASE_C_DEC(t0, t1, t2, t3, t4)
+{ }
+
+template<typename T0,
+ typename T1,
+ typename T2,
+ typename T3,
+ typename T4,
+ typename T5>
+inline
+PB_ASSOC_CLASS_NAME(T0 t0, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5) : PB_ASSOC_DIRECT_BASE_C_DEC(t0, t1, t2, t3, t4, t5)
+{ }
+
+template<typename T0,
+ typename T1,
+ typename T2,
+ typename T3,
+ typename T4,
+ typename T5,
+ typename T6>
+inline
+PB_ASSOC_CLASS_NAME(T0 t0, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6) : PB_ASSOC_DIRECT_BASE_C_DEC(t0, t1, t2, t3, t4, t5, t6)
+{ }
+
+template<typename T0,
+ typename T1,
+ typename T2,
+ typename T3,
+ typename T4,
+ typename T5,
+ typename T6,
+ typename T7>
+inline
+PB_ASSOC_CLASS_NAME(T0 t0, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7) : PB_ASSOC_DIRECT_BASE_C_DEC(t0, t1, t2, t3, t4, t5, t6, t7)
+{ }
+
+template<typename T0,
+ typename T1,
+ typename T2,
+ typename T3,
+ typename T4,
+ typename T5,
+ typename T6,
+ typename T7,
+ typename T8>
+inline
+PB_ASSOC_CLASS_NAME(T0 t0, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8) : PB_ASSOC_DIRECT_BASE_C_DEC(t0, t1, t2, t3, t4, t5, t6, t7, t8)
+{ }
diff --git a/libstdc++-v3/include/ext/pb_assoc/detail/ds_trait_imp.hpp b/libstdc++-v3/include/ext/pb_assoc/detail/ds_trait_imp.hpp
new file mode 100644
index 00000000000..102fda60f2a
--- /dev/null
+++ b/libstdc++-v3/include/ext/pb_assoc/detail/ds_trait_imp.hpp
@@ -0,0 +1,336 @@
+// -*- C++ -*-
+
+// 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.
+
+// As a special exception, you may use this file as part of a free software
+// library without restriction. Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General 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 ds_trait_imp.hpp
+ * Contains data-structure traits implementation.
+ */
+
+#ifndef DS_TRAIT_IMP_HPP
+#define DS_TRAIT_IMP_HPP
+
+namespace detail
+{
+
+ template<class Cntnr, class DS_Category>
+ struct erase_can_throw_imp
+ {
+ enum
+ {
+ value =
+ pb_assoc::detail::is_same_type<
+ DS_Category,
+ ov_tree_ds_tag>::value
+ };
+ };
+
+ template<class Cntnr>
+ struct erase_can_throw_imp<
+ Cntnr,
+ compound_ds_tag>
+ {
+ enum
+ {
+ value = Cntnr::erase_can_throw
+ };
+ };
+
+ template<class Cntnr, class DS_Category>
+ struct erase_iterators_imp
+ {
+ enum
+ {
+ value =
+ pb_assoc::detail::is_same_type<
+ DS_Category,
+ rb_tree_ds_tag>::value ||
+ pb_assoc::detail::is_same_type<
+ DS_Category,
+ splay_tree_ds_tag>::value
+ };
+ };
+
+ template<class Cntnr>
+ struct erase_iterators_imp<
+ Cntnr,
+ compound_ds_tag>
+ {
+ enum
+ {
+ value = Cntnr::erase_iterators
+ };
+ };
+
+ template<class Cntnr, class DS_Category>
+ struct order_preserving_imp
+ {
+ enum
+ {
+ value =
+ pb_assoc::detail::is_same_type<
+ DS_Category,
+ rb_tree_ds_tag>::value ||
+ pb_assoc::detail::is_same_type<
+ DS_Category,
+ splay_tree_ds_tag>::value ||
+ pb_assoc::detail::is_same_type<
+ DS_Category,
+ ov_tree_ds_tag>::value
+ };
+ };
+
+ template<class Cntnr>
+ struct order_preserving_imp<
+ Cntnr,
+ compound_ds_tag>
+ {
+ enum
+ {
+ value = Cntnr::order_preserving
+ };
+ };
+
+ template<class Cntnr, class DS_Category>
+ struct invalidation_guarantee_imp
+ {
+ private:
+ enum
+ {
+ node_based =
+ pb_assoc::detail::is_same_type<
+ DS_Category,
+ cc_hash_ds_tag>::value ||
+ pb_assoc::detail::is_same_type<
+ DS_Category,
+ rb_tree_ds_tag>::value ||
+ pb_assoc::detail::is_same_type<
+ DS_Category,
+ splay_tree_ds_tag>::value ||
+ pb_assoc::detail::is_same_type<
+ DS_Category,
+ lu_ds_tag>::value
+ };
+
+ enum
+ {
+ vector_organized =
+ pb_assoc::detail::is_same_type<
+ DS_Category,
+ cc_hash_ds_tag>::value
+ };
+
+ public:
+ typedef
+ typename cond_type<
+ node_based,
+ typename cond_type<
+ vector_organized,
+ find_invalidation_guarantee,
+ range_invalidation_guarantee>::type,
+ basic_invalidation_guarantee>::type
+ type;
+ };
+
+ template<class Cntnr>
+ struct invalidation_guarantee_imp<
+ Cntnr,
+ compound_ds_tag>
+ {
+ typedef typename Cntnr::invalidation_guarantee type;
+ };
+
+ template<class Cntnr, class DS_Category>
+ struct reverse_iteration_imp
+ {
+ enum
+ {
+ value =
+ is_same_type<
+ DS_Category,
+ rb_tree_ds_tag>::value ||
+ is_same_type<
+ DS_Category,
+ splay_tree_ds_tag>::value
+ };
+ };
+
+ template<class Cntnr>
+ struct reverse_iteration_imp<
+ Cntnr,
+ compound_ds_tag>
+ {
+ enum
+ {
+ value = Cntnr::reverse_iteration
+ };
+ };
+
+ template<class Cntnr, class DS_Category>
+ struct split_join_imp
+ {
+ enum
+ {
+ value =
+ is_same_type<
+ DS_Category,
+ rb_tree_ds_tag>::value ||
+ is_same_type<
+ DS_Category,
+ splay_tree_ds_tag>::value ||
+ is_same_type<
+ DS_Category,
+ ov_tree_ds_tag>::value
+ };
+ };
+
+ template<class Cntnr>
+ struct split_join_imp<
+ Cntnr,
+ compound_ds_tag>
+ {
+ enum
+ {
+ value = false
+ };
+ };
+
+ template<class Cntnr>
+ struct basic_data_structure_traits
+ {
+
+ private:
+ typedef Cntnr cntnr;
+
+ typedef typename Cntnr::ds_category ds_category;
+
+ public:
+ enum
+ {
+ erase_can_throw =
+ pb_assoc::detail::erase_can_throw_imp<
+ cntnr,
+ ds_category>::value
+ };
+
+ enum
+ {
+ order_preserving =
+ pb_assoc::detail::order_preserving_imp<
+ cntnr,
+ ds_category>::value
+ };
+
+ enum
+ {
+ erase_iterators =
+ pb_assoc::detail::erase_iterators_imp<
+ Cntnr,
+ ds_category>::value
+ };
+
+ typedef
+ typename pb_assoc::detail::invalidation_guarantee_imp<
+ cntnr,
+ ds_category>::type
+ invalidation_guarantee;
+
+ enum
+ {
+ reverse_iteration =
+ pb_assoc::detail::reverse_iteration_imp<
+ cntnr,
+ ds_category>::value
+ };
+
+ enum
+ {
+ split_join =
+ pb_assoc::detail::split_join_imp<
+ cntnr,
+ ds_category>::value
+ };
+ };
+
+ template<class Cntnr, class DS_Category>
+ struct data_structure_traits : public basic_data_structure_traits<
+ Cntnr>
+ { };
+
+ template<class Cntnr>
+ struct data_structure_traits<
+ Cntnr,
+ rb_tree_ds_tag> : public basic_data_structure_traits<
+ Cntnr>
+ {
+ public:
+ enum
+ {
+ split_join_can_throw = false
+ };
+ };
+
+ template<class Cntnr>
+ struct data_structure_traits<
+ Cntnr,
+ splay_tree_ds_tag> : public basic_data_structure_traits<
+ Cntnr>
+ {
+ public:
+ enum
+ {
+ split_join_can_throw = false
+ };
+ };
+
+ template<class Cntnr>
+ struct data_structure_traits<
+ Cntnr,
+ ov_tree_ds_tag> : public basic_data_structure_traits<
+ Cntnr>
+ {
+ public:
+ enum
+ {
+ split_join_can_throw = true
+ };
+ };
+
+} // namespace detail
+
+#endif // #ifndef DS_TRAIT_IMP_HPP
diff --git a/libstdc++-v3/include/ext/pb_assoc/detail/eq_fn/eq_by_less.hpp b/libstdc++-v3/include/ext/pb_assoc/detail/eq_fn/eq_by_less.hpp
new file mode 100644
index 00000000000..b2f5a0b327a
--- /dev/null
+++ b/libstdc++-v3/include/ext/pb_assoc/detail/eq_fn/eq_by_less.hpp
@@ -0,0 +1,78 @@
+// -*- C++ -*-
+
+// 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.
+
+// As a special exception, you may use this file as part of a free software
+// library without restriction. Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General 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 eq_by_less.hpp
+ * Contains an equivalence function.
+ */
+
+#ifndef EQ_BY_LESS_HPP
+#define EQ_BY_LESS_HPP
+
+#include <utility>
+#include <functional>
+#include <vector>
+#include <assert.h>
+#include <ext/pb_assoc/detail/types_traits.hpp>
+
+namespace pb_assoc
+{
+
+ namespace detail
+ {
+
+#include <functional>
+
+ template<typename Key, class Cmp_Fn>
+ struct eq_by_less : public std::binary_function<const Key& , const Key& , bool>,
+ protected Cmp_Fn
+ {
+ bool
+ operator()(const Key& r_lhs, const Key& r_rhs) const
+ {
+ return (!(Cmp_Fn::operator()(r_lhs, r_rhs)&&
+ !(Cmp_Fn::operator()(r_rhs, r_lhs))));
+ }
+ };
+
+ } // namespace detail
+
+} // namespace pb_assoc
+
+#endif // #ifndef EQ_BY_LESS_HPP
diff --git a/libstdc++-v3/include/ext/pb_assoc/detail/eq_fn/hash_eq_fn.hpp b/libstdc++-v3/include/ext/pb_assoc/detail/eq_fn/hash_eq_fn.hpp
new file mode 100644
index 00000000000..9572bb54a01
--- /dev/null
+++ b/libstdc++-v3/include/ext/pb_assoc/detail/eq_fn/hash_eq_fn.hpp
@@ -0,0 +1,211 @@
+// -*- C++ -*-
+
+// 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.
+
+// As a special exception, you may use this file as part of a free software
+// library without restriction. Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General 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 hash_eq_fn.hpp
+ * Contains 2 eqivalence functions, one employing a hash value,
+ * and one ignoring it.
+ */
+
+#ifndef HASH_EQ_FN_HPP
+#define HASH_EQ_FN_HPP
+
+#include <utility>
+
+namespace pb_assoc
+{
+
+ namespace detail
+ {
+
+#ifdef PB_ASSOC_HASH_EQ_FN_DEBUG
+#define PB_ASSOC_DBG_ASSERT(X) assert(X)
+#define PB_ASSOC_DBG_VERIFY(X) assert(X)
+#define PB_ASSOC_DBG_ONLY(X) X
+#else // #ifdef PB_ASSOC_HASH_EQ_FN_DEBUG
+#define PB_ASSOC_DBG_ASSERT(X)
+#define PB_ASSOC_DBG_VERIFY(X) {if((X)==0);}
+#define PB_ASSOC_DBG_ONLY(X) ;
+#endif // #ifdef PB_ASSOC_HASH_EQ_FN_DEBUG
+
+ template<typename Key, class Eq_Fn, class Allocator, bool Store_Hash>
+ struct hash_eq_fn;
+
+#define PB_ASSOC_CLASS_T_DEC \
+ template<typename Key, class Eq_Fn, class Allocator>
+
+#define PB_ASSOC_CLASS_C_DEC \
+ hash_eq_fn< \
+ Key, \
+ Eq_Fn, \
+ Allocator, \
+ false>
+
+ /**
+ * Specialization 1- The client requests that hash values not be stored.
+ **/
+ template<typename Key, class Eq_Fn, class Allocator>
+ struct hash_eq_fn<Key, Eq_Fn, Allocator, false> : public Eq_Fn
+ {
+ typedef Eq_Fn my_eq_fn_base;
+
+ typedef typename Allocator::template rebind<Key>::other key_allocator;
+
+ typedef typename key_allocator::const_reference const_key_reference;
+
+ hash_eq_fn();
+
+ hash_eq_fn(const Eq_Fn& r_eq_fn);
+
+ inline bool
+ operator()(const_key_reference r_lhs_key, const_key_reference r_rhs_key) const;
+
+ inline void
+ swap(const PB_ASSOC_CLASS_C_DEC& r_other);
+ };
+
+ PB_ASSOC_CLASS_T_DEC
+ PB_ASSOC_CLASS_C_DEC::
+ hash_eq_fn()
+ { }
+
+ PB_ASSOC_CLASS_T_DEC
+ inline void
+ PB_ASSOC_CLASS_C_DEC::
+ swap(const PB_ASSOC_CLASS_C_DEC& r_other)
+ {
+ std::swap((Eq_Fn& )(*this), (Eq_Fn& )r_other);
+ }
+
+ PB_ASSOC_CLASS_T_DEC
+ PB_ASSOC_CLASS_C_DEC::
+ hash_eq_fn(const Eq_Fn& r_eq_fn) :
+ Eq_Fn(r_eq_fn)
+ { }
+
+ PB_ASSOC_CLASS_T_DEC
+ inline bool
+ PB_ASSOC_CLASS_C_DEC::
+ operator()(const_key_reference r_lhs_key, const_key_reference r_rhs_key) const
+ {
+ return (my_eq_fn_base::operator()(r_lhs_key, r_rhs_key));
+ }
+
+#undef PB_ASSOC_CLASS_T_DEC
+#undef PB_ASSOC_CLASS_C_DEC
+
+#define PB_ASSOC_CLASS_T_DEC \
+ template<typename Key, class Eq_Fn, class Allocator>
+
+#define PB_ASSOC_CLASS_C_DEC \
+ hash_eq_fn< \
+ Key, \
+ Eq_Fn, \
+ Allocator, \
+ true>
+
+ /**
+ * Specialization 2- The client requests that hash values be stored.
+ **/
+ template<typename Key, class Eq_Fn, class Allocator>
+ struct hash_eq_fn<Key, Eq_Fn, Allocator, true> :
+ public Eq_Fn
+ {
+ typedef typename Allocator::size_type size_type;
+
+ typedef Eq_Fn my_eq_fn_base;
+
+ typedef typename Allocator::template rebind<Key>::other key_allocator;
+
+ typedef typename key_allocator::const_reference const_key_reference;
+
+ hash_eq_fn();
+
+ hash_eq_fn(const Eq_Fn& r_eq_fn);
+
+ inline bool
+ operator()(const_key_reference r_lhs_key, size_type lhs_hash, const_key_reference r_rhs_key, size_type rhs_hash) const;
+
+ inline void
+ swap(const PB_ASSOC_CLASS_C_DEC& r_other);
+ };
+
+ PB_ASSOC_CLASS_T_DEC
+ PB_ASSOC_CLASS_C_DEC::
+ hash_eq_fn()
+ { }
+
+ PB_ASSOC_CLASS_T_DEC
+ PB_ASSOC_CLASS_C_DEC::
+ hash_eq_fn(const Eq_Fn& r_eq_fn) :
+ Eq_Fn(r_eq_fn)
+ { }
+
+ PB_ASSOC_CLASS_T_DEC
+ inline bool
+ PB_ASSOC_CLASS_C_DEC::
+ operator()(const_key_reference r_lhs_key, size_type lhs_hash, const_key_reference r_rhs_key, size_type rhs_hash) const
+ {
+ PB_ASSOC_DBG_ASSERT(!my_eq_fn_base::operator()(r_lhs_key, r_rhs_key) ||
+ lhs_hash == rhs_hash);
+
+ return (lhs_hash == rhs_hash&&
+ my_eq_fn_base::operator()(r_lhs_key, r_rhs_key));
+ }
+
+ PB_ASSOC_CLASS_T_DEC
+ inline void
+ PB_ASSOC_CLASS_C_DEC::
+ swap(const PB_ASSOC_CLASS_C_DEC& r_other)
+ {
+ std::swap((Eq_Fn& )(*this), (Eq_Fn& )(r_other));
+ }
+
+#undef PB_ASSOC_CLASS_T_DEC
+#undef PB_ASSOC_CLASS_C_DEC
+
+#undef PB_ASSOC_DBG_ASSERT
+#undef PB_ASSOC_DBG_VERIFY
+#undef PB_ASSOC_DBG_ONLY
+
+ } // namespace detail
+
+} // namespace pb_assoc
+
+#endif // #ifndef HASH_EQ_FN_HPP
diff --git a/libstdc++-v3/include/ext/pb_assoc/detail/gp_hash_assoc_cntnr/constructor_destructor_fn_imps.hpp b/libstdc++-v3/include/ext/pb_assoc/detail/gp_hash_assoc_cntnr/constructor_destructor_fn_imps.hpp
new file mode 100644
index 00000000000..610c4695991
--- /dev/null
+++ b/libstdc++-v3/include/ext/pb_assoc/detail/gp_hash_assoc_cntnr/constructor_destructor_fn_imps.hpp
@@ -0,0 +1,166 @@
+// -*- C++ -*-
+
+// 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.
+
+// As a special exception, you may use this file as part of a free software
+// library without restriction. Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General 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 constructor_destructor_fn_imps.hpp
+ * Contains implementations of gp_ht_maps's constructors, destructors,
+ * and related functions.
+ */
+
+PB_ASSOC_CLASS_T_DEC
+PB_ASSOC_CLASS_C_DEC::
+gp_hash_assoc_cntnr()
+{ }
+
+PB_ASSOC_CLASS_T_DEC
+PB_ASSOC_CLASS_C_DEC::
+gp_hash_assoc_cntnr(const Hash_Fn& r_hash_fn) :
+ PB_ASSOC_BASE_C_DEC(r_hash_fn)
+{ }
+
+PB_ASSOC_CLASS_T_DEC
+PB_ASSOC_CLASS_C_DEC::
+gp_hash_assoc_cntnr(const Hash_Fn& r_hash_fn, const Eq_Fn& r_eq_fn) :
+ PB_ASSOC_BASE_C_DEC(r_hash_fn, r_eq_fn)
+{ }
+
+PB_ASSOC_CLASS_T_DEC
+PB_ASSOC_CLASS_C_DEC::
+gp_hash_assoc_cntnr(const Hash_Fn& r_hash_fn, const Eq_Fn& r_eq_fn, const Comb_Probe_Fn& r_comb_hash_fn) :
+ PB_ASSOC_BASE_C_DEC(r_hash_fn, r_eq_fn, r_comb_hash_fn)
+{ }
+
+PB_ASSOC_CLASS_T_DEC
+PB_ASSOC_CLASS_C_DEC::
+gp_hash_assoc_cntnr(const Hash_Fn& r_hash_fn, const Eq_Fn& r_eq_fn, const Comb_Probe_Fn& r_comb_hash_fn, const Probe_Fn& r_probe_fn) :
+ PB_ASSOC_BASE_C_DEC(r_hash_fn, r_eq_fn, r_comb_hash_fn, r_probe_fn)
+{ }
+
+PB_ASSOC_CLASS_T_DEC
+PB_ASSOC_CLASS_C_DEC::
+gp_hash_assoc_cntnr(const Hash_Fn& r_hash_fn, const Eq_Fn& r_eq_fn, const Comb_Probe_Fn& r_comb_hash_fn, const Probe_Fn& r_probe_fn, const Resize_Policy& r_resize_policy) :
+ PB_ASSOC_BASE_C_DEC(r_hash_fn, r_eq_fn, r_comb_hash_fn, r_probe_fn, r_resize_policy)
+{ }
+
+PB_ASSOC_CLASS_T_DEC
+template<class It>
+PB_ASSOC_CLASS_C_DEC::
+gp_hash_assoc_cntnr(It first_it, It last_it)
+{
+ my_base::copy_from_range(first_it, last_it);
+}
+
+PB_ASSOC_CLASS_T_DEC
+template<class It>
+PB_ASSOC_CLASS_C_DEC::
+gp_hash_assoc_cntnr(It first_it, It last_it, const Hash_Fn& r_hash_fn) :
+ PB_ASSOC_BASE_C_DEC(r_hash_fn)
+{
+ my_base::copy_from_range(first_it, last_it);
+}
+
+PB_ASSOC_CLASS_T_DEC
+template<class It>
+PB_ASSOC_CLASS_C_DEC::
+gp_hash_assoc_cntnr(It first_it, It last_it, const Hash_Fn& r_hash_fn, const Eq_Fn& r_eq_fn) :
+ PB_ASSOC_BASE_C_DEC(r_hash_fn, r_eq_fn)
+{
+ my_base::copy_from_range(first_it, last_it);
+}
+
+PB_ASSOC_CLASS_T_DEC
+template<class It>
+PB_ASSOC_CLASS_C_DEC::
+gp_hash_assoc_cntnr(It first_it, It last_it, const Hash_Fn& r_hash_fn, const Eq_Fn& r_eq_fn, const Comb_Probe_Fn& r_comb_hash_fn) :
+ PB_ASSOC_BASE_C_DEC(r_hash_fn, r_eq_fn, r_comb_hash_fn)
+{
+ my_base::copy_from_range(first_it, last_it);
+}
+
+PB_ASSOC_CLASS_T_DEC
+template<class It>
+PB_ASSOC_CLASS_C_DEC::
+gp_hash_assoc_cntnr(It first_it, It last_it, const Hash_Fn& r_hash_fn, const Eq_Fn& r_eq_fn, const Comb_Probe_Fn& r_comb_hash_fn, const Probe_Fn& r_probe_fn) :
+ PB_ASSOC_BASE_C_DEC(r_hash_fn, r_eq_fn, r_comb_hash_fn, r_probe_fn)
+{
+ my_base::copy_from_range(first_it, last_it);
+}
+
+PB_ASSOC_CLASS_T_DEC
+template<class It>
+PB_ASSOC_CLASS_C_DEC::
+gp_hash_assoc_cntnr(It first_it, It last_it, const Hash_Fn& r_hash_fn, const Eq_Fn& r_eq_fn, const Comb_Probe_Fn& r_comb_hash_fn, const Probe_Fn& r_probe_fn, const Resize_Policy& r_resize_policy) :
+ PB_ASSOC_BASE_C_DEC(r_hash_fn, r_eq_fn, r_comb_hash_fn, r_probe_fn, r_resize_policy)
+{
+ my_base::copy_from_range(first_it, last_it);
+}
+
+PB_ASSOC_CLASS_T_DEC
+PB_ASSOC_CLASS_C_DEC::
+gp_hash_assoc_cntnr(const PB_ASSOC_CLASS_C_DEC& r_other) :
+ PB_ASSOC_BASE_C_DEC((const PB_ASSOC_BASE_C_DEC& )(r_other))
+{ }
+
+PB_ASSOC_CLASS_T_DEC
+PB_ASSOC_CLASS_C_DEC&
+PB_ASSOC_CLASS_C_DEC::
+operator=(const PB_ASSOC_CLASS_C_DEC& r_other)
+{
+ if (this !=& r_other)
+ {
+ PB_ASSOC_CLASS_C_DEC tmp(r_other);
+
+ swap(tmp);
+ }
+
+ return (*this);
+}
+
+PB_ASSOC_CLASS_T_DEC
+PB_ASSOC_CLASS_C_DEC::
+~gp_hash_assoc_cntnr()
+{ }
+
+PB_ASSOC_CLASS_T_DEC
+void
+PB_ASSOC_CLASS_C_DEC::
+swap(PB_ASSOC_CLASS_C_DEC& r_other)
+{
+ my_base::swap(r_other);
+}
diff --git a/libstdc++-v3/include/ext/pb_assoc/detail/gp_ht_map_/constructor_destructor_fn_imps.hpp b/libstdc++-v3/include/ext/pb_assoc/detail/gp_ht_map_/constructor_destructor_fn_imps.hpp
new file mode 100644
index 00000000000..d1f6b38133b
--- /dev/null
+++ b/libstdc++-v3/include/ext/pb_assoc/detail/gp_ht_map_/constructor_destructor_fn_imps.hpp
@@ -0,0 +1,255 @@
+// -*- C++ -*-
+
+// 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.
+
+// As a special exception, you may use this file as part of a free software
+// library without restriction. Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General 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 constructor_destructor_fn_imps.hpp
+ * Contains implementations of gp_ht_map_'s constructors, destructor,
+ * and related functions.
+ */
+
+PB_ASSOC_CLASS_T_DEC
+typename PB_ASSOC_CLASS_C_DEC::entry_allocator
+PB_ASSOC_CLASS_C_DEC::s_entry_allocator;
+
+PB_ASSOC_CLASS_T_DEC
+template<class It>
+void
+PB_ASSOC_CLASS_C_DEC::
+copy_from_range(It first_it, It last_it)
+{
+ while (first_it != last_it)
+ insert(*(first_it++));
+}
+
+PB_ASSOC_CLASS_T_DEC
+PB_ASSOC_CLASS_C_DEC::
+PB_ASSOC_CLASS_NAME() :
+ my_ranged_probe_fn_base(Resize_Policy::get_init_size()),
+ m_a_entries(s_entry_allocator.allocate(
+ Resize_Policy::get_init_size())),
+ m_num_e(Resize_Policy::get_init_size()),
+ m_num_used_e(0)
+{
+ initialize();
+
+ PB_ASSOC_DBG_ONLY(PB_ASSOC_CLASS_C_DEC::assert_valid();)
+ }
+
+PB_ASSOC_CLASS_T_DEC
+PB_ASSOC_CLASS_C_DEC::
+PB_ASSOC_CLASS_NAME(const Hash_Fn& r_hash_fn) :
+ my_ranged_probe_fn_base(Resize_Policy::get_init_size(), r_hash_fn),
+ m_a_entries(s_entry_allocator.allocate(
+ Resize_Policy::get_init_size())),
+ m_num_e(Resize_Policy::get_init_size()),
+ m_num_used_e(0)
+{
+ initialize();
+
+ PB_ASSOC_DBG_ONLY(PB_ASSOC_CLASS_C_DEC::assert_valid();)
+ }
+
+PB_ASSOC_CLASS_T_DEC
+PB_ASSOC_CLASS_C_DEC::
+PB_ASSOC_CLASS_NAME(const Hash_Fn& r_hash_fn, const Eq_Fn& r_eq_fn) :
+ my_hash_eq_fn_base(r_eq_fn),
+ my_ranged_probe_fn_base(Resize_Policy::get_init_size(), r_hash_fn),
+ m_a_entries(s_entry_allocator.allocate(
+ Resize_Policy::get_init_size())),
+ m_num_e(Resize_Policy::get_init_size()),
+ m_num_used_e(0)
+{
+ initialize();
+
+ PB_ASSOC_DBG_ONLY(PB_ASSOC_CLASS_C_DEC::assert_valid();)
+ }
+
+PB_ASSOC_CLASS_T_DEC
+PB_ASSOC_CLASS_C_DEC::
+PB_ASSOC_CLASS_NAME(const Hash_Fn& r_hash_fn, const Eq_Fn& r_eq_fn, const Comb_Probe_Fn& r_comb_hash_fn) :
+ my_hash_eq_fn_base(r_eq_fn),
+ my_ranged_probe_fn_base(Resize_Policy::get_init_size(),
+ r_hash_fn, r_comb_hash_fn),
+ m_a_entries(s_entry_allocator.allocate(
+ Resize_Policy::get_init_size())),
+ m_num_e(Resize_Policy::get_init_size()),
+ m_num_used_e(0)
+{
+ initialize();
+
+ PB_ASSOC_DBG_ONLY(PB_ASSOC_CLASS_C_DEC::assert_valid();)
+ }
+
+PB_ASSOC_CLASS_T_DEC
+PB_ASSOC_CLASS_C_DEC::
+PB_ASSOC_CLASS_NAME(const Hash_Fn& r_hash_fn, const Eq_Fn& r_eq_fn, const Comb_Probe_Fn& r_comb_hash_fn, const Probe_Fn& r_probe_fn) :
+ my_hash_eq_fn_base(r_eq_fn),
+ my_ranged_probe_fn_base(Resize_Policy::get_init_size(),
+ r_hash_fn, r_comb_hash_fn, r_probe_fn),
+ m_a_entries(s_entry_allocator.allocate(
+ Resize_Policy::get_init_size())),
+ m_num_e(Resize_Policy::get_init_size()),
+ m_num_used_e(0)
+{
+ initialize();
+
+ PB_ASSOC_DBG_ONLY(PB_ASSOC_CLASS_C_DEC::assert_valid();)
+ }
+
+PB_ASSOC_CLASS_T_DEC
+PB_ASSOC_CLASS_C_DEC::
+PB_ASSOC_CLASS_NAME(const Hash_Fn& r_hash_fn, const Eq_Fn& r_eq_fn, const Comb_Probe_Fn& r_comb_hash_fn, const Probe_Fn& r_probe_fn, const Resize_Policy& r_resize_policy) :
+ my_hash_eq_fn_base(r_eq_fn),
+ my_resize_base(r_resize_policy),
+ my_ranged_probe_fn_base(Resize_Policy::get_init_size(),
+ r_hash_fn, r_comb_hash_fn, r_probe_fn),
+ m_a_entries(s_entry_allocator.allocate(
+ Resize_Policy::get_init_size())),
+ m_num_e(Resize_Policy::get_init_size()),
+ m_num_used_e(0)
+{
+ initialize();
+
+ PB_ASSOC_DBG_ONLY(PB_ASSOC_CLASS_C_DEC::assert_r_valid();)
+ }
+
+PB_ASSOC_CLASS_T_DEC
+PB_ASSOC_CLASS_C_DEC::
+PB_ASSOC_CLASS_NAME(const PB_ASSOC_CLASS_C_DEC& r_other) :
+ my_hash_eq_fn_base(r_other),
+ my_resize_base(r_other),
+ my_ranged_probe_fn_base(r_other),
+ m_a_entries(s_entry_allocator.allocate(
+ r_other.m_num_e)),
+ m_num_e(r_other.m_num_e),
+ m_num_used_e(r_other.m_num_used_e)
+{
+ initialize();
+
+ try
+ {
+ for (size_type i = 0; i < m_num_e; ++i)
+ {
+ entry_pointer p_e =& r_other.m_a_entries[i];
+ if (p_e->m_stat == VALID_ENTRY_STATUS)
+ constructor_insert_new_imp((const_mapped_reference)p_e->m_value,
+ i,
+ my_hash_traits_base::s_store_hash_indicator);
+ }
+ }
+ catch(...)
+ {
+ deallocate_all();
+
+ throw;
+ }
+
+ PB_ASSOC_DBG_ONLY(PB_ASSOC_CLASS_C_DEC::assert_valid();)
+ }
+
+PB_ASSOC_CLASS_T_DEC
+PB_ASSOC_CLASS_C_DEC::
+~PB_ASSOC_CLASS_NAME()
+{
+ deallocate_all();
+}
+
+PB_ASSOC_CLASS_T_DEC
+void
+PB_ASSOC_CLASS_C_DEC::
+swap(PB_ASSOC_CLASS_C_DEC& r_other)
+{
+ PB_ASSOC_DBG_ONLY(assert_valid());
+ PB_ASSOC_DBG_ONLY(r_other.assert_valid());
+
+ std::swap(m_a_entries, r_other.m_a_entries);
+
+ std::swap(m_num_e, r_other.m_num_e);
+
+ std::swap(m_num_used_e, r_other.m_num_used_e);
+
+ my_ranged_probe_fn_base::swap(r_other);
+
+ my_hash_eq_fn_base::swap(r_other);
+
+ my_resize_base::swap(r_other);
+
+ PB_ASSOC_DBG_ONLY(my_cntnr_debug_base::swap(r_other));
+
+ PB_ASSOC_DBG_ONLY(assert_valid());
+ PB_ASSOC_DBG_ONLY(r_other.assert_valid());
+}
+
+PB_ASSOC_CLASS_T_DEC
+void
+PB_ASSOC_CLASS_C_DEC::
+deallocate_all()
+{
+ clear();
+
+ erase_all_valid_entries(m_a_entries, m_num_e);
+
+ s_entry_allocator.deallocate(m_a_entries, m_num_e);
+}
+
+PB_ASSOC_CLASS_T_DEC
+void
+PB_ASSOC_CLASS_C_DEC::
+erase_all_valid_entries(entry_array a_entries_resized, size_type size)
+{
+ for (size_type pos = 0; pos < size; ++pos)
+ {
+ entry_pointer p_e =& a_entries_resized[pos];
+
+ if (p_e->m_stat == VALID_ENTRY_STATUS)
+ p_e->m_value.~value_type();
+ }
+}
+
+PB_ASSOC_CLASS_T_DEC
+void
+PB_ASSOC_CLASS_C_DEC::
+initialize()
+{
+ for (size_type i = 0; i < m_num_e; ++i)
+ m_a_entries[i].m_stat = (entry_status)EMPTY_ENTRY_STATUS;
+}
+
+#include <ext/pb_assoc/detail/gp_ht_map_/constructor_destructor_store_hash_fn_imps.hpp>
+#include <ext/pb_assoc/detail/gp_ht_map_/constructor_destructor_no_store_hash_fn_imps.hpp>
diff --git a/libstdc++-v3/include/ext/pb_assoc/detail/gp_ht_map_/constructor_destructor_no_store_hash_fn_imps.hpp b/libstdc++-v3/include/ext/pb_assoc/detail/gp_ht_map_/constructor_destructor_no_store_hash_fn_imps.hpp
new file mode 100644
index 00000000000..94211247961
--- /dev/null
+++ b/libstdc++-v3/include/ext/pb_assoc/detail/gp_ht_map_/constructor_destructor_no_store_hash_fn_imps.hpp
@@ -0,0 +1,61 @@
+// -*- C++ -*-
+
+// 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.
+
+// As a special exception, you may use this file as part of a free software
+// library without restriction. Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General 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 constructor_destructor_no_store_hash_fn_imps.hpp
+ * Contains implementations of gp_ht_map_'s constructors, destructor,
+ * and related functions.
+ */
+
+PB_ASSOC_CLASS_T_DEC
+inline void
+PB_ASSOC_CLASS_C_DEC::
+constructor_insert_new_imp(const_mapped_reference r_val, size_type pos, int_to_type<false>)
+{
+ PB_ASSOC_DBG_ASSERT(m_a_entries[pos].m_stat != VALID_ENTRY_STATUS);
+
+ entry* const p_e = m_a_entries + pos;
+
+ new (&p_e->m_value) mapped_value_type(r_val);
+
+ p_e->m_stat = VALID_ENTRY_STATUS;
+
+ PB_ASSOC_DBG_ONLY(my_map_debug_base::
+ insert_new(p_e->m_value.first);)
+ }
diff --git a/libstdc++-v3/include/ext/pb_assoc/detail/gp_ht_map_/constructor_destructor_store_hash_fn_imps.hpp b/libstdc++-v3/include/ext/pb_assoc/detail/gp_ht_map_/constructor_destructor_store_hash_fn_imps.hpp
new file mode 100644
index 00000000000..c26b1dbc7f8
--- /dev/null
+++ b/libstdc++-v3/include/ext/pb_assoc/detail/gp_ht_map_/constructor_destructor_store_hash_fn_imps.hpp
@@ -0,0 +1,64 @@
+// -*- C++ -*-
+
+// 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.
+
+// As a special exception, you may use this file as part of a free software
+// library without restriction. Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General 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 constructor_destructor_store_hash_fn_imps.hpp
+ * Contains implementations of gp_ht_map_'s constructors, destructor,
+ * and related functions.
+ */
+
+PB_ASSOC_CLASS_T_DEC
+inline void
+PB_ASSOC_CLASS_C_DEC::
+constructor_insert_new_imp(const_mapped_reference r_val, size_type pos, int_to_type<true>)
+{
+ PB_ASSOC_DBG_ASSERT(m_a_entries[pos].m_stat != VALID_ENTRY_STATUS);
+
+ entry* const p_e = m_a_entries + pos;
+
+ new (&p_e->m_value) mapped_value_type(r_val);
+
+ p_e->m_hash = my_ranged_probe_fn_base::operator()(
+ PB_ASSOC_V2F(r_val)).second;
+
+ p_e->m_stat = VALID_ENTRY_STATUS;
+
+ PB_ASSOC_DBG_ONLY(my_map_debug_base::
+ insert_new(p_e->m_value.first);)
+ }
diff --git a/libstdc++-v3/include/ext/pb_assoc/detail/gp_ht_map_/debug_fn_imps.hpp b/libstdc++-v3/include/ext/pb_assoc/detail/gp_ht_map_/debug_fn_imps.hpp
new file mode 100644
index 00000000000..e02864bb172
--- /dev/null
+++ b/libstdc++-v3/include/ext/pb_assoc/detail/gp_ht_map_/debug_fn_imps.hpp
@@ -0,0 +1,60 @@
+// -*- C++ -*-
+
+// 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.
+
+// As a special exception, you may use this file as part of a free software
+// library without restriction. Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General 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_fn_imps.hpp
+ * Contains implementations of gp_ht_map_'s debug-mode functions.
+ */
+
+#ifdef PB_ASSOC_GP_HT_MAP_DEBUG_
+
+PB_ASSOC_CLASS_T_DEC
+void
+PB_ASSOC_CLASS_C_DEC::
+assert_valid() const
+{
+ my_map_debug_base::check_size(m_num_used_e);
+
+ assert_entry_array_valid(m_a_entries, my_traits_base::m_store_hash_indicator);
+}
+
+#include <ext/pb_assoc/detail/gp_ht_map_/debug_no_store_hash_fn_imps.hpp>
+#include <ext/pb_assoc/detail/gp_ht_map_/debug_store_hash_fn_imps.hpp>
+
+#endif // #ifdef PB_ASSOC_GP_HT_MAP_DEBUG_
diff --git a/libstdc++-v3/include/ext/pb_assoc/detail/gp_ht_map_/debug_no_store_hash_fn_imps.hpp b/libstdc++-v3/include/ext/pb_assoc/detail/gp_ht_map_/debug_no_store_hash_fn_imps.hpp
new file mode 100644
index 00000000000..bef121d9a94
--- /dev/null
+++ b/libstdc++-v3/include/ext/pb_assoc/detail/gp_ht_map_/debug_no_store_hash_fn_imps.hpp
@@ -0,0 +1,81 @@
+// -*- C++ -*-
+
+// 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.
+
+// As a special exception, you may use this file as part of a free software
+// library without restriction. Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General 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_no_store_hash_fn_imps.hpp
+ * Contains implementations of gp_ht_map_'s debug-mode functions.
+ */
+
+#ifdef PB_ASSOC_GP_HT_MAP_DEBUG_
+
+PB_ASSOC_CLASS_T_DEC
+void
+PB_ASSOC_CLASS_C_DEC::
+assert_entry_array_valid(const entry_array a_entries, store_hash_false_indicator) const
+{
+ size_type iterated_num_used_e = 0;
+
+ for (size_type pos = 0; pos < m_num_e; ++pos)
+ {
+ const_entry_pointer p_e =& a_entries[pos];
+
+ switch(p_e->m_stat)
+ {
+ case EMPTY_ENTRY_STATUS:
+ case ERASED_ENTRY_STATUS:
+ break;
+ case VALID_ENTRY_STATUS:
+ {
+ const_key_reference r_key = p_e->m_value.first;
+
+ my_map_debug_base::check_key_exists(r_key);
+
+ ++iterated_num_used_e;
+
+ break;
+ }
+ default:
+ PB_ASSOC_DBG_ASSERT(0);
+ };
+ }
+
+ PB_ASSOC_DBG_ASSERT(iterated_num_used_e == m_num_used_e);
+}
+
+#endif // #ifdef PB_ASSOC_GP_HT_MAP_DEBUG_
diff --git a/libstdc++-v3/include/ext/pb_assoc/detail/gp_ht_map_/debug_store_hash_fn_imps.hpp b/libstdc++-v3/include/ext/pb_assoc/detail/gp_ht_map_/debug_store_hash_fn_imps.hpp
new file mode 100644
index 00000000000..7c75c23aaa3
--- /dev/null
+++ b/libstdc++-v3/include/ext/pb_assoc/detail/gp_ht_map_/debug_store_hash_fn_imps.hpp
@@ -0,0 +1,86 @@
+// -*- C++ -*-
+
+// 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.
+
+// As a special exception, you may use this file as part of a free software
+// library without restriction. Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General 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_store_hash_fn_imps.hpp
+ * Contains implementations of gp_ht_map_'s debug-mode functions.
+ */
+
+#ifdef PB_ASSOC_GP_HT_MAP_DEBUG_
+
+PB_ASSOC_CLASS_T_DEC
+void
+PB_ASSOC_CLASS_C_DEC::
+assert_entry_array_valid(const entry_array a_entries, store_hash_true_indicator) const
+{
+ size_type iterated_num_used_e = 0;
+
+ for (size_type pos = 0; pos < m_num_e; ++pos)
+ {
+ const_entry_pointer p_e =& a_entries[pos];
+
+ switch(p_e->m_stat)
+ {
+ case EMPTY_ENTRY_STATUS:
+ case ERASED_ENTRY_STATUS:
+ break;
+ case VALID_ENTRY_STATUS:
+ {
+ const_key_reference r_key = p_e->m_value.first;
+
+ my_map_debug_base::check_key_exists(r_key);
+
+ const comp_hash pos_hash_pair =
+ my_ranged_probe_fn_base::operator()(r_key);
+
+ PB_ASSOC_DBG_ASSERT(p_e->m_hash == pos_hash_pair.second);
+
+ ++iterated_num_used_e;
+
+ break;
+ }
+ default:
+ PB_ASSOC_DBG_ASSERT(0);
+ };
+ }
+
+ PB_ASSOC_DBG_ASSERT(iterated_num_used_e == m_num_used_e);
+}
+
+#endif // #ifdef PB_ASSOC_GP_HT_MAP_DEBUG_
diff --git a/libstdc++-v3/include/ext/pb_assoc/detail/gp_ht_map_/erase_fn_imps.hpp b/libstdc++-v3/include/ext/pb_assoc/detail/gp_ht_map_/erase_fn_imps.hpp
new file mode 100644
index 00000000000..1f0e921e0bd
--- /dev/null
+++ b/libstdc++-v3/include/ext/pb_assoc/detail/gp_ht_map_/erase_fn_imps.hpp
@@ -0,0 +1,110 @@
+// -*- C++ -*-
+
+// 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.
+
+// As a special exception, you may use this file as part of a free software
+// library without restriction. Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General 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 erase_fn_imps.hpp
+ * Contains implementations of gp_ht_map_'s erase related functions.
+ */
+
+PB_ASSOC_CLASS_T_DEC
+inline void
+PB_ASSOC_CLASS_C_DEC::
+erase_entry(entry_pointer p_e)
+{
+ PB_ASSOC_DBG_ASSERT(p_e->m_stat = VALID_ENTRY_STATUS);
+
+ PB_ASSOC_DBG_ONLY(my_map_debug_base::erase_existing(p_e->m_value.first);)
+
+ p_e->m_value.~value_type();
+
+ p_e->m_stat = ERASED_ENTRY_STATUS;
+
+ PB_ASSOC_DBG_ASSERT(m_num_used_e > 0);
+ my_resize_base::notify_erased(--m_num_used_e);
+}
+
+PB_ASSOC_CLASS_T_DEC
+void
+PB_ASSOC_CLASS_C_DEC::
+clear()
+{
+ for (size_type pos = 0; pos < m_num_e; ++pos)
+ {
+ entry_pointer p_e =& m_a_entries[pos];
+
+ if (p_e->m_stat == VALID_ENTRY_STATUS)
+ erase_entry(p_e);
+ }
+
+ do_resize_if_needed_no_throw();
+
+ my_resize_base::notify_cleared();
+}
+
+PB_ASSOC_CLASS_T_DEC
+template<class Pred>
+inline typename PB_ASSOC_CLASS_C_DEC::size_type
+PB_ASSOC_CLASS_C_DEC::
+erase_if(Pred pred)
+{
+ PB_ASSOC_DBG_ONLY(PB_ASSOC_CLASS_C_DEC::assert_valid();)
+
+ size_type num_ersd = 0;
+
+ for (size_type pos = 0; pos < m_num_e; ++pos)
+ {
+ entry_pointer p_e =& m_a_entries[pos];
+
+ if (p_e->m_stat == VALID_ENTRY_STATUS&& pred(p_e->m_value))
+ {
+ ++num_ersd;
+
+ erase_entry(p_e);
+ }
+ }
+
+ do_resize_if_needed_no_throw();
+
+ PB_ASSOC_DBG_ONLY(PB_ASSOC_CLASS_C_DEC::assert_valid();)
+
+ return (num_ersd);
+}
+
+#include <ext/pb_assoc/detail/gp_ht_map_/erase_no_store_hash_fn_imps.hpp>
+#include <ext/pb_assoc/detail/gp_ht_map_/erase_store_hash_fn_imps.hpp>
diff --git a/libstdc++-v3/include/ext/pb_assoc/detail/gp_ht_map_/erase_no_store_hash_fn_imps.hpp b/libstdc++-v3/include/ext/pb_assoc/detail/gp_ht_map_/erase_no_store_hash_fn_imps.hpp
new file mode 100644
index 00000000000..5c5e383284f
--- /dev/null
+++ b/libstdc++-v3/include/ext/pb_assoc/detail/gp_ht_map_/erase_no_store_hash_fn_imps.hpp
@@ -0,0 +1,104 @@
+// -*- C++ -*-
+
+// 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.
+
+// As a special exception, you may use this file as part of a free software
+// library without restriction. Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General 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 erase_no_store_hash_fn_imps.hpp
+ * Contains implementations of gp_ht_map_'s erase related functions, when the hash
+ * value is not stored.
+ */
+
+PB_ASSOC_CLASS_T_DEC
+inline typename PB_ASSOC_CLASS_C_DEC::size_type
+PB_ASSOC_CLASS_C_DEC::
+erase(const_key_reference r_key, int_to_type<false>)
+{
+ PB_ASSOC_DBG_ONLY(PB_ASSOC_CLASS_C_DEC::assert_valid();)
+
+ size_type hash = my_ranged_probe_fn_base::operator()(r_key);
+
+ size_type i;
+
+ my_resize_base::notify_erase_search_start();
+
+ for (i = 0; i < m_num_e; ++i)
+ {
+ const size_type pos =
+ my_ranged_probe_fn_base::operator()(r_key, hash, i);
+
+ entry* const p_e = m_a_entries + pos;
+
+ switch(p_e->m_stat)
+ {
+ case EMPTY_ENTRY_STATUS:
+ {
+ my_resize_base::notify_erase_search_end();
+
+ PB_ASSOC_DBG_ONLY(my_map_debug_base::check_key_does_not_exist(
+ r_key));
+
+ return (0);
+ }
+ break;
+ case VALID_ENTRY_STATUS:
+ if (my_hash_eq_fn_base::operator()(
+ PB_ASSOC_V2F(p_e->m_value)))
+ {
+ my_resize_base::notify_erase_search_end();
+
+ erase_entry(p_e);
+
+ do_resize_if_needed_no_throw();
+
+ return (1);
+ }
+ break;
+ case ERASED_ENTRY_STATUS:
+ break;
+ default:
+ PB_ASSOC_DBG_ASSERT(0);
+ };
+
+ my_resize_base::notify_erase_search_collision();
+ }
+
+ my_resize_base::notify_erase_search_end();
+
+ return (0);
+}
+
diff --git a/libstdc++-v3/include/ext/pb_assoc/detail/gp_ht_map_/erase_store_hash_fn_imps.hpp b/libstdc++-v3/include/ext/pb_assoc/detail/gp_ht_map_/erase_store_hash_fn_imps.hpp
new file mode 100644
index 00000000000..b1cd64257bb
--- /dev/null
+++ b/libstdc++-v3/include/ext/pb_assoc/detail/gp_ht_map_/erase_store_hash_fn_imps.hpp
@@ -0,0 +1,109 @@
+// -*- C++ -*-
+
+// 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.
+
+// As a special exception, you may use this file as part of a free software
+// library without restriction. Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General 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 erase_store_hash_fn_imps.hpp
+ * Contains implementations of gp_ht_map_'s erase related functions, when the hash
+ * value is stored.
+ */
+
+PB_ASSOC_CLASS_T_DEC
+inline typename PB_ASSOC_CLASS_C_DEC::size_type
+PB_ASSOC_CLASS_C_DEC::
+erase(const_key_reference r_key, int_to_type<true>)
+{
+ PB_ASSOC_DBG_ONLY(PB_ASSOC_CLASS_C_DEC::assert_valid();)
+
+ PB_ASSOC_DBG_ONLY(assert_valid();)
+
+ return (erase_in_pos_imp(r_key, 0));
+}
+
+PB_ASSOC_CLASS_T_DEC
+inline typename PB_ASSOC_CLASS_C_DEC::size_type
+PB_ASSOC_CLASS_C_DEC::
+erase_in_pos_imp(const_key_reference r_key, const comp_hash& /*r_pos_hash_pair*/)
+{
+ const comp_hash pos_hash_pair =
+ my_ranged_probe_fn_base::operator()(r_key);
+
+ for (size_type i = 0; i < m_num_e; ++i)
+ {
+ const size_type pos = my_ranged_probe_fn_base::operator()(r_key, pos_hash_pair.second, i);
+
+ entry* const p_e = m_a_entries + pos;
+
+ switch(p_e->m_stat)
+ {
+ case EMPTY_ENTRY_STATUS:
+ {
+ my_resize_base::notify_erase_search_end();
+
+ PB_ASSOC_DBG_ONLY(my_map_debug_base::check_key_does_not_exist(
+ r_key));
+
+ return (0);
+ }
+ break;
+ case VALID_ENTRY_STATUS:
+ if (my_hash_eq_fn_base::operator()(p_e->m_value.first, p_e->m_hash, r_key, pos_hash_pair.second))
+ {
+ my_resize_base::notify_erase_search_end();
+
+ erase_entry(p_e);
+
+ do_resize_if_needed_no_throw();
+
+ return (1);
+ }
+ break;
+ case ERASED_ENTRY_STATUS:
+ break;
+ default:
+ PB_ASSOC_DBG_ASSERT(0);
+ };
+
+ my_resize_base::notify_erase_search_collision();
+ }
+
+ my_resize_base::notify_erase_search_end();
+
+ return (0);
+}
+
diff --git a/libstdc++-v3/include/ext/pb_assoc/detail/gp_ht_map_/find_fn_imps.hpp b/libstdc++-v3/include/ext/pb_assoc/detail/gp_ht_map_/find_fn_imps.hpp
new file mode 100644
index 00000000000..b86de2a2781
--- /dev/null
+++ b/libstdc++-v3/include/ext/pb_assoc/detail/gp_ht_map_/find_fn_imps.hpp
@@ -0,0 +1,94 @@
+// -*- C++ -*-
+
+// 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.
+
+// As a special exception, you may use this file as part of a free software
+// library without restriction. Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General 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 find_fn_imps.hpp
+ * Contains implementations of gp_ht_map_'s find related functions.
+ */
+
+PB_ASSOC_CLASS_T_DEC
+inline typename PB_ASSOC_CLASS_C_DEC::find_iterator
+PB_ASSOC_CLASS_C_DEC::
+find(const_key_reference r_key)
+{
+ PB_ASSOC_DBG_ONLY(assert_valid();)
+
+ return ((find_key_pointer(r_key, my_hash_traits_base::s_store_hash_indicator)));
+}
+
+PB_ASSOC_CLASS_T_DEC
+inline typename PB_ASSOC_CLASS_C_DEC::const_find_iterator
+PB_ASSOC_CLASS_C_DEC::
+find(const_key_reference r_key) const
+{
+ PB_ASSOC_DBG_ONLY(assert_valid();)
+
+ return (const_cast<PB_ASSOC_CLASS_C_DEC& >(*this).
+ find_key_pointer(r_key, my_hash_traits_base::s_store_hash_indicator));
+}
+
+PB_ASSOC_CLASS_T_DEC
+inline typename PB_ASSOC_CLASS_C_DEC::find_iterator
+PB_ASSOC_CLASS_C_DEC::
+find_end()
+{
+ return (NULL);
+}
+
+PB_ASSOC_CLASS_T_DEC
+inline typename PB_ASSOC_CLASS_C_DEC::const_find_iterator
+PB_ASSOC_CLASS_C_DEC::
+find_end() const
+{
+ return (NULL);
+}
+
+PB_ASSOC_CLASS_T_DEC
+inline typename PB_ASSOC_CLASS_C_DEC::const_data_reference
+PB_ASSOC_CLASS_C_DEC::
+const_subscript_imp(const_key_reference r_key) const
+{
+ PB_ASSOC_DBG_ONLY(PB_ASSOC_CLASS_C_DEC::assert_valid();)
+
+ return (const_subscript_imp(r_key, my_hash_traits_base::s_store_hash_indicator));
+}
+
+#include <ext/pb_assoc/detail/gp_ht_map_/find_no_store_hash_fn_imps.hpp>
+#include <ext/pb_assoc/detail/gp_ht_map_/find_store_hash_fn_imps.hpp>
+
diff --git a/libstdc++-v3/include/ext/pb_assoc/detail/gp_ht_map_/find_no_store_hash_fn_imps.hpp b/libstdc++-v3/include/ext/pb_assoc/detail/gp_ht_map_/find_no_store_hash_fn_imps.hpp
new file mode 100644
index 00000000000..6f63de9f455
--- /dev/null
+++ b/libstdc++-v3/include/ext/pb_assoc/detail/gp_ht_map_/find_no_store_hash_fn_imps.hpp
@@ -0,0 +1,116 @@
+// -*- C++ -*-
+
+// 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.
+
+// As a special exception, you may use this file as part of a free software
+// library without restriction. Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General 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 find_no_store_hash_fn_imps.hpp
+ * Contains implementations of gp_ht_map_'s find related functions, when the hash
+ * value is not stored.
+ */
+
+PB_ASSOC_CLASS_T_DEC
+inline typename PB_ASSOC_CLASS_C_DEC::const_data_reference
+PB_ASSOC_CLASS_C_DEC::
+const_subscript_imp(const_key_reference r_key, int_to_type<false>) const
+{
+ PB_ASSOC_DBG_ONLY(assert_valid();)
+
+ return (const_cast<PB_ASSOC_CLASS_C_DEC& >(*this).
+ find_key_pointer(r_key, my_traits_base::m_store_hash_indicator)->second);
+}
+
+PB_ASSOC_CLASS_T_DEC
+inline typename PB_ASSOC_CLASS_C_DEC::pointer
+PB_ASSOC_CLASS_C_DEC::find_key_pointer(const_key_reference r_key, int_to_type<false>)
+{
+ const size_type hash = my_ranged_probe_fn_base::operator()(r_key);
+
+ size_type i;
+
+ my_resize_base::notify_find_search_start();
+
+ // Loop until entry is found or until all possible entries accessed.
+
+ for (i = 0; i < m_num_e; ++i)
+ {
+ const size_type pos =
+ my_ranged_probe_fn_base::operator()(r_key, hash, i);
+
+ entry* const p_e = m_a_entries + pos;
+
+ switch(p_e->m_stat)
+ {
+ case EMPTY_ENTRY_STATUS:
+ {
+ my_resize_base::notify_find_search_end();
+
+ PB_ASSOC_DBG_ONLY(my_map_debug_base::
+ check_key_does_not_exist(r_key);)
+
+ return (NULL);
+ }
+ break;
+ case VALID_ENTRY_STATUS:
+ if (my_hash_eq_fn_base::operator()(
+ PB_ASSOC_V2F(p_e->m_value),
+ r_key))
+ {
+ my_resize_base::notify_find_search_end();
+
+ PB_ASSOC_DBG_ONLY(my_map_debug_base::check_key_exists(r_key);)
+
+ return ((pointer)&p_e->m_value);
+ }
+ break;
+ case ERASED_ENTRY_STATUS:
+ break;
+ default:
+ PB_ASSOC_DBG_ASSERT(0);
+ };
+
+ my_resize_base::notify_find_search_collision();
+ }
+
+ PB_ASSOC_DBG_ONLY(my_map_debug_base::
+ check_key_does_not_exist(r_key);)
+
+ my_resize_base::notify_find_search_end();
+
+ return (NULL);
+}
+
diff --git a/libstdc++-v3/include/ext/pb_assoc/detail/gp_ht_map_/find_store_hash_fn_imps.hpp b/libstdc++-v3/include/ext/pb_assoc/detail/gp_ht_map_/find_store_hash_fn_imps.hpp
new file mode 100644
index 00000000000..a4728db88e5
--- /dev/null
+++ b/libstdc++-v3/include/ext/pb_assoc/detail/gp_ht_map_/find_store_hash_fn_imps.hpp
@@ -0,0 +1,118 @@
+// -*- C++ -*-
+
+// 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.
+
+// As a special exception, you may use this file as part of a free software
+// library without restriction. Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General 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 find_store_hash_fn_imps.hpp
+ * Contains implementations of gp_ht_map_'s insert related functions, when the hash
+ * value is stored.
+ */
+
+PB_ASSOC_CLASS_T_DEC
+inline typename PB_ASSOC_CLASS_C_DEC::const_data_reference
+PB_ASSOC_CLASS_C_DEC::
+const_subscript_imp(const_key_reference r_key, int_to_type<true>) const
+{
+ PB_ASSOC_DBG_ONLY(assert_valid();)
+
+ return (const_cast<PB_ASSOC_CLASS_C_DEC& >(*this).find_key_pointer(r_key, my_traits_base::m_store_hash_indicator)->second);
+}
+
+PB_ASSOC_CLASS_T_DEC
+inline typename PB_ASSOC_CLASS_C_DEC::pointer
+PB_ASSOC_CLASS_C_DEC::
+find_key_pointer(const_key_reference r_key, int_to_type<true>)
+{
+ comp_hash pos_hash_pair = my_ranged_probe_fn_base::operator()(r_key);
+
+ size_type i;
+
+ my_resize_base::notify_find_search_start();
+
+ // Loop until entry is found or until all possible entries accessed.
+
+ for (i = 0; i < m_num_e; ++i)
+ {
+ const size_type pos =
+ my_ranged_probe_fn_base::operator()(r_key, pos_hash_pair.second, i);
+
+ entry* const p_e = m_a_entries + pos;
+
+ switch(p_e->m_stat)
+ {
+ case EMPTY_ENTRY_STATUS:
+ {
+ my_resize_base::notify_find_search_end();
+
+ PB_ASSOC_DBG_ONLY(my_map_debug_base::
+ check_key_does_not_exist(r_key);)
+
+ return (NULL);
+ }
+ break;
+ case VALID_ENTRY_STATUS:
+ if (my_hash_eq_fn_base::operator()(
+ PB_ASSOC_V2F(p_e->m_value),
+ p_e->m_hash,
+ r_key,
+ pos_hash_pair.second))
+ {
+ my_resize_base::notify_find_search_end();
+
+ PB_ASSOC_DBG_ONLY(my_map_debug_base::check_key_exists(r_key);)
+
+ return ((pointer)&p_e->m_value);
+ }
+ break;
+ case ERASED_ENTRY_STATUS:
+ break;
+ default:
+ PB_ASSOC_DBG_ASSERT(0);
+ };
+
+ my_resize_base::notify_find_search_collision();
+ }
+
+ PB_ASSOC_DBG_ONLY(my_map_debug_base::
+ check_key_does_not_exist(r_key);)
+
+ my_resize_base::notify_find_search_end();
+
+ return (NULL);
+}
+
diff --git a/libstdc++-v3/include/ext/pb_assoc/detail/gp_ht_map_/gp_ht_map_.hpp b/libstdc++-v3/include/ext/pb_assoc/detail/gp_ht_map_/gp_ht_map_.hpp
new file mode 100644
index 00000000000..9344844b216
--- /dev/null
+++ b/libstdc++-v3/include/ext/pb_assoc/detail/gp_ht_map_/gp_ht_map_.hpp
@@ -0,0 +1,602 @@
+// -*- C++ -*-
+
+// 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.
+
+// As a special exception, you may use this file as part of a free software
+// library without restriction. Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General 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 gp_ht_map_.hpp
+ * Contains an implementation class for gp_ht_map_.
+ */
+
+#include <ext/pb_assoc/detail/cond_dealtor.hpp>
+#include <ext/pb_assoc/trivial_iterator_def.hpp>
+#include <ext/pb_assoc/detail/hash_fn/ranged_probe_fn.hpp>
+#include <ext/pb_assoc/detail/hash_types_traits.hpp>
+#include <ext/pb_assoc/detail/types_traits.hpp>
+#include <ext/pb_assoc/exception.hpp>
+#include <ext/pb_assoc/detail/map_debug_base.hpp>
+#include <ext/pb_assoc/detail/eq_fn/hash_eq_fn.hpp>
+#ifdef PB_ASSOC_BASIC_REGRESSION
+#include <pb_assoc/testsuite/regression/basic_test/throw_prob_adjustor.hpp>
+#endif // #ifdef PB_ASSOC_BASIC_REGRESSION
+#include <utility>
+
+namespace pb_assoc
+{
+
+ namespace detail
+ {
+
+#ifdef PB_ASSOC_GP_HT_MAP_DEBUG_
+#define PB_ASSOC_DBG_ASSERT(X) assert(X)
+#define PB_ASSOC_DBG_VERIFY(X) assert(X)
+#define PB_ASSOC_DBG_ONLY(X) X
+#else // #ifdef PB_ASSOC_GP_HT_MAP_DEBUG_
+#define PB_ASSOC_DBG_ASSERT(X)
+#define PB_ASSOC_DBG_VERIFY(X) {if((X)==0);}
+#define PB_ASSOC_DBG_ONLY(X) ;
+#endif // #ifdef PB_ASSOC_GP_HT_MAP_DEBUG_
+
+#define PB_ASSOC_CLASS_T_DEC \
+ template< \
+ typename Key, \
+ typename Data, \
+ class Hash_Fn, \
+ class Eq_Fn, \
+ class Allocator, \
+ bool Store_Hash, \
+ class Comb_Probe_Fn, \
+ class Probe_Fn, \
+ class Resize_Policy>
+
+#ifdef PB_ASSOC_DATA_TRUE_INDICATOR
+#define PB_ASSOC_CLASS_NAME \
+ gp_ht_map_data_
+#endif // #ifdef PB_ASSOC_DATA_TRUE_INDICATOR
+
+#ifdef PB_ASSOC_DATA_FALSE_INDICATOR
+#define PB_ASSOC_CLASS_NAME \
+ gp_ht_map_no_data_
+#endif // #ifdef PB_ASSOC_DATA_FALSE_INDICATOR
+
+#define PB_ASSOC_CLASS_C_DEC \
+ PB_ASSOC_CLASS_NAME< \
+ Key, \
+ Data, \
+ Hash_Fn, \
+ Eq_Fn, \
+ Allocator, \
+ Store_Hash, \
+ Comb_Probe_Fn, \
+ Probe_Fn, \
+ Resize_Policy>
+
+#define PB_ASSOC_HASH_EQ_FN_C_DEC \
+ pb_assoc::detail::hash_eq_fn< \
+ Key, \
+ Eq_Fn, \
+ Allocator, \
+ Store_Hash>
+
+#define PB_ASSOC_RANGED_PROBE_FN_C_DEC \
+ pb_assoc::detail::ranged_probe_fn< \
+ Key, \
+ Hash_Fn, \
+ Allocator, \
+ Comb_Probe_Fn, \
+ Probe_Fn, \
+ Store_Hash>
+
+#define PB_ASSOC_TYPES_TRAITS_C_DEC \
+ types_traits< \
+ Key, \
+ Data, \
+ Allocator>
+
+#define PB_ASSOC_HASH_TYPES_TRAITS_C_DEC \
+ hash_types_traits< \
+ typename Allocator::size_type, \
+ Store_Hash>
+
+#ifdef PB_ASSOC_USE_MAP_DEBUG_BASE
+#define PB_ASSOC_MAP_DEBUG_BASE_C_DEC \
+ pb_assoc::detail::map_debug_base< \
+ Key, \
+ Eq_Fn>
+#endif // #ifdef PB_ASSOC_USE_MAP_DEBUG_BASE
+
+#ifdef PB_ASSOC_DATA_TRUE_INDICATOR
+#define PB_ASSOC_V2F(X) (X).first
+#define PB_ASSOC_V2S(X) (X).second
+#endif // #ifdef PB_ASSOC_DATA_TRUE_INDICATOR
+
+#ifdef PB_ASSOC_DATA_FALSE_INDICATOR
+#define PB_ASSOC_V2F(X) (X)
+#define PB_ASSOC_V2S(X) Mapped_Data()
+#endif // #ifdef PB_ASSOC_DATA_FALSE_INDICATOR
+
+#define PB_ASSOC_STATIC_ASSERT(UNIQUE, E) \
+ typedef \
+ pb_assoc::detail::static_assert_dummy_class< \
+ sizeof(pb_assoc::detail::static_assert<(bool)(E)>)> \
+ UNIQUE##static_assert_type
+
+ template<typename Key,
+ typename Data,
+ class Hash_Fn,
+ class Eq_Fn,
+ class Allocator,
+ bool Store_Hash,
+ class Comb_Probe_Fn,
+ class Probe_Fn,
+ class Resize_Policy>
+ class PB_ASSOC_CLASS_NAME :
+#ifdef PB_ASSOC_GP_HT_MAP_DEBUG_
+ protected PB_ASSOC_MAP_DEBUG_BASE_C_DEC,
+#endif // #ifdef PB_ASSOC_GP_HT_MAP_DEBUG_
+ public PB_ASSOC_HASH_EQ_FN_C_DEC,
+ public Resize_Policy,
+ public PB_ASSOC_RANGED_PROBE_FN_C_DEC,
+ public PB_ASSOC_TYPES_TRAITS_C_DEC,
+ public PB_ASSOC_HASH_TYPES_TRAITS_C_DEC
+ {
+
+ public:
+
+ typedef typename Allocator::size_type size_type;
+
+ typedef
+ typename PB_ASSOC_TYPES_TRAITS_C_DEC::const_key_reference
+ const_key_reference;
+
+ typedef typename PB_ASSOC_TYPES_TRAITS_C_DEC::data_type data_type;
+
+ typedef
+ typename PB_ASSOC_TYPES_TRAITS_C_DEC::data_reference
+ data_reference;
+
+ typedef
+ typename PB_ASSOC_TYPES_TRAITS_C_DEC::const_data_reference
+ const_data_reference;
+
+ typedef typename PB_ASSOC_TYPES_TRAITS_C_DEC::value_type value_type;
+
+ typedef typename PB_ASSOC_TYPES_TRAITS_C_DEC::pointer pointer;
+
+ typedef
+ typename PB_ASSOC_TYPES_TRAITS_C_DEC::const_pointer
+ const_pointer;
+
+ typedef typename PB_ASSOC_TYPES_TRAITS_C_DEC::reference reference;
+
+ typedef
+ typename PB_ASSOC_TYPES_TRAITS_C_DEC::const_reference
+ const_reference;
+
+ protected:
+
+ typedef typename PB_ASSOC_HASH_TYPES_TRAITS_C_DEC::comp_hash comp_hash;
+
+ enum ENTRY_STATUS
+ {
+ EMPTY_ENTRY_STATUS,
+ VALID_ENTRY_STATUS,
+ ERASED_ENTRY_STATUS
+ };
+
+ typedef char entry_status;
+
+ struct store_hash_entry
+ {
+ value_type m_value;
+
+ entry_status m_stat;
+
+ size_type m_hash;
+ };
+
+ struct no_store_hash_entry
+ {
+ value_type m_value;
+
+ entry_status m_stat;
+ };
+
+ typedef
+ typename cond_type<
+ Store_Hash,
+ store_hash_entry,
+ no_store_hash_entry>::type
+ entry;
+
+ typedef
+ typename Allocator::template rebind<entry>::other
+ entry_allocator;
+
+ typedef typename entry_allocator::pointer entry_pointer;
+
+ typedef typename entry_allocator::const_pointer const_entry_pointer;
+
+ typedef typename entry_allocator::reference entry_reference;
+
+ typedef
+ typename entry_allocator::const_reference
+ const_entry_reference;
+
+ typedef typename entry_allocator::pointer entry_array;
+
+ typedef value_type mapped_value_type;
+
+ typedef pointer mapped_pointer;
+
+ typedef const_pointer const_mapped_pointer;
+
+ typedef reference mapped_reference;
+
+ typedef const_reference const_mapped_reference;
+
+#define PB_ASSOC_GEN_POS size_type
+
+#include <ext/pb_assoc/detail/unordered_iterator/const_find_iterator.hpp>
+#include <ext/pb_assoc/detail/unordered_iterator/find_iterator.hpp>
+#include <ext/pb_assoc/detail/unordered_iterator/const_iterator.hpp>
+#include <ext/pb_assoc/detail/unordered_iterator/iterator.hpp>
+
+#undef PB_ASSOC_GEN_POS
+
+ typedef find_iterator_ find_iterator;
+
+ typedef const_find_iterator_ const_find_iterator;
+
+ typedef iterator_ iterator;
+
+ typedef const_iterator_ const_iterator;
+
+ typedef Hash_Fn hash_fn;
+
+ typedef Eq_Fn eq_fn;
+
+ typedef Allocator allocator;
+
+ typedef Probe_Fn probe_fn;
+
+ typedef Comb_Probe_Fn comb_hash_fn;
+
+ typedef Resize_Policy resize_policy;
+
+ protected:
+
+ PB_ASSOC_CLASS_NAME();
+
+ PB_ASSOC_CLASS_NAME(const PB_ASSOC_CLASS_C_DEC& r_other);
+
+ PB_ASSOC_CLASS_NAME(const Hash_Fn& r_hash_fn);
+
+ PB_ASSOC_CLASS_NAME(const Hash_Fn& r_hash_fn, const Eq_Fn& r_eq_fn);
+
+ PB_ASSOC_CLASS_NAME(const Hash_Fn& r_hash_fn, const Eq_Fn& r_eq_fn, const Comb_Probe_Fn& r_comb_probe_fn);
+
+ PB_ASSOC_CLASS_NAME(const Hash_Fn& r_hash_fn, const Eq_Fn& r_eq_fn, const Comb_Probe_Fn& r_comb_probe_fn, const Probe_Fn& r_probe_fn);
+
+ PB_ASSOC_CLASS_NAME(const Hash_Fn& r_hash_fn, const Eq_Fn& r_eq_fn, const Comb_Probe_Fn& r_comb_probe_fn, const Probe_Fn& r_probe_fn, const Resize_Policy& r_resize_policy);
+
+ template<class It>
+ void
+ copy_from_range(It first_it, It last_it);
+
+ virtual
+ ~PB_ASSOC_CLASS_NAME();
+
+ void
+ swap(PB_ASSOC_CLASS_C_DEC& r_other);
+
+ inline size_type
+ size() const;
+
+ inline size_type
+ max_size() const;
+
+ inline bool
+ empty() const;
+
+ Hash_Fn&
+ get_hash_fn();
+
+ const Hash_Fn&
+ get_hash_fn() const;
+
+ Eq_Fn&
+ get_eq_fn();
+
+ const Eq_Fn&
+ get_eq_fn() const;
+
+ Probe_Fn&
+ get_probe_fn();
+
+ const Probe_Fn&
+ get_probe_fn() const;
+
+ Comb_Probe_Fn&
+ get_comb_probe_fn();
+
+ const Comb_Probe_Fn&
+ get_comb_probe_fn() const;
+
+ Resize_Policy&
+ get_resize_policy();
+
+ const Resize_Policy&
+ get_resize_policy() const;
+
+ inline std::pair<find_iterator, bool>
+ insert(const_reference r_val);
+
+ inline data_reference
+ subscript_imp(const_key_reference r_key);
+
+ inline find_iterator
+ find(const_key_reference r_key);
+
+ inline const_find_iterator
+ find(const_key_reference r_key) const;
+
+ inline find_iterator
+ find_end();
+
+ inline const_find_iterator
+ find_end() const;
+
+ inline size_type
+ erase(const_key_reference r_key, int_to_type<false>);
+
+ inline size_type
+ erase(const_key_reference r_key, int_to_type<true>);
+
+ template<class Pred>
+ inline size_type
+ erase_if(Pred prd);
+
+ void
+ clear();
+
+ inline iterator
+ begin();
+
+ inline const_iterator
+ begin() const;
+
+ inline iterator
+ end();
+
+ inline const_iterator
+ end() const;
+
+#ifdef PB_ASSOC_CC_HT_MAP_DEBUG
+
+ virtual void
+ assert_valid() const;
+
+#endif // #ifdef PB_ASSOC_GP_HT_MAP_DEBUG_
+
+ virtual void
+ do_resize(size_type new_size);
+
+ private:
+
+ typedef PB_ASSOC_TYPES_TRAITS_C_DEC my_traits_base;
+
+ typedef PB_ASSOC_HASH_TYPES_TRAITS_C_DEC my_hash_traits_base;
+
+ typedef PB_ASSOC_RANGED_PROBE_FN_C_DEC my_ranged_probe_fn_base;
+
+#ifdef PB_ASSOC_GP_HT_MAP_DEBUG_
+ typedef PB_ASSOC_MAP_DEBUG_BASE_C_DEC my_map_debug_base;
+#endif // #ifdef PB_ASSOC_GP_HT_MAP_DEBUG_
+
+ typedef PB_ASSOC_HASH_EQ_FN_C_DEC my_hash_eq_fn_base;
+
+ typedef Resize_Policy my_resize_base;
+
+ friend class iterator_;
+
+ friend class const_iterator_;
+
+ private:
+
+ void
+ deallocate_all();
+
+ void
+ initialize();
+
+ inline void
+ constructor_insert_new_imp(const_reference r_val, size_type pos, int_to_type<true>);
+
+ inline void
+ constructor_insert_new_imp(const_reference r_val, size_type pos, int_to_type<false>);
+
+ void
+ erase_all_valid_entries(entry_array a_entries_resized, size_type size);
+
+ inline bool
+ do_resize_if_needed();
+
+ inline void
+ do_resize_if_needed_no_throw();
+
+ void
+ resize_imp(entry_array a_entries_resized, size_type old_size);
+
+ inline void
+ resize_imp_reassign(entry_pointer p_e, entry_array a_entries_resized, int_to_type<false>);
+
+ inline void
+ resize_imp_reassign(entry_pointer p_e, entry_array a_entries_resized, int_to_type<true>);
+
+ inline size_type
+ find_ins_pos(const_key_reference r_key, int_to_type<false>);
+
+ inline comp_hash
+ find_ins_pos(const_key_reference r_key, int_to_type<true>);
+
+ inline std::pair<find_iterator, bool>
+ insert_imp(const_reference r_val, int_to_type<false>);
+
+ inline std::pair<find_iterator, bool>
+ insert_imp(const_reference r_val, int_to_type<true>);
+
+ inline pointer
+ insert_new_imp(const_reference r_val, size_type pos);
+
+ inline pointer
+ insert_new_imp(const_reference r_val, comp_hash& r_pos_hash_pair);
+
+ inline data_reference
+ subscript_imp(const_key_reference r_key, int_to_type<false>);
+
+ inline data_reference
+ subscript_imp(const_key_reference r_key, int_to_type<true>);
+
+ inline const_data_reference
+ const_subscript_imp(const_key_reference r_key) const;
+
+ inline pointer
+ find_key_pointer(const_key_reference r_key, int_to_type<false>);
+
+ inline pointer
+ find_key_pointer(const_key_reference r_key, int_to_type<true>);
+
+ inline const_data_reference
+ const_subscript_imp(const_key_reference r_key, int_to_type<false>) const;
+
+ inline const_data_reference
+ const_subscript_imp(const_key_reference r_key, int_to_type<true>) const;
+
+ inline size_type
+ erase_in_pos_imp(const_key_reference r_key, const comp_hash& r_pos_hash_pair);
+
+ inline void
+ erase_entry(entry_pointer p_e);
+
+#ifdef PB_ASSOC_DATA_TRUE_INDICATOR
+ void
+ inc_it_state(pointer& r_p_value, size_type& r_pos) const;
+#endif // #ifdef PB_ASSOC_DATA_TRUE_INDICATOR
+
+ void
+ inc_it_state(const_pointer& r_p_value, size_type& r_pos) const;
+
+ void
+ get_start_it_state(const_pointer& r_p_value, size_type& r_pos) const;
+
+ void
+ get_start_it_state(pointer& r_p_value, size_type& r_pos);
+
+#ifdef PB_ASSOC_CC_HT_MAP_DEBUG
+
+ void
+ assert_entry_array_valid(const entry_array a_entries, int_to_type<false>) const;
+
+ void
+ assert_entry_array_valid(const entry_array a_entries, int_to_type<true>) const;
+
+#endif // #ifdef PB_ASSOC_GP_HT_MAP_DEBUG_
+
+ private:
+ static entry_allocator s_entry_allocator;
+
+ entry_pointer m_a_entries;
+
+ size_type m_num_e;
+
+ size_type m_num_used_e;
+
+ static iterator s_end_it;
+
+ static const_iterator s_const_end_it;
+
+ enum
+ {
+ store_hash_ok =
+ !Store_Hash ||
+ !pb_assoc::detail::is_same_type<
+ Hash_Fn,
+ pb_assoc::null_hash_fn>::value
+ };
+
+ PB_ASSOC_STATIC_ASSERT(sth, store_hash_ok);
+ };
+
+#include <ext/pb_assoc/detail/gp_ht_map_/constructor_destructor_fn_imps.hpp>
+#include <ext/pb_assoc/detail/gp_ht_map_/find_fn_imps.hpp>
+#include <ext/pb_assoc/detail/gp_ht_map_/resize_fn_imps.hpp>
+#include <ext/pb_assoc/detail/gp_ht_map_/debug_fn_imps.hpp>
+#include <ext/pb_assoc/detail/gp_ht_map_/info_fn_imps.hpp>
+#include <ext/pb_assoc/detail/gp_ht_map_/policy_access_fn_imps.hpp>
+#include <ext/pb_assoc/detail/gp_ht_map_/erase_fn_imps.hpp>
+#include <ext/pb_assoc/detail/gp_ht_map_/iterator_fn_imps.hpp>
+#include <ext/pb_assoc/detail/gp_ht_map_/insert_fn_imps.hpp>
+
+#undef PB_ASSOC_CLASS_T_DEC
+
+#undef PB_ASSOC_CLASS_C_DEC
+
+#undef PB_ASSOC_HASH_EQ_FN_C_DEC
+
+#undef PB_ASSOC_RANGED_PROBE_FN_C_DEC
+
+#undef PB_ASSOC_TYPES_TRAITS_C_DEC
+
+#undef PB_ASSOC_HASH_TYPES_TRAITS_C_DEC
+
+#undef PB_ASSOC_MAP_DEBUG_BASE_C_DEC
+
+#undef PB_ASSOC_CLASS_NAME
+
+#undef PB_ASSOC_V2F
+#undef PB_ASSOC_V2S
+
+#undef PB_ASSOC_DBG_ASSERT
+#undef PB_ASSOC_DBG_VERIFY
+#undef PB_ASSOC_DBG_ONLY
+
+#undef PB_ASSOC_STATIC_ASSERT
+
+ } // namespace detail
+
+} // namespace pb_assoc
diff --git a/libstdc++-v3/include/ext/pb_assoc/detail/gp_ht_map_/info_fn_imps.hpp b/libstdc++-v3/include/ext/pb_assoc/detail/gp_ht_map_/info_fn_imps.hpp
new file mode 100644
index 00000000000..9969d95eaaa
--- /dev/null
+++ b/libstdc++-v3/include/ext/pb_assoc/detail/gp_ht_map_/info_fn_imps.hpp
@@ -0,0 +1,68 @@
+// -*- C++ -*-
+
+// 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.
+
+// As a special exception, you may use this file as part of a free software
+// library without restriction. Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General 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 info_fn_imps.hpp
+ * Contains implementations of gp_ht_map_'s entire container info related
+ * functions.
+ */
+
+PB_ASSOC_CLASS_T_DEC
+inline typename PB_ASSOC_CLASS_C_DEC::size_type
+PB_ASSOC_CLASS_C_DEC::
+size() const
+{
+ return (m_num_used_e);
+}
+
+PB_ASSOC_CLASS_T_DEC
+inline typename PB_ASSOC_CLASS_C_DEC::size_type
+PB_ASSOC_CLASS_C_DEC::
+max_size() const
+{
+ return (s_entry_allocator.max_size());
+}
+
+PB_ASSOC_CLASS_T_DEC
+inline bool
+PB_ASSOC_CLASS_C_DEC::
+empty() const
+{
+ return (size() == 0);
+}
diff --git a/libstdc++-v3/include/ext/pb_assoc/detail/gp_ht_map_/insert_fn_imps.hpp b/libstdc++-v3/include/ext/pb_assoc/detail/gp_ht_map_/insert_fn_imps.hpp
new file mode 100644
index 00000000000..3e45b170519
--- /dev/null
+++ b/libstdc++-v3/include/ext/pb_assoc/detail/gp_ht_map_/insert_fn_imps.hpp
@@ -0,0 +1,67 @@
+// -*- C++ -*-
+
+// 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.
+
+// As a special exception, you may use this file as part of a free software
+// library without restriction. Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General 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 insert_fn_imps.hpp
+ * Contains implementations of gp_ht_map_'s insert related functions.
+ */
+
+PB_ASSOC_CLASS_T_DEC
+inline std::pair<typename PB_ASSOC_CLASS_C_DEC::find_iterator, bool>
+PB_ASSOC_CLASS_C_DEC::
+insert(const_mapped_reference r_val)
+{
+ PB_ASSOC_DBG_ONLY(PB_ASSOC_CLASS_C_DEC::assert_valid();)
+
+ return (insert_imp(r_val, my_hash_traits_base::s_store_hash_indicator));
+}
+
+PB_ASSOC_CLASS_T_DEC
+inline typename PB_ASSOC_CLASS_C_DEC::data_reference
+PB_ASSOC_CLASS_C_DEC::
+subscript_imp(const_key_reference r_key)
+{
+ PB_ASSOC_DBG_ONLY(PB_ASSOC_CLASS_C_DEC::assert_valid();)
+
+ return (subscript_imp(r_key, my_hash_traits_base::s_store_hash_indicator));
+}
+
+#include <ext/pb_assoc/detail/gp_ht_map_/insert_no_store_hash_fn_imps.hpp>
+#include <ext/pb_assoc/detail/gp_ht_map_/insert_store_hash_fn_imps.hpp>
+
diff --git a/libstdc++-v3/include/ext/pb_assoc/detail/gp_ht_map_/insert_no_store_hash_fn_imps.hpp b/libstdc++-v3/include/ext/pb_assoc/detail/gp_ht_map_/insert_no_store_hash_fn_imps.hpp
new file mode 100644
index 00000000000..b83d3cb2d16
--- /dev/null
+++ b/libstdc++-v3/include/ext/pb_assoc/detail/gp_ht_map_/insert_no_store_hash_fn_imps.hpp
@@ -0,0 +1,184 @@
+// -*- C++ -*-
+
+// 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.
+
+// As a special exception, you may use this file as part of a free software
+// library without restriction. Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General 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 insert_no_store_hash_fn_imps.hpp
+ * Contains implementations of gp_ht_map_'s insert related functions, when the hash
+ * value is not stored.
+ */
+
+PB_ASSOC_CLASS_T_DEC
+inline typename PB_ASSOC_CLASS_C_DEC::size_type
+PB_ASSOC_CLASS_C_DEC::
+find_ins_pos(const_key_reference r_key, int_to_type<false>)
+{
+ size_type hash = my_ranged_probe_fn_base::operator()(r_key);
+
+ size_type i;
+
+ /* The insertion position is initted to a non-legal value to indicate
+ * that it has not been initted yet.
+ */
+ size_type ins_pos = m_num_e;
+
+ my_resize_base::notify_insert_search_start();
+
+ for (i = 0; i < m_num_e; ++i)
+ {
+ const size_type pos =
+ my_ranged_probe_fn_base::operator()(r_key, hash, i);
+
+ entry* const p_e = m_a_entries + pos;
+
+ switch(p_e->m_stat)
+ {
+ case EMPTY_ENTRY_STATUS:
+ {
+ my_resize_base::notify_insert_search_end();
+
+ PB_ASSOC_DBG_ONLY(
+ my_map_debug_base::check_key_does_not_exist(r_key);)
+
+ return ((ins_pos == m_num_e)? pos : ins_pos);
+ }
+ break;
+ case ERASED_ENTRY_STATUS:
+ if (ins_pos == m_num_e)
+ ins_pos = pos;
+ break;
+ case VALID_ENTRY_STATUS:
+ if (my_hash_eq_fn_base::operator()(
+ PB_ASSOC_V2F(p_e->m_value), r_key))
+ {
+ my_resize_base::notify_insert_search_end();
+
+ PB_ASSOC_DBG_ONLY(my_map_debug_base::check_key_exists(r_key);)
+
+ return (pos);
+ }
+ break;
+ default:
+ PB_ASSOC_DBG_ASSERT(0);
+ };
+
+ my_resize_base::notify_insert_search_collision();
+ }
+
+ my_resize_base::notify_insert_search_end();
+
+ if (ins_pos == m_num_e)
+ throw cannot_insert();
+
+ return (ins_pos);
+}
+
+PB_ASSOC_CLASS_T_DEC
+inline typename PB_ASSOC_CLASS_C_DEC::data_reference
+PB_ASSOC_CLASS_C_DEC::
+subscript_imp(const_key_reference r_key, int_to_type<false>)
+{
+ PB_ASSOC_DBG_ONLY(assert_valid();)
+
+ const size_type pos =
+ find_ins_pos(r_key, my_hash_traits_base::s_store_hash_indicator);
+
+ entry_pointer p_e =& m_a_entries[pos];
+
+ if (p_e->m_stat != VALID_ENTRY_STATUS)
+ return (insert_new_imp(
+ value_type(r_key, Data()), pos)->second);
+
+ PB_ASSOC_DBG_ONLY(my_map_debug_base::check_key_exists(r_key);)
+
+ return (p_e->m_value.second);
+}
+
+PB_ASSOC_CLASS_T_DEC
+inline std::pair<typename PB_ASSOC_CLASS_C_DEC::find_iterator, bool>
+PB_ASSOC_CLASS_C_DEC::
+insert_imp(const_reference r_val, int_to_type<false>)
+{
+ const_key_reference r_key = PB_ASSOC_V2F(r_val);
+
+ const size_type pos =
+ find_ins_pos(r_key, my_hash_traits_base::s_store_hash_indicator);
+
+ if (m_a_entries[pos].m_stat == VALID_ENTRY_STATUS)
+ {
+ PB_ASSOC_DBG_ONLY(my_map_debug_base::check_key_exists(r_key);)
+
+ return (std::make_pair(&m_a_entries[pos].m_value, false));
+ }
+
+ PB_ASSOC_DBG_ONLY(my_map_debug_base::check_key_does_not_exist(r_key));
+
+ return (std::make_pair(
+ insert_new_imp(r_val, pos),
+ true));
+}
+
+PB_ASSOC_CLASS_T_DEC
+inline typename PB_ASSOC_CLASS_C_DEC::pointer
+PB_ASSOC_CLASS_C_DEC::
+insert_new_imp(const_reference r_val, size_type pos)
+{
+ PB_ASSOC_DBG_ASSERT(m_a_entries[pos].m_stat != VALID_ENTRY_STATUS);
+
+ if (do_resize_if_needed())
+ pos = find_ins_pos(PB_ASSOC_V2F(r_val),
+ my_hash_traits_base::s_store_hash_indicator);
+
+ PB_ASSOC_DBG_ASSERT(m_a_entries[pos].m_stat != VALID_ENTRY_STATUS);
+
+ entry* const p_e = m_a_entries + pos;
+
+ new (&p_e->m_value) value_type(r_val);
+
+ p_e->m_stat = VALID_ENTRY_STATUS;
+
+ my_resize_base::notify_inserted(++m_num_used_e);
+
+ PB_ASSOC_DBG_ONLY(my_map_debug_base::
+ insert_new(p_e->m_value.first);)
+
+ PB_ASSOC_DBG_ONLY(assert_valid();)
+
+ return (static_cast<pointer>(&p_e->m_value));
+}
+
diff --git a/libstdc++-v3/include/ext/pb_assoc/detail/gp_ht_map_/insert_store_hash_fn_imps.hpp b/libstdc++-v3/include/ext/pb_assoc/detail/gp_ht_map_/insert_store_hash_fn_imps.hpp
new file mode 100644
index 00000000000..5584e4fed7b
--- /dev/null
+++ b/libstdc++-v3/include/ext/pb_assoc/detail/gp_ht_map_/insert_store_hash_fn_imps.hpp
@@ -0,0 +1,195 @@
+// -*- C++ -*-
+
+// 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.
+
+// As a special exception, you may use this file as part of a free software
+// library without restriction. Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General 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 insert_store_hash_fn_imps.hpp
+ * Contains implementations of gp_ht_map_'s find related functions, when the hash
+ * value is stored.
+ */
+
+PB_ASSOC_CLASS_T_DEC
+inline typename PB_ASSOC_CLASS_C_DEC::comp_hash
+PB_ASSOC_CLASS_C_DEC::
+find_ins_pos(const_key_reference r_key, int_to_type<true>)
+{
+ PB_ASSOC_DBG_ONLY(PB_ASSOC_CLASS_C_DEC::assert_valid();)
+
+ comp_hash pos_hash_pair = my_ranged_probe_fn_base::operator()(r_key);
+
+ size_type i;
+
+ /* The insertion position is initted to a non-legal value to indicate
+ * that it has not been initted yet.
+ */
+ size_type ins_pos = m_num_e;
+
+ my_resize_base::notify_insert_search_start();
+
+ for (i = 0; i < m_num_e; ++i)
+ {
+ const size_type pos =
+ my_ranged_probe_fn_base::operator()(r_key, pos_hash_pair.second, i);
+
+ entry* const p_e = m_a_entries + pos;
+
+ switch(p_e->m_stat)
+ {
+ case EMPTY_ENTRY_STATUS:
+ {
+ my_resize_base::notify_insert_search_end();
+
+ PB_ASSOC_DBG_ONLY(
+ my_map_debug_base::check_key_does_not_exist(r_key);)
+
+ return ((ins_pos == m_num_e)?
+ std::make_pair(pos, pos_hash_pair.second) :
+ std::make_pair(ins_pos, pos_hash_pair.second));
+ }
+ break;
+ case ERASED_ENTRY_STATUS:
+ if (ins_pos == m_num_e)
+ ins_pos = pos;
+ break;
+ case VALID_ENTRY_STATUS:
+ if (my_hash_eq_fn_base::operator()(
+ PB_ASSOC_V2F(p_e->m_value),
+ p_e->m_hash,
+ r_key,
+ pos_hash_pair.second))
+ {
+ my_resize_base::notify_insert_search_end();
+
+ PB_ASSOC_DBG_ONLY(my_map_debug_base::check_key_exists(r_key);)
+
+ return (std::make_pair(pos, pos_hash_pair.second));
+ }
+ break;
+ default:
+ PB_ASSOC_DBG_ASSERT(0);
+ };
+
+ my_resize_base::notify_insert_search_collision();
+ }
+
+ my_resize_base::notify_insert_search_end();
+
+ if (ins_pos == m_num_e)
+ throw cannot_insert();
+
+ return (std::make_pair(ins_pos, pos_hash_pair.second));
+}
+
+PB_ASSOC_CLASS_T_DEC
+inline typename PB_ASSOC_CLASS_C_DEC::data_reference
+PB_ASSOC_CLASS_C_DEC::
+subscript_imp(const_key_reference r_key, int_to_type<true>)
+{
+ PB_ASSOC_DBG_ONLY(assert_valid();)
+
+ comp_hash pos_hash_pair =
+ find_ins_pos(r_key, my_hash_traits_base::s_store_hash_indicator);
+
+ if (m_a_entries[pos_hash_pair.first].m_stat != VALID_ENTRY_STATUS)
+ return (insert_new_imp(
+ value_type(r_key, Data()), pos_hash_pair)->second);
+
+ PB_ASSOC_DBG_ONLY(my_map_debug_base::check_key_exists(r_key));
+
+ return ((m_a_entries + pos_hash_pair.first)->m_value.second);
+}
+
+PB_ASSOC_CLASS_T_DEC
+inline std::pair<typename PB_ASSOC_CLASS_C_DEC::find_iterator, bool>
+PB_ASSOC_CLASS_C_DEC::
+insert_imp(const_reference r_val, int_to_type<true>)
+{
+ const_key_reference r_key = PB_ASSOC_V2F(r_val);
+
+ comp_hash pos_hash_pair =
+ find_ins_pos(r_key, my_hash_traits_base::s_store_hash_indicator);
+
+ entry_pointer p_e =& m_a_entries[pos_hash_pair.first];
+
+ if (p_e->m_stat == VALID_ENTRY_STATUS)
+ {
+ PB_ASSOC_DBG_ONLY(my_map_debug_base::check_key_exists(r_key));
+
+ return (std::make_pair(&p_e->m_value, false));
+ }
+
+ PB_ASSOC_DBG_ONLY(my_map_debug_base::check_key_does_not_exist(r_key));
+
+ return (std::make_pair(
+ insert_new_imp(r_val, pos_hash_pair),
+ true));
+}
+
+PB_ASSOC_CLASS_T_DEC
+inline typename PB_ASSOC_CLASS_C_DEC::pointer
+PB_ASSOC_CLASS_C_DEC::
+insert_new_imp(const_reference r_val, comp_hash& r_pos_hash_pair)
+{
+ PB_ASSOC_DBG_ASSERT(m_a_entries[r_pos_hash_pair.first].m_stat !=
+ VALID_ENTRY_STATUS);
+
+ if (do_resize_if_needed())
+ r_pos_hash_pair = find_ins_pos(
+ PB_ASSOC_V2F(r_val),
+ my_hash_traits_base::s_store_hash_indicator);
+
+ PB_ASSOC_DBG_ASSERT(m_a_entries[r_pos_hash_pair.first].m_stat !=
+ VALID_ENTRY_STATUS);
+
+ entry* const p_e = m_a_entries + r_pos_hash_pair.first;
+
+ new (&p_e->m_value) value_type(r_val);
+
+ p_e->m_hash = r_pos_hash_pair.second;
+
+ p_e->m_stat = VALID_ENTRY_STATUS;
+
+ my_resize_base::notify_inserted(++m_num_used_e);
+
+ PB_ASSOC_DBG_ONLY(my_map_debug_base::insert_new(p_e->m_value.first);)
+
+ PB_ASSOC_DBG_ONLY(assert_valid();)
+
+ return (static_cast<pointer>(&p_e->m_value));
+}
+
diff --git a/libstdc++-v3/include/ext/pb_assoc/detail/gp_ht_map_/iterator_fn_imps.hpp b/libstdc++-v3/include/ext/pb_assoc/detail/gp_ht_map_/iterator_fn_imps.hpp
new file mode 100644
index 00000000000..8977b823ea3
--- /dev/null
+++ b/libstdc++-v3/include/ext/pb_assoc/detail/gp_ht_map_/iterator_fn_imps.hpp
@@ -0,0 +1,181 @@
+// -*- C++ -*-
+
+// 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.
+
+// As a special exception, you may use this file as part of a free software
+// library without restriction. Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General 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 iterator_fn_imps.hpp
+ * Contains implementations of gp_ht_map_'s iterators related functions, e.g.,
+ * begin().
+ */
+
+PB_ASSOC_CLASS_T_DEC
+typename PB_ASSOC_CLASS_C_DEC::iterator
+PB_ASSOC_CLASS_C_DEC::s_end_it;
+
+PB_ASSOC_CLASS_T_DEC
+typename PB_ASSOC_CLASS_C_DEC::const_iterator
+PB_ASSOC_CLASS_C_DEC::s_const_end_it;
+
+PB_ASSOC_CLASS_T_DEC
+inline typename PB_ASSOC_CLASS_C_DEC::iterator
+PB_ASSOC_CLASS_C_DEC::
+begin()
+{
+ pointer p_value;
+ size_type pos;
+
+ get_start_it_state(p_value, pos);
+
+ return (iterator(p_value, pos, this));
+}
+
+PB_ASSOC_CLASS_T_DEC
+inline typename PB_ASSOC_CLASS_C_DEC::iterator
+PB_ASSOC_CLASS_C_DEC::
+end()
+{
+ return (s_end_it);
+}
+
+PB_ASSOC_CLASS_T_DEC
+inline typename PB_ASSOC_CLASS_C_DEC::const_iterator
+PB_ASSOC_CLASS_C_DEC::
+begin() const
+{
+ const_pointer p_value;
+ size_type pos;
+
+ get_start_it_state(p_value, pos);
+
+ return (const_iterator(p_value, pos, this));
+}
+
+PB_ASSOC_CLASS_T_DEC
+inline typename PB_ASSOC_CLASS_C_DEC::const_iterator
+PB_ASSOC_CLASS_C_DEC::
+end() const
+{
+ return (s_const_end_it);
+}
+
+#ifdef PB_ASSOC_DATA_TRUE_INDICATOR
+PB_ASSOC_CLASS_T_DEC
+void
+PB_ASSOC_CLASS_C_DEC::
+inc_it_state(pointer& r_p_value, size_type& r_pos) const
+{
+ PB_ASSOC_DBG_ASSERT(r_p_value != NULL);
+
+ for (++r_pos; r_pos < m_num_e; ++r_pos)
+ {
+ const_entry_pointer p_e =& m_a_entries[r_pos];
+
+ if (p_e->m_stat == VALID_ENTRY_STATUS)
+ {
+ r_p_value = static_cast<const_pointer>(&p_e->m_value);
+
+ return;
+ }
+ }
+
+ r_p_value = NULL;
+}
+#endif // #ifdef PB_ASSOC_DATA_TRUE_INDICATOR
+
+PB_ASSOC_CLASS_T_DEC
+void
+PB_ASSOC_CLASS_C_DEC::
+inc_it_state(const_pointer& r_p_value, size_type& r_pos) const
+{
+ PB_ASSOC_DBG_ASSERT(r_p_value != NULL);
+
+ for (++r_pos; r_pos < m_num_e; ++r_pos)
+ {
+ const_entry_pointer p_e =& m_a_entries[r_pos];
+
+ if (p_e->m_stat == VALID_ENTRY_STATUS)
+ {
+ r_p_value = static_cast<const_pointer>(&p_e->m_value);
+
+ return;
+ }
+ }
+
+ r_p_value = NULL;
+}
+
+PB_ASSOC_CLASS_T_DEC
+void
+PB_ASSOC_CLASS_C_DEC::
+get_start_it_state(const_pointer& r_p_value, size_type& r_pos) const
+{
+ for (r_pos = 0; r_pos < m_num_e; ++r_pos)
+ {
+ const_entry_pointer p_e =& m_a_entries[r_pos];
+
+ if (p_e->m_stat == VALID_ENTRY_STATUS)
+ {
+ r_p_value =& p_e->m_value;
+
+ return;
+ }
+ }
+
+ r_p_value = NULL;
+}
+
+PB_ASSOC_CLASS_T_DEC
+void
+PB_ASSOC_CLASS_C_DEC::
+get_start_it_state(pointer& r_p_value, size_type& r_pos)
+{
+ for (r_pos = 0; r_pos < m_num_e; ++r_pos)
+ {
+ entry_pointer p_e =& m_a_entries[r_pos];
+
+ if (p_e->m_stat == VALID_ENTRY_STATUS)
+ {
+ r_p_value = const_cast<pointer>(&p_e->m_value);
+
+ return;
+ }
+ }
+
+ r_p_value = NULL;
+}
+
diff --git a/libstdc++-v3/include/ext/pb_assoc/detail/gp_ht_map_/policy_access_fn_imps.hpp b/libstdc++-v3/include/ext/pb_assoc/detail/gp_ht_map_/policy_access_fn_imps.hpp
new file mode 100644
index 00000000000..2ba6b237b18
--- /dev/null
+++ b/libstdc++-v3/include/ext/pb_assoc/detail/gp_ht_map_/policy_access_fn_imps.hpp
@@ -0,0 +1,124 @@
+// -*- C++ -*-
+
+// 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.
+
+// As a special exception, you may use this file as part of a free software
+// library without restriction. Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General 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 policy_access_fn_imps.hpp
+ * Contains implementations of gp_ht_map_'s policy agpess
+ * functions.
+ */
+
+PB_ASSOC_CLASS_T_DEC
+Hash_Fn&
+PB_ASSOC_CLASS_C_DEC::
+get_hash_fn()
+{
+ return (*this);
+}
+
+PB_ASSOC_CLASS_T_DEC
+const Hash_Fn&
+PB_ASSOC_CLASS_C_DEC::
+get_hash_fn() const
+{
+ return (*this);
+}
+
+PB_ASSOC_CLASS_T_DEC
+Eq_Fn&
+PB_ASSOC_CLASS_C_DEC::
+get_eq_fn()
+{
+ return (*this);
+}
+
+PB_ASSOC_CLASS_T_DEC
+const Eq_Fn&
+PB_ASSOC_CLASS_C_DEC::
+get_eq_fn() const
+{
+ return (*this);
+}
+
+PB_ASSOC_CLASS_T_DEC
+Probe_Fn&
+PB_ASSOC_CLASS_C_DEC::
+get_probe_fn()
+{
+ return (*this);
+}
+
+PB_ASSOC_CLASS_T_DEC
+const Probe_Fn&
+PB_ASSOC_CLASS_C_DEC::
+get_probe_fn() const
+{
+ return (*this);
+}
+
+PB_ASSOC_CLASS_T_DEC
+Comb_Probe_Fn&
+PB_ASSOC_CLASS_C_DEC::
+get_comb_probe_fn()
+{
+ return (*this);
+}
+
+PB_ASSOC_CLASS_T_DEC
+const Comb_Probe_Fn&
+PB_ASSOC_CLASS_C_DEC::
+get_comb_probe_fn() const
+{
+ return (*this);
+}
+
+PB_ASSOC_CLASS_T_DEC
+Resize_Policy&
+PB_ASSOC_CLASS_C_DEC::
+get_resize_policy()
+{
+ return (*this);
+}
+
+PB_ASSOC_CLASS_T_DEC
+const Resize_Policy&
+PB_ASSOC_CLASS_C_DEC::
+get_resize_policy() const
+{
+ return (*this);
+}
diff --git a/libstdc++-v3/include/ext/pb_assoc/detail/gp_ht_map_/resize_fn_imps.hpp b/libstdc++-v3/include/ext/pb_assoc/detail/gp_ht_map_/resize_fn_imps.hpp
new file mode 100644
index 00000000000..d7c73ac91da
--- /dev/null
+++ b/libstdc++-v3/include/ext/pb_assoc/detail/gp_ht_map_/resize_fn_imps.hpp
@@ -0,0 +1,158 @@
+// -*- C++ -*-
+
+// 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.
+
+// As a special exception, you may use this file as part of a free software
+// library without restriction. Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General 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 resize_fn_imps.hpp
+ * Contains implementations of gp_ht_map_'s resize related functions.
+ */
+
+PB_ASSOC_CLASS_T_DEC
+inline bool
+PB_ASSOC_CLASS_C_DEC::
+do_resize_if_needed()
+{
+ if (!my_resize_base::is_resize_needed())
+ return (false);
+
+ do
+ do_resize(my_resize_base::get_new_size(m_num_e, m_num_used_e));
+ while (my_resize_base::is_resize_needed());
+
+ return (true);
+}
+
+PB_ASSOC_CLASS_T_DEC
+inline void
+PB_ASSOC_CLASS_C_DEC::
+do_resize_if_needed_no_throw()
+{
+ if (!my_resize_base::is_resize_needed())
+ return;
+
+ try
+ {
+ do
+ do_resize(my_resize_base::get_new_size(m_num_e, m_num_used_e));
+ while (my_resize_base::is_resize_needed());
+ }
+ catch(...)
+ { }
+
+ PB_ASSOC_DBG_ONLY(assert_valid();)
+ }
+
+PB_ASSOC_CLASS_T_DEC
+void
+PB_ASSOC_CLASS_C_DEC::
+do_resize(size_type new_size)
+{
+#ifdef PB_ASSOC_BASIC_REGRESSION
+ throw_prob_adjustor adjust(m_num_e);
+#endif // #ifdef PB_ASSOC_BASIC_REGRESSION
+
+ PB_ASSOC_DBG_ONLY(assert_valid();)
+
+ const size_type old_size = m_num_e;
+
+ entry_array a_entries_resized = NULL;
+
+ my_ranged_probe_fn_base::notify_resized(new_size);
+
+ // Following line might throw an exception.
+
+ try
+ {
+ a_entries_resized = s_entry_allocator.allocate(new_size);
+ }
+ catch(...)
+ {
+ my_ranged_probe_fn_base::notify_resized(old_size);
+
+ throw;
+ }
+
+ m_num_e = new_size;
+
+ for (size_type i = 0; i < m_num_e; ++i)
+ a_entries_resized[i].m_stat = (entry_status)EMPTY_ENTRY_STATUS;
+
+ try
+ {
+ resize_imp(a_entries_resized, old_size);
+ }
+ catch(...)
+ {
+ erase_all_valid_entries(a_entries_resized, new_size);
+
+ m_num_e = old_size;
+
+ s_entry_allocator.deallocate(a_entries_resized, new_size);
+
+ my_ranged_probe_fn_base::notify_resized(old_size);
+
+ throw;
+ }
+
+ // At this point no exceptions can be thrown.
+
+ PB_ASSOC_DBG_ONLY(assert_entry_array_valid(a_entries_resized, my_hash_traits_base::s_store_hash_indicator);)
+
+ Resize_Policy::notify_resized(new_size);
+
+ erase_all_valid_entries(m_a_entries, old_size);
+
+ s_entry_allocator.deallocate(m_a_entries, old_size);
+
+ m_a_entries = a_entries_resized;
+
+ PB_ASSOC_DBG_ONLY(assert_valid();)
+ }
+
+PB_ASSOC_CLASS_T_DEC
+void
+PB_ASSOC_CLASS_C_DEC::
+resize_imp(entry_array a_entries_resized, size_type old_size)
+{
+ for (size_type pos = 0; pos < old_size; ++pos)
+ if (m_a_entries[pos].m_stat == VALID_ENTRY_STATUS)
+ resize_imp_reassign(m_a_entries + pos, a_entries_resized, my_hash_traits_base::s_store_hash_indicator);
+}
+
+#include <ext/pb_assoc/detail/gp_ht_map_/resize_no_store_hash_fn_imps.hpp>
+#include <ext/pb_assoc/detail/gp_ht_map_/resize_store_hash_fn_imps.hpp>
diff --git a/libstdc++-v3/include/ext/pb_assoc/detail/gp_ht_map_/resize_no_store_hash_fn_imps.hpp b/libstdc++-v3/include/ext/pb_assoc/detail/gp_ht_map_/resize_no_store_hash_fn_imps.hpp
new file mode 100644
index 00000000000..07f8f2abaee
--- /dev/null
+++ b/libstdc++-v3/include/ext/pb_assoc/detail/gp_ht_map_/resize_no_store_hash_fn_imps.hpp
@@ -0,0 +1,84 @@
+// -*- C++ -*-
+
+// 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.
+
+// As a special exception, you may use this file as part of a free software
+// library without restriction. Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General 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 resize_no_store_hash_fn_imps.hpp
+ * Contains implementations of gp_ht_map_'s resize related functions, when the
+ * hash value is not stored.
+ */
+
+PB_ASSOC_CLASS_T_DEC
+inline void
+PB_ASSOC_CLASS_C_DEC::
+resize_imp_reassign(entry_pointer p_e, entry_array a_entries_resized, int_to_type<false>)
+{
+ const_key_reference r_key = PB_ASSOC_V2F(p_e->m_value);
+
+ size_type hash = my_ranged_probe_fn_base::operator()(r_key);
+
+ size_type i;
+
+ for (i = 0; i < m_num_e; ++i)
+ {
+ const size_type pos =
+ my_ranged_probe_fn_base::operator()(r_key, hash, i);
+
+ entry* const p_new_e = a_entries_resized + pos;
+
+ switch(p_new_e->m_stat)
+ {
+ case EMPTY_ENTRY_STATUS:
+ new (&p_new_e->m_value) value_type(p_e->m_value);
+
+ p_new_e->m_stat = VALID_ENTRY_STATUS;
+
+ return;
+ case ERASED_ENTRY_STATUS:
+ PB_ASSOC_DBG_ASSERT(0);
+ break;
+ case VALID_ENTRY_STATUS:
+ break;
+ default:
+ PB_ASSOC_DBG_ASSERT(0);
+ };
+ }
+
+ throw cannot_insert();
+}
+
diff --git a/libstdc++-v3/include/ext/pb_assoc/detail/gp_ht_map_/resize_store_hash_fn_imps.hpp b/libstdc++-v3/include/ext/pb_assoc/detail/gp_ht_map_/resize_store_hash_fn_imps.hpp
new file mode 100644
index 00000000000..a61ac7a12ce
--- /dev/null
+++ b/libstdc++-v3/include/ext/pb_assoc/detail/gp_ht_map_/resize_store_hash_fn_imps.hpp
@@ -0,0 +1,93 @@
+// -*- C++ -*-
+
+// 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.
+
+// As a special exception, you may use this file as part of a free software
+// library without restriction. Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General 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 resize_store_hash_fn_imps.hpp
+ * Contains implementations of gp_ht_map_'s resize related functions, when the
+ * hash value is stored.
+ */
+
+PB_ASSOC_CLASS_T_DEC
+inline void
+PB_ASSOC_CLASS_C_DEC::
+resize_imp_reassign(entry_pointer p_e, entry_array a_entries_resized, int_to_type<true>)
+{
+ const_key_reference r_key = PB_ASSOC_V2F(p_e->m_value);
+
+ size_type hash =
+ my_ranged_probe_fn_base::operator()(r_key, p_e->m_hash);
+
+ size_type i;
+
+ for (i = 0; i < m_num_e; ++i)
+ {
+ const size_type pos =
+ my_ranged_probe_fn_base::operator()(r_key, hash, i);
+
+ entry* const p_new_e = a_entries_resized + pos;
+
+ switch(p_new_e->m_stat)
+ {
+ case EMPTY_ENTRY_STATUS:
+#ifdef PB_ASSOC_DATA_TRUE_INDICATOR
+ new (&p_new_e->m_value) mapped_value_type(p_e->m_value);
+#endif // #ifdef PB_ASSOC_DATA_TRUE_INDICATOR
+
+#ifdef PB_ASSOC_DATA_FALSE_INDICATOR
+ new (&p_new_e->m_value) Key(p_e->m_value);
+#endif // #ifdef PB_ASSOC_DATA_FALSE_INDICATO
+
+ p_new_e->m_hash = hash;
+
+ p_new_e->m_stat = VALID_ENTRY_STATUS;
+
+ return;
+ case ERASED_ENTRY_STATUS:
+ PB_ASSOC_DBG_ASSERT(0);
+ break;
+ case VALID_ENTRY_STATUS:
+ break;
+ default:
+ PB_ASSOC_DBG_ASSERT(0);
+ };
+ }
+
+ throw cannot_insert();
+}
+
diff --git a/libstdc++-v3/include/ext/pb_assoc/detail/hash_fn/direct_mask_range_hashing_imp.hpp b/libstdc++-v3/include/ext/pb_assoc/detail/hash_fn/direct_mask_range_hashing_imp.hpp
new file mode 100644
index 00000000000..da44db8f4f4
--- /dev/null
+++ b/libstdc++-v3/include/ext/pb_assoc/detail/hash_fn/direct_mask_range_hashing_imp.hpp
@@ -0,0 +1,67 @@
+// -*- C++ -*-
+
+// 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.
+
+// As a special exception, you may use this file as part of a free software
+// library without restriction. Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General 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 direct_mask_range_hashing_imp.hpp
+ * Contains an implementation of direct_mask_range_hashing.
+ */
+
+PB_ASSOC_CLASS_T_DEC
+void
+PB_ASSOC_CLASS_C_DEC::
+swap(PB_ASSOC_CLASS_C_DEC& r_other)
+{
+ my_mask_based_base::swap(r_other);
+}
+
+PB_ASSOC_CLASS_T_DEC
+void
+PB_ASSOC_CLASS_C_DEC::
+notify_resized(size_type size)
+{
+ my_mask_based_base::notify_resized(size);
+}
+
+PB_ASSOC_CLASS_T_DEC
+inline typename PB_ASSOC_CLASS_C_DEC::size_type
+PB_ASSOC_CLASS_C_DEC::
+operator()(size_type hash) const
+{
+ return (my_mask_based_base::range_hash(hash));
+}
diff --git a/libstdc++-v3/include/ext/pb_assoc/detail/hash_fn/direct_mod_range_hashing_imp.hpp b/libstdc++-v3/include/ext/pb_assoc/detail/hash_fn/direct_mod_range_hashing_imp.hpp
new file mode 100644
index 00000000000..d38f4bb5391
--- /dev/null
+++ b/libstdc++-v3/include/ext/pb_assoc/detail/hash_fn/direct_mod_range_hashing_imp.hpp
@@ -0,0 +1,67 @@
+// -*- C++ -*-
+
+// 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.
+
+// As a special exception, you may use this file as part of a free software
+// library without restriction. Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General 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 direct_mod_range_hashing_imp.hpp
+ * Contains an implementation of direct_mod_range_hashing.
+ */
+
+PB_ASSOC_CLASS_T_DEC
+void
+PB_ASSOC_CLASS_C_DEC::
+swap(PB_ASSOC_CLASS_C_DEC& r_other)
+{
+ my_mod_based_base::swap(r_other);
+}
+
+PB_ASSOC_CLASS_T_DEC
+void
+PB_ASSOC_CLASS_C_DEC::
+notify_resized(size_type size)
+{
+ my_mod_based_base::notify_resized(size);
+}
+
+PB_ASSOC_CLASS_T_DEC
+inline typename PB_ASSOC_CLASS_C_DEC::size_type
+PB_ASSOC_CLASS_C_DEC::
+operator()(size_type hash) const
+{
+ return (my_mod_based_base::range_hash(hash));
+}
diff --git a/libstdc++-v3/include/ext/pb_assoc/detail/hash_fn/linear_probe_fn_imp.hpp b/libstdc++-v3/include/ext/pb_assoc/detail/hash_fn/linear_probe_fn_imp.hpp
new file mode 100644
index 00000000000..8e23a821643
--- /dev/null
+++ b/libstdc++-v3/include/ext/pb_assoc/detail/hash_fn/linear_probe_fn_imp.hpp
@@ -0,0 +1,58 @@
+// -*- C++ -*-
+
+// 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.
+
+// As a special exception, you may use this file as part of a free software
+// library without restriction. Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General 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 linear_probe_fn_imp.hpp
+ * Contains an implementation of linear_probe_fn
+ */
+
+PB_ASSOC_CLASS_T_DEC
+inline void
+PB_ASSOC_CLASS_C_DEC::
+swap(PB_ASSOC_CLASS_C_DEC& r_other)
+{ }
+
+PB_ASSOC_CLASS_T_DEC
+inline typename PB_ASSOC_CLASS_C_DEC::size_type
+PB_ASSOC_CLASS_C_DEC::
+operator()(Const_Key_Ref /*r_key*/, size_type i) const
+{
+ return (i);
+}
+
diff --git a/libstdc++-v3/include/ext/pb_assoc/detail/hash_fn/mask_based_range_hashing.hpp b/libstdc++-v3/include/ext/pb_assoc/detail/hash_fn/mask_based_range_hashing.hpp
new file mode 100644
index 00000000000..1a731ed298d
--- /dev/null
+++ b/libstdc++-v3/include/ext/pb_assoc/detail/hash_fn/mask_based_range_hashing.hpp
@@ -0,0 +1,139 @@
+// -*- C++ -*-
+
+// 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.
+
+// As a special exception, you may use this file as part of a free software
+// library without restriction. Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General 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 mask_based_range_hashing.hpp
+ * Contains a range hashing policy base.
+ */
+
+#ifndef MASK_BASED_RANGE_HASHING_HPP
+#define MASK_BASED_RANGE_HASHING_HPP
+
+namespace pb_assoc
+{
+
+ namespace detail
+ {
+
+#define PB_ASSOC_CLASS_T_DEC \
+ template<typename Size_Type>
+
+#define PB_ASSOC_CLASS_C_DEC \
+ mask_based_range_hashing< \
+ Size_Type>
+
+ template<typename Size_Type>
+ class mask_based_range_hashing
+ {
+ protected:
+ typedef Size_Type size_type;
+
+ protected:
+ void
+ swap(PB_ASSOC_CLASS_C_DEC& r_other);
+
+ void
+ notify_resized(size_type size);
+
+ inline size_type
+ range_hash(size_type hash) const;
+
+ private:
+ size_type m_mask;
+
+ const static size_type s_num_bits_in_size_type;
+
+ const static size_type s_highest_bit_1;
+ };
+
+ PB_ASSOC_CLASS_T_DEC
+ const typename PB_ASSOC_CLASS_C_DEC::size_type
+ PB_ASSOC_CLASS_C_DEC::s_num_bits_in_size_type =
+ sizeof(typename PB_ASSOC_CLASS_C_DEC::size_type) << 3;
+
+ PB_ASSOC_CLASS_T_DEC
+ const typename PB_ASSOC_CLASS_C_DEC::size_type PB_ASSOC_CLASS_C_DEC::s_highest_bit_1 =
+ 1 << (s_num_bits_in_size_type - 1);
+
+ PB_ASSOC_CLASS_T_DEC
+ void
+ PB_ASSOC_CLASS_C_DEC::
+ swap(PB_ASSOC_CLASS_C_DEC& r_other)
+ {
+ std::swap(m_mask, r_other.m_mask);
+ }
+
+ PB_ASSOC_CLASS_T_DEC
+ void
+ PB_ASSOC_CLASS_C_DEC::
+ notify_resized(size_type size)
+ {
+ size_type i = 0;
+
+ while (size ^ s_highest_bit_1)
+ {
+ size <<= 1;
+
+ ++i;
+ }
+
+ m_mask = 1;
+
+ i += 2;
+
+ while (i++ < s_num_bits_in_size_type)
+ m_mask = (m_mask << 1) ^ 1;
+ }
+
+ PB_ASSOC_CLASS_T_DEC
+ inline typename PB_ASSOC_CLASS_C_DEC::size_type
+ PB_ASSOC_CLASS_C_DEC::
+ range_hash(size_type hash) const
+ {
+ return (hash& m_mask);
+ }
+
+#undef PB_ASSOC_CLASS_T_DEC
+#undef PB_ASSOC_CLASS_C_DEC
+
+ } // namespace detail
+
+} // namespace pb_assoc
+
+#endif // #ifndef MASK_BASED_RANGE_HASHING_HPP
diff --git a/libstdc++-v3/include/ext/pb_assoc/detail/hash_fn/mod_based_range_hashing.hpp b/libstdc++-v3/include/ext/pb_assoc/detail/hash_fn/mod_based_range_hashing.hpp
new file mode 100644
index 00000000000..6f9e8777b25
--- /dev/null
+++ b/libstdc++-v3/include/ext/pb_assoc/detail/hash_fn/mod_based_range_hashing.hpp
@@ -0,0 +1,112 @@
+// -*- C++ -*-
+
+// 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.
+
+// As a special exception, you may use this file as part of a free software
+// library without restriction. Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General 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 mod_based_range_hashing.hpp
+ * Contains a range hashing policy base.
+ */
+
+#ifndef MOD_BASED_RANGE_HASHING_HPP
+#define MOD_BASED_RANGE_HASHING_HPP
+
+namespace pb_assoc
+{
+
+ namespace detail
+ {
+
+#define PB_ASSOC_CLASS_T_DEC \
+ template<typename Size_Type>
+
+#define PB_ASSOC_CLASS_C_DEC \
+ mod_based_range_hashing< \
+ Size_Type>
+
+ template<typename Size_Type>
+ class mod_based_range_hashing
+ {
+ protected:
+ typedef Size_Type size_type;
+
+ protected:
+ void
+ swap(PB_ASSOC_CLASS_C_DEC& r_other);
+
+ void
+ notify_resized(size_type size);
+
+ inline size_type
+ range_hash(size_type hash) const;
+
+ private:
+ size_type m_size;
+ };
+
+ PB_ASSOC_CLASS_T_DEC
+ void
+ PB_ASSOC_CLASS_C_DEC::
+ swap(PB_ASSOC_CLASS_C_DEC& r_other)
+ {
+ std::swap(m_size, r_other.m_size);
+ }
+
+ PB_ASSOC_CLASS_T_DEC
+ void
+ PB_ASSOC_CLASS_C_DEC::
+ notify_resized(size_type size)
+ {
+ m_size = size;
+ }
+
+ PB_ASSOC_CLASS_T_DEC
+ inline typename PB_ASSOC_CLASS_C_DEC::size_type
+ PB_ASSOC_CLASS_C_DEC::
+ range_hash(size_type hash) const
+ {
+ return (hash % m_size);
+ }
+
+#undef PB_ASSOC_CLASS_T_DEC
+#undef PB_ASSOC_CLASS_C_DEC
+
+ } // namespace detail
+
+} // namespace pb_assoc
+
+#endif // #ifndef MOD_BASED_RANGE_HASHING_HPP
diff --git a/libstdc++-v3/include/ext/pb_assoc/detail/hash_fn/probe_fn_base.hpp b/libstdc++-v3/include/ext/pb_assoc/detail/hash_fn/probe_fn_base.hpp
new file mode 100644
index 00000000000..4d5d5e9a35f
--- /dev/null
+++ b/libstdc++-v3/include/ext/pb_assoc/detail/hash_fn/probe_fn_base.hpp
@@ -0,0 +1,96 @@
+// -*- C++ -*-
+
+// 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.
+
+// As a special exception, you may use this file as part of a free software
+// library without restriction. Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General 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 probe_fn_base.hpp
+ * Contains a probe policy base.
+ */
+
+#ifndef PROBE_FN_BASE_HPP
+#define PROBE_FN_BASE_HPP
+
+#include <functional>
+
+namespace pb_assoc
+{
+
+ namespace detail
+ {
+
+#ifdef PROBE_FN_BASE_DEBUG
+#define PB_ASSOC_DBG_ASSERT(X) assert(X)
+#define PB_ASSOC_DBG_VERIFY(X) assert(X)
+#define PB_ASSOC_DBG_ONLY(X) X
+#else // #ifdef PROBE_FN_BASE_DEBUG
+#define PB_ASSOC_DBG_ASSERT(X)
+#define PB_ASSOC_DBG_VERIFY(X) {if((X)==0);}
+#define PB_ASSOC_DBG_ONLY(X) ;
+#endif // #ifdef PROBE_FN_BASE_DEBUG
+
+#define PB_ASSOC_CLASS_T_DEC \
+ template<class Allocator>
+
+#define PB_ASSOC_CLASS_C_DEC \
+ probe_fn_base< \
+ Allocator>
+
+ template<class Allocator>
+ class probe_fn_base
+ {
+ protected:
+ ~probe_fn_base();
+ };
+
+ PB_ASSOC_CLASS_T_DEC
+ PB_ASSOC_CLASS_C_DEC::
+ ~probe_fn_base()
+ { }
+
+#undef PB_ASSOC_CLASS_T_DEC
+#undef PB_ASSOC_CLASS_C_DEC
+
+#undef PB_ASSOC_DBG_ASSERT
+#undef PB_ASSOC_DBG_VERIFY
+#undef PB_ASSOC_DBG_ONLY
+
+ } // namespace detail
+
+} // namespace pb_assoc
+
+#endif // #ifndef PROBE_FN_BASE_HPP
diff --git a/libstdc++-v3/include/ext/pb_assoc/detail/hash_fn/quadratic_probe_fn_imp.hpp b/libstdc++-v3/include/ext/pb_assoc/detail/hash_fn/quadratic_probe_fn_imp.hpp
new file mode 100644
index 00000000000..bc630755d4c
--- /dev/null
+++ b/libstdc++-v3/include/ext/pb_assoc/detail/hash_fn/quadratic_probe_fn_imp.hpp
@@ -0,0 +1,57 @@
+// -*- C++ -*-
+
+// 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.
+
+// As a special exception, you may use this file as part of a free software
+// library without restriction. Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General 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 quadratic_probe_fn_imp.hpp
+ * Contains an implementation of quadratic_probe_fn.
+ */
+
+PB_ASSOC_CLASS_T_DEC
+inline void
+PB_ASSOC_CLASS_C_DEC::
+swap(PB_ASSOC_CLASS_C_DEC& r_other)
+{ }
+
+PB_ASSOC_CLASS_T_DEC
+inline typename PB_ASSOC_CLASS_C_DEC::size_type
+PB_ASSOC_CLASS_C_DEC::
+operator()(Const_Key_Ref /*r_key*/, size_type i) const
+{
+ return (i* i);
+}
diff --git a/libstdc++-v3/include/ext/pb_assoc/detail/hash_fn/ranged_hash_fn.hpp b/libstdc++-v3/include/ext/pb_assoc/detail/hash_fn/ranged_hash_fn.hpp
new file mode 100644
index 00000000000..efa5a5819c7
--- /dev/null
+++ b/libstdc++-v3/include/ext/pb_assoc/detail/hash_fn/ranged_hash_fn.hpp
@@ -0,0 +1,459 @@
+// -*- C++ -*-
+
+// 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.
+
+// As a special exception, you may use this file as part of a free software
+// library without restriction. Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General 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 ranged_hash_fn.hpp
+ * Contains a unified ranged hash functor, allowing the hash tables to deal with
+ * a single class for ranged hashing.
+ */
+
+#ifndef RANGED_HASH_FN_HPP
+#define RANGED_HASH_FN_HPP
+
+#include <utility>
+
+namespace pb_assoc
+{
+
+ namespace detail
+ {
+
+#ifdef PB_ASSOC_RANGED_HASH_FN_DEBUG
+#define PB_ASSOC_DBG_ASSERT(X) assert(X)
+#define PB_ASSOC_DBG_VERIFY(X) assert(X)
+#define PB_ASSOC_DBG_ONLY(X) X
+#else // #ifdef PB_ASSOC_RANGED_HASH_FN_DEBUG
+#define PB_ASSOC_DBG_ASSERT(X)
+#define PB_ASSOC_DBG_VERIFY(X) {if((X)==0);}
+#define PB_ASSOC_DBG_ONLY(X) ;
+#endif // #ifdef PB_ASSOC_RANGED_HASH_FN_DEBUG
+
+ template<typename Key,
+ class Hash_Fn,
+ class Allocator,
+ class Comb_Hash_Fn,
+ bool Store_Hash>
+ class ranged_hash_fn;
+
+#define PB_ASSOC_CLASS_T_DEC \
+ template< \
+ typename Key, \
+ class Hash_Fn, \
+ class Allocator, \
+ class Comb_Hash_Fn>
+
+#define PB_ASSOC_CLASS_C_DEC \
+ ranged_hash_fn< \
+ Key, \
+ Hash_Fn, \
+ Allocator, \
+ Comb_Hash_Fn, \
+ false>
+
+ /**
+ * Specialization 1- The client supplies a hash function and a ranged
+ * hash function, and requests that hash values not be stored.
+ **/
+ template<typename Key,
+ class Hash_Fn,
+ class Allocator,
+ class Comb_Hash_Fn>
+ class ranged_hash_fn<Key, Hash_Fn, Allocator, Comb_Hash_Fn, false> : public Hash_Fn,
+ public Comb_Hash_Fn
+ {
+ protected:
+ typedef typename Allocator::size_type size_type;
+
+ typedef Hash_Fn my_hash_fn_base;
+
+ typedef Comb_Hash_Fn my_comb_hash_fn_base;
+
+ typedef typename Allocator::template rebind<Key>::other key_allocator;
+
+ typedef typename key_allocator::const_reference const_key_reference;
+
+ protected:
+ ranged_hash_fn(size_type size);
+
+ ranged_hash_fn(size_type size, const Hash_Fn& r_hash_fn);
+
+ ranged_hash_fn(size_type size, const Hash_Fn& r_hash_fn, const Comb_Hash_Fn& r_comb_hash_fn);
+
+ void
+ swap(PB_ASSOC_CLASS_C_DEC& r_other);
+
+ void
+ notify_resized(size_type size);
+
+ inline size_type
+ operator()(const_key_reference r_key) const;
+ };
+
+ PB_ASSOC_CLASS_T_DEC
+ PB_ASSOC_CLASS_C_DEC::
+ ranged_hash_fn(size_type size)
+ {
+ Comb_Hash_Fn::notify_resized(size);
+ }
+
+ PB_ASSOC_CLASS_T_DEC
+ PB_ASSOC_CLASS_C_DEC::
+ ranged_hash_fn(size_type size, const Hash_Fn& r_hash_fn) :
+ Hash_Fn(r_hash_fn)
+ {
+ Comb_Hash_Fn::notify_resized(size);
+ }
+
+ PB_ASSOC_CLASS_T_DEC
+ PB_ASSOC_CLASS_C_DEC::
+ ranged_hash_fn(size_type size, const Hash_Fn& r_hash_fn, const Comb_Hash_Fn& r_comb_hash_fn) :
+ Hash_Fn(r_hash_fn),
+ Comb_Hash_Fn(r_comb_hash_fn)
+ {
+ my_comb_hash_fn_base::notify_resized(size);
+ }
+
+ PB_ASSOC_CLASS_T_DEC
+ void
+ PB_ASSOC_CLASS_C_DEC::
+ swap(PB_ASSOC_CLASS_C_DEC& r_other)
+ {
+ my_comb_hash_fn_base::swap(r_other);
+
+ std::swap((Hash_Fn& )(*this), (Hash_Fn& )r_other);
+ }
+
+ PB_ASSOC_CLASS_T_DEC
+ void
+ PB_ASSOC_CLASS_C_DEC::
+ notify_resized(size_type size)
+ {
+ my_comb_hash_fn_base::notify_resized(size);
+ }
+
+ PB_ASSOC_CLASS_T_DEC
+ inline typename PB_ASSOC_CLASS_C_DEC::size_type
+ PB_ASSOC_CLASS_C_DEC::
+ operator()(const_key_reference r_key) const
+ {
+ return (my_comb_hash_fn_base::operator()(
+ my_hash_fn_base::operator()(r_key)));
+ }
+
+#undef PB_ASSOC_CLASS_T_DEC
+#undef PB_ASSOC_CLASS_C_DEC
+
+#define PB_ASSOC_CLASS_T_DEC \
+ template< \
+ typename Key, \
+ class Hash_Fn, \
+ class Allocator, \
+ class Comb_Hash_Fn>
+
+#define PB_ASSOC_CLASS_C_DEC \
+ ranged_hash_fn< \
+ Key, \
+ Hash_Fn, \
+ Allocator, \
+ Comb_Hash_Fn, \
+ true>
+
+ /**
+ * Specialization 2- The client supplies a hash function and a ranged
+ * hash function, and requests that hash values be stored.
+ **/
+ template<typename Key,
+ class Hash_Fn,
+ class Allocator,
+ class Comb_Hash_Fn>
+ class ranged_hash_fn<Key, Hash_Fn, Allocator, Comb_Hash_Fn, true> :
+ public Hash_Fn,
+ public Comb_Hash_Fn
+ {
+ protected:
+ typedef typename Allocator::size_type size_type;
+
+ typedef std::pair<size_type, size_type> comp_hash;
+
+ typedef Hash_Fn my_hash_fn_base;
+
+ typedef Comb_Hash_Fn my_comb_hash_fn_base;
+
+ typedef typename Allocator::template rebind<Key>::other key_allocator;
+
+ typedef typename key_allocator::const_reference const_key_reference;
+
+ protected:
+ ranged_hash_fn(size_type size);
+
+ ranged_hash_fn(size_type size, const Hash_Fn& r_hash_fn);
+
+ ranged_hash_fn(size_type size, const Hash_Fn& r_hash_fn, const Comb_Hash_Fn& r_comb_hash_fn);
+
+ void
+ swap(PB_ASSOC_CLASS_C_DEC& r_other);
+
+ void
+ notify_resized(size_type size);
+
+ inline comp_hash
+ operator()(const_key_reference r_key) const;
+
+ inline comp_hash
+ operator()(const_key_reference r_key, size_type hash) const;
+ };
+
+ PB_ASSOC_CLASS_T_DEC
+ PB_ASSOC_CLASS_C_DEC::
+ ranged_hash_fn(size_type size)
+ {
+ Comb_Hash_Fn::notify_resized(size);
+ }
+
+ PB_ASSOC_CLASS_T_DEC
+ PB_ASSOC_CLASS_C_DEC::
+ ranged_hash_fn(size_type size, const Hash_Fn& r_hash_fn) :
+ Hash_Fn(r_hash_fn)
+ {
+ Comb_Hash_Fn::notify_resized(size);
+ }
+
+ PB_ASSOC_CLASS_T_DEC
+ PB_ASSOC_CLASS_C_DEC::
+ ranged_hash_fn(size_type size, const Hash_Fn& r_hash_fn, const Comb_Hash_Fn& r_comb_hash_fn) :
+ Hash_Fn(r_hash_fn),
+ Comb_Hash_Fn(r_comb_hash_fn)
+ {
+ my_comb_hash_fn_base::notify_resized(size);
+ }
+
+ PB_ASSOC_CLASS_T_DEC
+ void
+ PB_ASSOC_CLASS_C_DEC::
+ swap(PB_ASSOC_CLASS_C_DEC& r_other)
+ {
+ my_comb_hash_fn_base::swap(r_other);
+
+ std::swap((Hash_Fn& )(*this), (Hash_Fn& )r_other);
+ }
+
+ PB_ASSOC_CLASS_T_DEC
+ void
+ PB_ASSOC_CLASS_C_DEC::
+ notify_resized(size_type size)
+ {
+ my_comb_hash_fn_base::notify_resized(size);
+ }
+
+ PB_ASSOC_CLASS_T_DEC
+ inline typename PB_ASSOC_CLASS_C_DEC::comp_hash
+ PB_ASSOC_CLASS_C_DEC::
+ operator()(const_key_reference r_key) const
+ {
+ const size_type hash = my_hash_fn_base::operator()(r_key);
+
+ return (std::make_pair(my_comb_hash_fn_base::operator()(hash), hash));
+ }
+
+ PB_ASSOC_CLASS_T_DEC
+ inline typename PB_ASSOC_CLASS_C_DEC::comp_hash
+ PB_ASSOC_CLASS_C_DEC::
+ operator()
+#ifdef PB_ASSOC_RANGED_HASH_FN_DEBUG
+ (const_key_reference r_key, size_type hash) const
+#else // #ifdef PB_ASSOC_RANGED_HASH_FN_DEBUG
+ (const_key_reference /*r_key*/, size_type hash) const
+#endif // #ifdef PB_ASSOC_RANGED_HASH_FN_DEBUG
+ {
+ PB_ASSOC_DBG_ASSERT(hash == my_hash_fn_base::operator()(r_key));
+
+ return (std::make_pair(my_comb_hash_fn_base::operator()(hash), hash));
+ }
+
+#undef PB_ASSOC_CLASS_T_DEC
+#undef PB_ASSOC_CLASS_C_DEC
+
+#define PB_ASSOC_CLASS_T_DEC \
+ template<typename Key, class Allocator, class Comb_Hash_Fn>
+
+#define PB_ASSOC_CLASS_C_DEC \
+ ranged_hash_fn< \
+ Key, \
+ null_hash_fn, \
+ Allocator, \
+ Comb_Hash_Fn, \
+ false>
+
+ /**
+ * Specialization 3- The client does not supply a hash function
+ * (by specifying null_hash_fn as the Hash_Fn parameter),
+ * and requests that hash values not be stored.
+
+ **/
+ template<typename Key, class Allocator, class Comb_Hash_Fn>
+ class ranged_hash_fn<Key, null_hash_fn, Allocator,
+ Comb_Hash_Fn, false> :
+ public null_hash_fn,
+ public Comb_Hash_Fn
+ {
+ protected:
+
+ typedef typename Allocator::size_type size_type;
+
+ typedef Comb_Hash_Fn my_comb_hash_fn_base;
+
+ protected:
+ ranged_hash_fn(size_type size);
+
+ ranged_hash_fn(size_type size, const Comb_Hash_Fn& r_comb_hash_fn);
+
+ ranged_hash_fn(size_type size, const null_hash_fn&r_null_hash_fn, const Comb_Hash_Fn& r_comb_hash_fn);
+
+ void
+ swap(PB_ASSOC_CLASS_C_DEC& r_other);
+ };
+
+ PB_ASSOC_CLASS_T_DEC
+ PB_ASSOC_CLASS_C_DEC::
+ ranged_hash_fn(size_type size)
+ {
+ Comb_Hash_Fn::notify_resized(size);
+ }
+
+ PB_ASSOC_CLASS_T_DEC
+ PB_ASSOC_CLASS_C_DEC::
+ ranged_hash_fn(size_type size, const Comb_Hash_Fn& r_comb_hash_fn) :
+ Comb_Hash_Fn(r_comb_hash_fn)
+ { }
+
+ PB_ASSOC_CLASS_T_DEC
+ PB_ASSOC_CLASS_C_DEC::
+ ranged_hash_fn(size_type size, const null_hash_fn& r_null_hash_fn, const Comb_Hash_Fn& r_comb_hash_fn) :
+ Comb_Hash_Fn(r_comb_hash_fn)
+ { }
+
+ PB_ASSOC_CLASS_T_DEC
+ void
+ PB_ASSOC_CLASS_C_DEC::
+ swap(PB_ASSOC_CLASS_C_DEC& r_other)
+ {
+ my_comb_hash_fn_base::swap(r_other);
+ }
+
+#undef PB_ASSOC_CLASS_T_DEC
+#undef PB_ASSOC_CLASS_C_DEC
+
+#define PB_ASSOC_CLASS_T_DEC \
+ template<typename Key, class Allocator, class Comb_Hash_Fn>
+
+#define PB_ASSOC_CLASS_C_DEC \
+ ranged_hash_fn< \
+ Key, \
+ null_hash_fn, \
+ Allocator, \
+ Comb_Hash_Fn, \
+ true>
+
+ /**
+ * Specialization 4- The client does not supply a hash function
+ * (by specifying null_hash_fn as the Hash_Fn parameter),
+ * and requests that hash values be stored.
+
+ **/
+ template<typename Key, class Allocator, class Comb_Hash_Fn>
+ class ranged_hash_fn<Key, null_hash_fn, Allocator,
+ Comb_Hash_Fn, true> :
+ public null_hash_fn,
+ public Comb_Hash_Fn
+ {
+ protected:
+ typedef typename Allocator::size_type size_type;
+
+ typedef Comb_Hash_Fn my_comb_hash_fn_base;
+
+ protected:
+ ranged_hash_fn(size_type size);
+
+ ranged_hash_fn(size_type size, const Comb_Hash_Fn& r_comb_hash_fn);
+
+ ranged_hash_fn(size_type size, const null_hash_fn&r_null_hash_fn, const Comb_Hash_Fn& r_comb_hash_fn);
+
+ void
+ swap(PB_ASSOC_CLASS_C_DEC& r_other);
+ };
+
+ PB_ASSOC_CLASS_T_DEC
+ PB_ASSOC_CLASS_C_DEC::
+ ranged_hash_fn(size_type size)
+ {
+ Comb_Hash_Fn::notify_resized(size);
+ }
+
+ PB_ASSOC_CLASS_T_DEC
+ PB_ASSOC_CLASS_C_DEC::
+ ranged_hash_fn(size_type size, const Comb_Hash_Fn& r_comb_hash_fn) :
+ Comb_Hash_Fn(r_comb_hash_fn)
+ { }
+
+ PB_ASSOC_CLASS_T_DEC
+ PB_ASSOC_CLASS_C_DEC::
+ ranged_hash_fn(size_type size, const null_hash_fn&r_null_hash_fn, const Comb_Hash_Fn& r_comb_hash_fn) :
+ Comb_Hash_Fn(r_comb_hash_fn)
+ { }
+
+ PB_ASSOC_CLASS_T_DEC
+ void
+ PB_ASSOC_CLASS_C_DEC::
+ swap(PB_ASSOC_CLASS_C_DEC& r_other)
+ {
+ my_comb_hash_fn_base::swap(r_other);
+ }
+
+#undef PB_ASSOC_CLASS_T_DEC
+#undef PB_ASSOC_CLASS_C_DEC
+
+#undef PB_ASSOC_DBG_ASSERT
+#undef PB_ASSOC_DBG_VERIFY
+#undef PB_ASSOC_DBG_ONLY
+
+ } // namespace detail
+
+} // namespace pb_assoc
+
+#endif // #ifndef RANGED_HASH_FN_HPP
diff --git a/libstdc++-v3/include/ext/pb_assoc/detail/hash_fn/ranged_probe_fn.hpp b/libstdc++-v3/include/ext/pb_assoc/detail/hash_fn/ranged_probe_fn.hpp
new file mode 100644
index 00000000000..60d6acabf16
--- /dev/null
+++ b/libstdc++-v3/include/ext/pb_assoc/detail/hash_fn/ranged_probe_fn.hpp
@@ -0,0 +1,473 @@
+// -*- C++ -*-
+
+// 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.
+
+// As a special exception, you may use this file as part of a free software
+// library without restriction. Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General 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 ranged_probe_fn.hpp
+ * Contains a unified ranged probe functor, allowing the probe tables to deal with
+ * a single class for ranged probeing.
+ */
+
+#ifndef RANGED_PROBE_FN_HPP
+#define RANGED_PROBE_FN_HPP
+
+#include <ext/pb_assoc/hash_policy.hpp>
+#include <utility>
+
+namespace pb_assoc
+{
+
+ namespace detail
+ {
+
+#ifdef PB_ASSOC_RANGED_PROBE_FN_DEBUG
+#define PB_ASSOC_DBG_ASSERT(X) assert(X)
+#define PB_ASSOC_DBG_VERIFY(X) assert(X)
+#define PB_ASSOC_DBG_ONLY(X) X
+#else // #ifdef PB_ASSOC_RANGED_PROBE_FN_DEBUG
+#define PB_ASSOC_DBG_ASSERT(X)
+#define PB_ASSOC_DBG_VERIFY(X) {if((X)==0);}
+#define PB_ASSOC_DBG_ONLY(X) ;
+#endif // #ifdef PB_ASSOC_RANGED_PROBE_FN_DEBUG
+
+ template<typename Key,
+ class Hash_Fn,
+ class Allocator,
+ class Comb_Probe_Fn,
+ class Probe_Fn,
+ bool Store_Hash>
+ class ranged_probe_fn;
+
+#define PB_ASSOC_CLASS_T_DEC \
+ template< \
+ typename Key, \
+ class Hash_Fn, \
+ class Allocator, \
+ class Comb_Probe_Fn, \
+ class Probe_Fn>
+
+#define PB_ASSOC_CLASS_C_DEC \
+ ranged_probe_fn< \
+ Key, \
+ Hash_Fn, \
+ Allocator, \
+ Comb_Probe_Fn, \
+ Probe_Fn, \
+ false>
+
+ /**
+ * Specialization 1- The client supplies a probe function and a ranged
+ * probe function, and requests that hash values not be stored.
+ **/
+ template<typename Key,
+ class Hash_Fn,
+ class Allocator,
+ class Comb_Probe_Fn,
+ class Probe_Fn>
+ class ranged_probe_fn<
+ Key,
+ Hash_Fn,
+ Allocator,
+ Comb_Probe_Fn,
+ Probe_Fn,
+ false> : public Hash_Fn,
+ public Comb_Probe_Fn,
+ public Probe_Fn
+ {
+ protected:
+ typedef typename Allocator::size_type size_type;
+
+ typedef Comb_Probe_Fn my_comb_probe_fn_base;
+
+ typedef Hash_Fn my_hash_fn_base;
+
+ typedef Probe_Fn my_probe_fn_base;
+
+ typedef typename Allocator::template rebind< Key>::other key_allocator;
+
+ typedef typename key_allocator::const_reference const_key_reference;
+
+ protected:
+ ranged_probe_fn(size_type size);
+
+ ranged_probe_fn(size_type size, const Hash_Fn& r_hash_fn);
+
+ ranged_probe_fn(size_type size, const Hash_Fn& r_hash_fn, const Comb_Probe_Fn& r_comb_probe_fn);
+
+ ranged_probe_fn(size_type size, const Hash_Fn& r_hash_fn, const Comb_Probe_Fn& r_comb_probe_fn, const Probe_Fn& r_probe_fn);
+
+ void
+ swap(PB_ASSOC_CLASS_C_DEC& r_other);
+
+ void
+ notify_resized(size_type size);
+
+ inline size_type
+ operator()(const_key_reference r_key) const;
+
+ inline size_type
+ operator()(const_key_reference r_key, size_type hash, size_type i) const;
+ };
+
+ PB_ASSOC_CLASS_T_DEC
+ PB_ASSOC_CLASS_C_DEC::
+ ranged_probe_fn(size_type size)
+ {
+ Comb_Probe_Fn::notify_resized(size);
+ }
+
+ PB_ASSOC_CLASS_T_DEC
+ PB_ASSOC_CLASS_C_DEC::
+ ranged_probe_fn(size_type size, const Hash_Fn& r_hash_fn) :
+ Hash_Fn(r_hash_fn)
+ {
+ Comb_Probe_Fn::notify_resized(size);
+ }
+
+ PB_ASSOC_CLASS_T_DEC
+ PB_ASSOC_CLASS_C_DEC::
+ ranged_probe_fn(size_type size, const Hash_Fn& r_hash_fn, const Comb_Probe_Fn& r_comb_probe_fn) :
+ Hash_Fn(r_hash_fn),
+ Comb_Probe_Fn(r_comb_probe_fn)
+ {
+ my_comb_probe_fn_base::notify_resized(size);
+ }
+
+ PB_ASSOC_CLASS_T_DEC
+ PB_ASSOC_CLASS_C_DEC::
+ ranged_probe_fn(size_type size, const Hash_Fn& r_hash_fn, const Comb_Probe_Fn& r_comb_probe_fn, const Probe_Fn& r_probe_fn) :
+ Hash_Fn(r_hash_fn),
+ Comb_Probe_Fn(r_comb_probe_fn),
+ Probe_Fn(r_probe_fn)
+ {
+ my_comb_probe_fn_base::notify_resized(size);
+ }
+
+ PB_ASSOC_CLASS_T_DEC
+ void
+ PB_ASSOC_CLASS_C_DEC::
+ swap(PB_ASSOC_CLASS_C_DEC& r_other)
+ {
+ my_comb_probe_fn_base::swap(r_other);
+
+ std::swap((Hash_Fn& )(*this), (Hash_Fn& )r_other);
+ }
+
+ PB_ASSOC_CLASS_T_DEC
+ void
+ PB_ASSOC_CLASS_C_DEC::
+ notify_resized(size_type size)
+ {
+ my_comb_probe_fn_base::notify_resized(size);
+ }
+
+ PB_ASSOC_CLASS_T_DEC
+ inline typename PB_ASSOC_CLASS_C_DEC::size_type
+ PB_ASSOC_CLASS_C_DEC::
+ operator()(const_key_reference r_key) const
+ {
+ return (my_comb_probe_fn_base::operator()(
+ my_hash_fn_base::operator()(r_key)));
+ }
+
+ PB_ASSOC_CLASS_T_DEC
+ inline typename PB_ASSOC_CLASS_C_DEC::size_type
+ PB_ASSOC_CLASS_C_DEC::
+ operator()(const_key_reference r_key, size_type hash, size_type i) const
+ {
+ return (my_comb_probe_fn_base::operator()(
+ hash + my_probe_fn_base::operator()(r_key, i)));
+ }
+
+#undef PB_ASSOC_CLASS_T_DEC
+#undef PB_ASSOC_CLASS_C_DEC
+
+#define PB_ASSOC_CLASS_T_DEC \
+ template< \
+ typename Key, \
+ class Hash_Fn, \
+ class Allocator, \
+ class Comb_Probe_Fn, \
+ class Probe_Fn>
+
+#define PB_ASSOC_CLASS_C_DEC \
+ ranged_probe_fn< \
+ Key, \
+ Hash_Fn, \
+ Allocator, \
+ Comb_Probe_Fn, \
+ Probe_Fn, \
+ true>
+
+ /**
+ * Specialization 2- The client supplies a probe function and a ranged
+ * probe function, and requests that hash values be stored.
+ **/
+ template<typename Key,
+ class Hash_Fn,
+ class Allocator,
+ class Comb_Probe_Fn,
+ class Probe_Fn>
+ class ranged_probe_fn<
+ Key,
+ Hash_Fn,
+ Allocator,
+ Comb_Probe_Fn,
+ Probe_Fn,
+ true> :
+ public Hash_Fn,
+ public Comb_Probe_Fn,
+ public Probe_Fn
+ {
+ protected:
+ typedef typename Allocator::size_type size_type;
+
+ typedef std::pair<size_type, size_type> comp_hash;
+
+ typedef Comb_Probe_Fn my_comb_probe_fn_base;
+
+ typedef Hash_Fn my_hash_fn_base;
+
+ typedef Probe_Fn my_probe_fn_base;
+
+ typedef typename Allocator::template rebind<Key>::other key_allocator;
+
+ typedef typename key_allocator::const_reference const_key_reference;
+
+ protected:
+ ranged_probe_fn(size_type size);
+
+ ranged_probe_fn(size_type size, const Hash_Fn& r_hash_fn);
+
+ ranged_probe_fn(size_type size, const Hash_Fn& r_hash_fn, const Comb_Probe_Fn& r_comb_probe_fn);
+
+ ranged_probe_fn(size_type size, const Hash_Fn& r_hash_fn, const Comb_Probe_Fn& r_comb_probe_fn, const Probe_Fn& r_probe_fn);
+
+ void
+ swap(PB_ASSOC_CLASS_C_DEC& r_other);
+
+ void
+ notify_resized(size_type size);
+
+ inline comp_hash
+ operator()(const_key_reference r_key) const;
+
+ inline size_type
+ operator()(const_key_reference r_key, size_type hash, size_type i) const;
+
+ inline size_type
+ operator()(const_key_reference r_key, size_type hash) const;
+ };
+
+ PB_ASSOC_CLASS_T_DEC
+ PB_ASSOC_CLASS_C_DEC::
+ ranged_probe_fn(size_type size)
+ {
+ Comb_Probe_Fn::notify_resized(size);
+ }
+
+ PB_ASSOC_CLASS_T_DEC
+ PB_ASSOC_CLASS_C_DEC::
+ ranged_probe_fn(size_type size, const Hash_Fn& r_hash_fn) :
+ Hash_Fn(r_hash_fn)
+ {
+ Comb_Probe_Fn::notify_resized(size);
+ }
+
+ PB_ASSOC_CLASS_T_DEC
+ PB_ASSOC_CLASS_C_DEC::
+ ranged_probe_fn(size_type size, const Hash_Fn& r_hash_fn, const Comb_Probe_Fn& r_comb_probe_fn) :
+ Hash_Fn(r_hash_fn),
+ Comb_Probe_Fn(r_comb_probe_fn)
+ {
+ my_comb_probe_fn_base::notify_resized(size);
+ }
+
+ PB_ASSOC_CLASS_T_DEC
+ PB_ASSOC_CLASS_C_DEC::
+ ranged_probe_fn(size_type size, const Hash_Fn& r_hash_fn, const Comb_Probe_Fn& r_comb_probe_fn, const Probe_Fn& r_probe_fn) :
+ Hash_Fn(r_hash_fn),
+ Comb_Probe_Fn(r_comb_probe_fn),
+ Probe_Fn(r_probe_fn)
+ {
+ my_comb_probe_fn_base::notify_resized(size);
+ }
+
+ PB_ASSOC_CLASS_T_DEC
+ void
+ PB_ASSOC_CLASS_C_DEC::
+ swap(PB_ASSOC_CLASS_C_DEC& r_other)
+ {
+ my_comb_probe_fn_base::swap(r_other);
+
+ std::swap((Hash_Fn& )(*this), (Hash_Fn& )r_other);
+ }
+
+ PB_ASSOC_CLASS_T_DEC
+ void
+ PB_ASSOC_CLASS_C_DEC::
+ notify_resized(size_type size)
+ {
+ my_comb_probe_fn_base::notify_resized(size);
+ }
+
+ PB_ASSOC_CLASS_T_DEC
+ inline typename PB_ASSOC_CLASS_C_DEC::comp_hash
+ PB_ASSOC_CLASS_C_DEC::
+ operator()(const_key_reference r_key) const
+ {
+ const size_type hash = my_hash_fn_base::operator()(r_key);
+
+ return (std::make_pair(my_comb_probe_fn_base::operator()(hash), hash));
+ }
+
+ PB_ASSOC_CLASS_T_DEC
+ inline typename PB_ASSOC_CLASS_C_DEC::size_type
+ PB_ASSOC_CLASS_C_DEC::
+ operator()(const_key_reference r_key, size_type hash, size_type i) const
+ {
+ return (my_comb_probe_fn_base::operator()(
+ hash + my_probe_fn_base::operator()(r_key, i)));
+ }
+
+ PB_ASSOC_CLASS_T_DEC
+ inline typename PB_ASSOC_CLASS_C_DEC::size_type
+ PB_ASSOC_CLASS_C_DEC::
+ operator()
+#ifdef PB_ASSOC_RANGED_PROBE_FN_DEBUG
+ (const_key_reference r_key, size_type hash) const
+#else // #ifdef PB_ASSOC_RANGED_PROBE_FN_DEBUG
+ (const_key_reference /*r_key*/, size_type hash) const
+#endif // #ifdef PB_ASSOC_RANGED_PROBE_FN_DEBUG
+ {
+ PB_ASSOC_DBG_ASSERT(hash == my_hash_fn_base::operator()(r_key));
+
+ return (hash);
+ }
+
+#undef PB_ASSOC_CLASS_T_DEC
+#undef PB_ASSOC_CLASS_C_DEC
+
+#define PB_ASSOC_CLASS_T_DEC \
+ template<typename Key, class Allocator, class Comb_Probe_Fn>
+
+#define PB_ASSOC_CLASS_C_DEC \
+ ranged_probe_fn< \
+ Key, \
+ null_hash_fn, \
+ Allocator, \
+ Comb_Probe_Fn, \
+ null_probe_fn, \
+ false>
+
+ /**
+ * Specialization 3 and 4- The client does not supply a hash function or
+ * probe function, and requests that hash values not be stored.
+ **/
+ template<typename Key, class Allocator, class Comb_Probe_Fn>
+ class ranged_probe_fn<
+ Key,
+ null_hash_fn,
+ Allocator,
+ Comb_Probe_Fn,
+ null_probe_fn,
+ false> :
+ public Comb_Probe_Fn,
+ public null_hash_fn,
+ public null_probe_fn
+ {
+ protected:
+ typedef typename Allocator::size_type size_type;
+
+ typedef Comb_Probe_Fn my_comb_probe_fn_base;
+
+ typedef typename Allocator::template rebind<Key>::other key_allocator;
+
+ typedef typename key_allocator::const_reference const_key_reference;
+
+ protected:
+ ranged_probe_fn(size_type size);
+
+ ranged_probe_fn(size_type size, const Comb_Probe_Fn& r_comb_probe_fn);
+
+ ranged_probe_fn(size_type size, const null_hash_fn& r_null_hash_fn, const Comb_Probe_Fn& r_comb_probe_fn, const null_probe_fn& r_null_probe_fn);
+
+ void
+ swap(PB_ASSOC_CLASS_C_DEC& r_other);
+ };
+
+ PB_ASSOC_CLASS_T_DEC
+ PB_ASSOC_CLASS_C_DEC::
+ ranged_probe_fn(size_type size)
+ {
+ Comb_Probe_Fn::notify_resized(size);
+ }
+
+ PB_ASSOC_CLASS_T_DEC
+ PB_ASSOC_CLASS_C_DEC::
+ ranged_probe_fn(size_type size, const Comb_Probe_Fn& r_comb_probe_fn) :
+ Comb_Probe_Fn(r_comb_probe_fn)
+ { }
+
+ PB_ASSOC_CLASS_T_DEC
+ PB_ASSOC_CLASS_C_DEC::
+ ranged_probe_fn(size_type size, const null_hash_fn& r_null_hash_fn, const Comb_Probe_Fn& r_comb_probe_fn, const null_probe_fn& r_null_probe_fn) :
+ Comb_Probe_Fn(r_comb_probe_fn)
+ { }
+
+ PB_ASSOC_CLASS_T_DEC
+ void
+ PB_ASSOC_CLASS_C_DEC::
+ swap(PB_ASSOC_CLASS_C_DEC& r_other)
+ {
+ my_comb_probe_fn_base::swap(r_other);
+ }
+
+#undef PB_ASSOC_CLASS_T_DEC
+#undef PB_ASSOC_CLASS_C_DEC
+
+#undef PB_ASSOC_DBG_ASSERT
+#undef PB_ASSOC_DBG_VERIFY
+#undef PB_ASSOC_DBG_ONLY
+
+ } // namespace detail
+
+} // namespace pb_assoc
+
+#endif // #ifndef RANGED_PROBE_FN_HPP
+
diff --git a/libstdc++-v3/include/ext/pb_assoc/detail/hash_types_traits.hpp b/libstdc++-v3/include/ext/pb_assoc/detail/hash_types_traits.hpp
new file mode 100644
index 00000000000..0caf6226431
--- /dev/null
+++ b/libstdc++-v3/include/ext/pb_assoc/detail/hash_types_traits.hpp
@@ -0,0 +1,94 @@
+// -*- C++ -*-
+
+// 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.
+
+// As a special exception, you may use this file as part of a free software
+// library without restriction. Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General 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 types_traits.hpp
+ * Contains a traits class of types used by containers.
+ */
+
+#ifndef HASH_TYPES_TRAITS
+#define HASH_TYPES_TRAITS
+
+#include <ext/pb_assoc/detail/type_utils.hpp>
+
+namespace pb_assoc
+{
+
+ namespace detail
+ {
+
+#define PB_ASSOC_CLASS_T_DEC \
+ template<typename Size_Type, bool Store_Hash>
+
+#define PB_ASSOC_CLASS_C_DEC \
+ hash_types_traits< \
+ Size_Type, \
+ Store_Hash>
+
+ template<typename Size_Type, bool Store_Hash>
+ struct hash_types_traits
+ {
+ public:
+ typedef
+ typename cond_type<
+ Store_Hash,
+ std::pair<Size_Type, Size_Type>,
+ Size_Type>::type
+ comp_hash;
+
+ typedef int_to_type<false> store_hash_false_indicator;
+
+ typedef int_to_type<true> store_hash_true_indicator;
+
+ static pb_assoc::detail::int_to_type<Store_Hash>
+ s_store_hash_indicator;
+ };
+
+ PB_ASSOC_CLASS_T_DEC
+ pb_assoc::detail::int_to_type<Store_Hash>
+ PB_ASSOC_CLASS_C_DEC::s_store_hash_indicator;
+
+#undef PB_ASSOC_CLASS_T_DEC
+#undef PB_ASSOC_CLASS_C_DEC
+
+ } // namespace detail
+
+} // namespace pb_assoc
+
+#endif // #ifndef HASH_TYPES_TRAITS
diff --git a/libstdc++-v3/include/ext/pb_assoc/detail/lu_assoc_cntnr/constructor_destructor_fn_imps.hpp b/libstdc++-v3/include/ext/pb_assoc/detail/lu_assoc_cntnr/constructor_destructor_fn_imps.hpp
new file mode 100644
index 00000000000..03eae597470
--- /dev/null
+++ b/libstdc++-v3/include/ext/pb_assoc/detail/lu_assoc_cntnr/constructor_destructor_fn_imps.hpp
@@ -0,0 +1,121 @@
+// -*- C++ -*-
+
+// 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.
+
+// As a special exception, you may use this file as part of a free software
+// library without restriction. Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General 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 constructor_destructor_fn_imps.hpp
+ * Contains implementations of lu's constructors, destructor,
+ * and related functions.
+ */
+
+PB_ASSOC_CLASS_T_DEC
+PB_ASSOC_CLASS_C_DEC::
+lu_assoc_cntnr()
+{ }
+
+PB_ASSOC_CLASS_T_DEC
+PB_ASSOC_CLASS_C_DEC::
+lu_assoc_cntnr(const Eq_Fn& r_eq_fn) :
+ my_base(r_eq_fn)
+{ }
+
+PB_ASSOC_CLASS_T_DEC
+PB_ASSOC_CLASS_C_DEC::
+lu_assoc_cntnr(const Eq_Fn& r_eq_fn, const Update_Policy& r_update_policy) :
+ my_base(r_eq_fn, r_update_policy)
+{ }
+
+PB_ASSOC_CLASS_T_DEC
+template<class It>
+PB_ASSOC_CLASS_C_DEC::
+lu_assoc_cntnr(It first_it, It last_it)
+{
+ my_base::copy_from_range(first_it, last_it);
+}
+
+PB_ASSOC_CLASS_T_DEC
+template<class It>
+PB_ASSOC_CLASS_C_DEC::
+lu_assoc_cntnr(It first_it, It last_it, const Eq_Fn& r_eq_fn) :
+ my_base(r_eq_fn)
+{
+ my_base::copy_from_range(first_it, last_it);
+}
+
+PB_ASSOC_CLASS_T_DEC
+template<class It>
+PB_ASSOC_CLASS_C_DEC::
+lu_assoc_cntnr(It first_it, It last_it, const Eq_Fn& r_eq_fn, const Update_Policy& r_update_policy) :
+ my_base(r_eq_fn, r_update_policy)
+{
+ my_base::copy_from_range(first_it, last_it);
+}
+
+PB_ASSOC_CLASS_T_DEC
+PB_ASSOC_CLASS_C_DEC::
+lu_assoc_cntnr(const PB_ASSOC_CLASS_C_DEC& r_other) :
+ my_base((const my_base& )(r_other))
+{ }
+
+PB_ASSOC_CLASS_T_DEC
+PB_ASSOC_CLASS_C_DEC::
+~lu_assoc_cntnr()
+{ }
+
+PB_ASSOC_CLASS_T_DEC
+PB_ASSOC_CLASS_C_DEC&
+PB_ASSOC_CLASS_C_DEC::
+operator=(const PB_ASSOC_CLASS_C_DEC& r_other)
+{
+ if (this !=& r_other)
+ {
+ PB_ASSOC_CLASS_C_DEC tmp(r_other);
+
+ swap(tmp);
+ }
+
+ return (*this);
+}
+
+PB_ASSOC_CLASS_T_DEC
+void
+PB_ASSOC_CLASS_C_DEC::
+swap(PB_ASSOC_CLASS_C_DEC& r_other)
+{
+ my_base::swap(r_other);
+}
diff --git a/libstdc++-v3/include/ext/pb_assoc/detail/lu_assoc_cntnr/policy_access_fn_imps.hpp b/libstdc++-v3/include/ext/pb_assoc/detail/lu_assoc_cntnr/policy_access_fn_imps.hpp
new file mode 100644
index 00000000000..0c2035e35e8
--- /dev/null
+++ b/libstdc++-v3/include/ext/pb_assoc/detail/lu_assoc_cntnr/policy_access_fn_imps.hpp
@@ -0,0 +1,77 @@
+// -*- C++ -*-
+
+// 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.
+
+// As a special exception, you may use this file as part of a free software
+// library without restriction. Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General 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 policy_access_fn_imps.hpp
+ * Contains implementations of lu_map_'s policy access
+ * functions.
+ */
+
+PB_ASSOC_CLASS_T_DEC
+Eq_Fn&
+PB_ASSOC_CLASS_C_DEC::
+get_eq_fn()
+{
+ return (my_base::get_eq_fn());
+}
+
+PB_ASSOC_CLASS_T_DEC
+const Eq_Fn&
+PB_ASSOC_CLASS_C_DEC::
+get_eq_fn() const
+{
+ return (my_base::get_eq_fn());
+}
+
+PB_ASSOC_CLASS_T_DEC
+Update_Policy&
+PB_ASSOC_CLASS_C_DEC::
+get_update_policy()
+{
+ return (*this);
+}
+
+PB_ASSOC_CLASS_T_DEC
+const Update_Policy&
+PB_ASSOC_CLASS_C_DEC::
+get_update_policy() const
+{
+ return (*this);
+}
+
diff --git a/libstdc++-v3/include/ext/pb_assoc/detail/lu_map_/constructor_destructor_fn_imps.hpp b/libstdc++-v3/include/ext/pb_assoc/detail/lu_map_/constructor_destructor_fn_imps.hpp
new file mode 100644
index 00000000000..ed75adaa3ec
--- /dev/null
+++ b/libstdc++-v3/include/ext/pb_assoc/detail/lu_map_/constructor_destructor_fn_imps.hpp
@@ -0,0 +1,178 @@
+// -*- C++ -*-
+
+// 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.
+
+// As a special exception, you may use this file as part of a free software
+// library without restriction. Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General 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 constructor_destructor_fn_imps.hpp
+ * Contains implementations of PB_ASSOC_CLASS_NAME.
+ */
+
+PB_ASSOC_CLASS_T_DEC
+typename PB_ASSOC_CLASS_C_DEC::entry_allocator
+PB_ASSOC_CLASS_C_DEC::s_entry_allocator;
+
+PB_ASSOC_CLASS_T_DEC
+template<class It>
+void
+PB_ASSOC_CLASS_C_DEC::
+copy_from_range(It first_it, It last_it)
+{
+ while (first_it != last_it)
+ insert(*(first_it++));
+}
+
+PB_ASSOC_CLASS_T_DEC
+PB_ASSOC_CLASS_C_DEC::
+PB_ASSOC_CLASS_NAME() :
+ m_p_l(s_entry_allocator.allocate(1)),
+ m_size(0)
+{
+ initialize();
+
+ PB_ASSOC_DBG_ONLY(assert_valid();)
+ }
+
+PB_ASSOC_CLASS_T_DEC
+PB_ASSOC_CLASS_C_DEC::
+PB_ASSOC_CLASS_NAME(const Eq_Fn& r_eq_fn) :
+ Eq_Fn(r_eq_fn),
+ m_p_l(s_entry_allocator.allocate(1)),
+ m_size(0)
+{
+ initialize();
+
+ PB_ASSOC_DBG_ONLY(assert_valid();)
+ }
+
+PB_ASSOC_CLASS_T_DEC
+PB_ASSOC_CLASS_C_DEC::
+PB_ASSOC_CLASS_NAME(const Eq_Fn& r_eq_fn, const Update_Policy& r_update_policy) :
+ Eq_Fn(r_eq_fn),
+ Update_Policy(r_update_policy),
+ m_p_l(s_entry_allocator.allocate(1)),
+ m_size(0)
+{
+ initialize();
+
+ PB_ASSOC_DBG_ONLY(assert_valid();)
+ }
+
+PB_ASSOC_CLASS_T_DEC
+PB_ASSOC_CLASS_C_DEC::
+PB_ASSOC_CLASS_NAME(const PB_ASSOC_CLASS_C_DEC& r_other) :
+ Eq_Fn(r_other),
+ Update_Policy(r_other),
+ m_p_l(s_entry_allocator.allocate(1)),
+ m_size(0)
+{
+ initialize();
+
+ try
+ {
+ copy_from_range(r_other.begin(), r_other.end());
+ }
+ catch(...)
+ {
+ deallocate_all(true);
+
+ throw;
+ }
+
+ PB_ASSOC_DBG_ONLY(assert_valid();)
+ }
+
+PB_ASSOC_CLASS_T_DEC
+void
+PB_ASSOC_CLASS_C_DEC::
+swap(PB_ASSOC_CLASS_C_DEC& r_other)
+{
+ PB_ASSOC_DBG_ONLY(assert_valid();)
+ PB_ASSOC_DBG_ONLY(r_other.assert_valid();)
+
+ std::swap(m_p_l, r_other.m_p_l);
+
+ std::swap(m_size, r_other.m_size);
+
+ std::swap((Eq_Fn& )(*this), (Eq_Fn& )r_other);
+
+ Update_Policy::swap(r_other);
+
+ PB_ASSOC_DBG_ONLY(my_map_debug_base::swap(r_other);)
+
+ PB_ASSOC_DBG_ONLY(assert_valid();)
+ PB_ASSOC_DBG_ONLY(r_other.assert_valid();)
+ }
+
+PB_ASSOC_CLASS_T_DEC
+void
+PB_ASSOC_CLASS_C_DEC::
+deallocate_all(bool deallocate_root)
+{
+ entry_pointer p_l = m_p_l->m_p_next;
+
+ while (p_l != NULL)
+ {
+ entry_pointer p_next_l = p_l->m_p_next;
+
+ p_l->~entry();
+
+ s_entry_allocator.deallocate(p_l, 1);
+
+ p_l = p_next_l;
+ }
+
+ if (deallocate_root)
+ s_entry_allocator.deallocate(m_p_l, 1);
+ else
+ m_p_l->m_p_next = NULL;
+}
+
+PB_ASSOC_CLASS_T_DEC
+PB_ASSOC_CLASS_C_DEC::
+~PB_ASSOC_CLASS_NAME()
+{
+ deallocate_all(true);
+}
+
+PB_ASSOC_CLASS_T_DEC
+void
+PB_ASSOC_CLASS_C_DEC::
+initialize()
+{
+ m_p_l->m_p_next = NULL;
+}
diff --git a/libstdc++-v3/testsuite/performance/23_containers/set_create_from_sorted.cc b/libstdc++-v3/include/ext/pb_assoc/detail/lu_map_/debug_fn_imps.hpp
index 17eaadd0b78..23b893de8c1 100644
--- a/libstdc++-v3/testsuite/performance/23_containers/set_create_from_sorted.cc
+++ b/libstdc++-v3/include/ext/pb_assoc/detail/lu_map_/debug_fn_imps.hpp
@@ -1,3 +1,5 @@
+// -*- C++ -*-
+
// Copyright (C) 2005 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
@@ -25,40 +27,40 @@
// invalidate any other reasons why the executable file might be covered by
// the GNU General Public License.
-#include <vector>
-#include <set>
-#include <sstream>
-#include <testsuite_performance.h>
+// Copyright (C) 2004 Ami Tavory and Vladimir Dreizin, IBM-HRL.
-static const unsigned max_size = 1000000; // avoid excessive swap file use!
-static const unsigned iterations = 10; // make results less random while
-static const unsigned step = 50000; // keeping the total time reasonable
+// 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.
-// libstdc++/19422
-int main()
-{
- using namespace std;
- using namespace __gnu_test;
- time_counter time;
- resource_counter resource;
+/**
+ * @file debug_fn_imps.hpp
+ * Contains implementations of cc_ht_map_'s debug-mode functions.
+ */
- typedef set<unsigned> the_set;
+#ifdef PB_ASSOC_LU_MAP_DEBUG_
- vector<unsigned> v(max_size, 0);
- for (unsigned i = 0; i != max_size; ++i)
- v[i] = i; // initialize sorted array
+PB_ASSOC_CLASS_T_DEC
+void
+PB_ASSOC_CLASS_C_DEC::
+assert_valid() const
+{
+ size_type calc_size = 0;
- for (unsigned count = step; count <= max_size; count += step)
+ for (const_iterator it = begin(); it != end(); ++it)
{
- ostringstream oss;
- oss << count;
+ my_map_debug_base::check_key_exists(PB_ASSOC_V2F(*it));
- // measure set construction time (linear in count (Table 69))
- start_counters(time, resource);
- for (unsigned i = 0; i != iterations; ++i)
- the_set(v.begin(), v.begin() + count);
- stop_counters(time, resource);
- report_performance(__FILE__, oss.str(), time, resource);
- clear_counters(time, resource);
+ ++calc_size;
}
+
+ PB_ASSOC_DBG_ASSERT(calc_size == m_size);
+
+ my_map_debug_base::check_size(m_size);
}
+
+#endif // #ifdef PB_ASSOC_LU_MAP_DEBUG_
diff --git a/libstdc++-v3/include/ext/pb_assoc/detail/lu_map_/erase_fn_imps.hpp b/libstdc++-v3/include/ext/pb_assoc/detail/lu_map_/erase_fn_imps.hpp
new file mode 100644
index 00000000000..f4fc90b75f0
--- /dev/null
+++ b/libstdc++-v3/include/ext/pb_assoc/detail/lu_map_/erase_fn_imps.hpp
@@ -0,0 +1,129 @@
+// -*- C++ -*-
+
+// 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.
+
+// As a special exception, you may use this file as part of a free software
+// library without restriction. Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General 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 erase_fn_imps.hpp
+ * Contains implementations of lu_map_.
+ */
+
+PB_ASSOC_CLASS_T_DEC
+inline typename PB_ASSOC_CLASS_C_DEC::size_type
+PB_ASSOC_CLASS_C_DEC::
+erase(const_key_reference r_key)
+{
+ PB_ASSOC_DBG_ONLY(PB_ASSOC_CLASS_C_DEC::assert_valid();)
+
+ entry_pointer p_l = find_imp(r_key);
+
+ if (p_l->m_p_next == NULL)
+ return (0);
+
+ erase_imp(p_l);
+
+ PB_ASSOC_DBG_ONLY(assert_valid();)
+
+ return (1);
+}
+
+PB_ASSOC_CLASS_T_DEC
+void
+PB_ASSOC_CLASS_C_DEC::
+clear()
+{
+ PB_ASSOC_DBG_ONLY(assert_valid();)
+
+ PB_ASSOC_DBG_ONLY(my_map_debug_base::clear();)
+
+ deallocate_all(false);
+
+ m_size = 0;
+
+ PB_ASSOC_DBG_ONLY(assert_valid();)
+ }
+
+PB_ASSOC_CLASS_T_DEC
+template<class Pred>
+inline typename PB_ASSOC_CLASS_C_DEC::size_type
+PB_ASSOC_CLASS_C_DEC::
+erase_if(Pred& r_pred)
+{
+ PB_ASSOC_DBG_ONLY(PB_ASSOC_CLASS_C_DEC::assert_valid();)
+
+ size_type num_ersd = 0;
+
+ entry_pointer p_l = m_p_l;
+
+ while (p_l->m_p_next != NULL)
+ {
+ if (r_pred(p_l->m_p_next->m_value))
+ {
+ erase_imp(p_l);
+
+ ++num_ersd;
+ }
+ else
+ p_l = p_l->m_p_next;
+ }
+
+ PB_ASSOC_DBG_ONLY(PB_ASSOC_CLASS_C_DEC::assert_valid();)
+
+ return (num_ersd);
+}
+
+PB_ASSOC_CLASS_T_DEC
+void
+PB_ASSOC_CLASS_C_DEC::
+erase_imp(entry_pointer p_l)
+{
+ PB_ASSOC_DBG_ASSERT(p_l->m_p_next != NULL);
+
+ entry_pointer p_next_l = p_l->m_p_next->m_p_next;
+
+ PB_ASSOC_DBG_ONLY(my_map_debug_base::erase_existing(
+ PB_ASSOC_V2F(p_l->m_p_next->m_value));)
+
+ p_l->m_p_next->m_value.~mapped_value_type();
+
+ s_entry_allocator.deallocate(p_l->m_p_next, 1);
+
+ p_l->m_p_next = p_next_l;
+
+ PB_ASSOC_DBG_ASSERT(m_size > 0);
+ --m_size;
+}
diff --git a/libstdc++-v3/include/ext/pb_assoc/detail/lu_map_/find_fn_imps.hpp b/libstdc++-v3/include/ext/pb_assoc/detail/lu_map_/find_fn_imps.hpp
new file mode 100644
index 00000000000..af6901340b5
--- /dev/null
+++ b/libstdc++-v3/include/ext/pb_assoc/detail/lu_map_/find_fn_imps.hpp
@@ -0,0 +1,136 @@
+// -*- C++ -*-
+
+// 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.
+
+// As a special exception, you may use this file as part of a free software
+// library without restriction. Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General 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 find_fn_imps.hpp
+ * Contains implementations of lu_map_.
+ */
+
+PB_ASSOC_CLASS_T_DEC
+inline typename PB_ASSOC_CLASS_C_DEC::find_iterator
+PB_ASSOC_CLASS_C_DEC::
+find_end()
+{
+ return (NULL);
+}
+
+PB_ASSOC_CLASS_T_DEC
+inline typename PB_ASSOC_CLASS_C_DEC::const_find_iterator
+PB_ASSOC_CLASS_C_DEC::
+find_end() const
+{
+ return (NULL);
+}
+
+PB_ASSOC_CLASS_T_DEC
+inline void
+PB_ASSOC_CLASS_C_DEC::
+move_next_to_front(entry_pointer p_l) const
+{
+ entry_pointer p_move_l = p_l->m_p_next;
+
+ PB_ASSOC_DBG_ASSERT(p_move_l != NULL);
+
+ p_l->m_p_next = p_move_l->m_p_next;
+
+ p_move_l->m_p_next = m_p_l->m_p_next;
+
+ m_p_l->m_p_next = p_move_l;
+}
+
+#ifdef PB_ASSOC_DATA_TRUE_INDICATOR
+PB_ASSOC_CLASS_T_DEC
+inline typename PB_ASSOC_CLASS_C_DEC::const_data_reference
+PB_ASSOC_CLASS_C_DEC::
+const_subscript_imp(const_key_reference r_key) const
+{
+ entry_pointer p_l = find_imp(r_key);
+
+ PB_ASSOC_DBG_ASSERT(p_l->m_p_next != NULL)
+
+ if (Update_Policy::operator()(p_l->m_update_metadata))
+ {
+ move_next_to_front(p_l);
+
+ return (m_p_l->m_p_next->m_value.second);
+ }
+ else
+ return (p_l->m_p_next->m_value.second);
+}
+#endif // #ifdef PB_ASSOC_DATA_TRUE_INDICATOR
+
+PB_ASSOC_CLASS_T_DEC
+inline typename PB_ASSOC_CLASS_C_DEC::find_iterator
+PB_ASSOC_CLASS_C_DEC::find(const_key_reference r_key)
+{
+ PB_ASSOC_DBG_ONLY(assert_valid();)
+
+ entry_pointer p_l = find_imp(r_key);
+
+ if (p_l->m_p_next != NULL)
+ {
+ PB_ASSOC_DBG_ONLY(assert_valid();)
+
+ return (&p_l->m_p_next->m_value);
+ }
+
+ PB_ASSOC_DBG_ONLY(assert_valid();)
+
+ return (find_end());
+}
+
+PB_ASSOC_CLASS_T_DEC
+inline typename PB_ASSOC_CLASS_C_DEC::const_find_iterator
+PB_ASSOC_CLASS_C_DEC::find(const_key_reference r_key) const
+{
+ PB_ASSOC_DBG_ONLY(assert_valid();)
+
+ entry_pointer p_l = find_imp(r_key);
+
+ if (p_l->m_p_next != NULL)
+ {
+ PB_ASSOC_DBG_ONLY(assert_valid();)
+
+ return (&m_p_l->m_p_next->m_value);
+ }
+
+ PB_ASSOC_DBG_ONLY(assert_valid();)
+
+ return (find_end());
+}
diff --git a/libstdc++-v3/include/ext/pb_assoc/detail/lu_map_/info_fn_imps.hpp b/libstdc++-v3/include/ext/pb_assoc/detail/lu_map_/info_fn_imps.hpp
new file mode 100644
index 00000000000..761e2cbb258
--- /dev/null
+++ b/libstdc++-v3/include/ext/pb_assoc/detail/lu_map_/info_fn_imps.hpp
@@ -0,0 +1,67 @@
+// -*- C++ -*-
+
+// 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.
+
+// As a special exception, you may use this file as part of a free software
+// library without restriction. Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General 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 info_fn_imps.hpp
+ * Contains implementations of lu_map_.
+ */
+
+PB_ASSOC_CLASS_T_DEC
+inline typename PB_ASSOC_CLASS_C_DEC::size_type
+PB_ASSOC_CLASS_C_DEC::
+size() const
+{
+ return (m_size);
+}
+
+PB_ASSOC_CLASS_T_DEC
+inline typename PB_ASSOC_CLASS_C_DEC::size_type
+PB_ASSOC_CLASS_C_DEC::
+max_size() const
+{
+ return (s_entry_allocator.max_size());
+}
+
+PB_ASSOC_CLASS_T_DEC
+inline bool
+PB_ASSOC_CLASS_C_DEC::
+empty() const
+{
+ return (m_size == 0);
+}
diff --git a/libstdc++-v3/include/ext/pb_assoc/detail/lu_map_/insert_fn_imps.hpp b/libstdc++-v3/include/ext/pb_assoc/detail/lu_map_/insert_fn_imps.hpp
new file mode 100644
index 00000000000..7ead8cb16f4
--- /dev/null
+++ b/libstdc++-v3/include/ext/pb_assoc/detail/lu_map_/insert_fn_imps.hpp
@@ -0,0 +1,148 @@
+// -*- C++ -*-
+
+// 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.
+
+// As a special exception, you may use this file as part of a free software
+// library without restriction. Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General 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 insert_fn_imps.hpp
+ * Contains implementations of lu_map_.
+ */
+
+PB_ASSOC_CLASS_T_DEC
+inline std::pair<
+ typename PB_ASSOC_CLASS_C_DEC::find_iterator,
+ bool>
+PB_ASSOC_CLASS_C_DEC::
+insert(const_reference r_val)
+{
+ PB_ASSOC_DBG_ONLY(assert_valid();)
+
+ entry_pointer p_l = find_imp(PB_ASSOC_V2F(r_val));
+
+ bool found = true;
+
+ if (p_l->m_p_next == NULL)
+ {
+ found = false;
+
+ insert_new_after(p_l, r_val);
+ }
+
+ PB_ASSOC_DBG_ASSERT(Eq_Fn::operator()(
+ PB_ASSOC_V2F(p_l->m_p_next->m_value),
+ PB_ASSOC_V2F(r_val)));
+
+ PB_ASSOC_DBG_ONLY(assert_valid();)
+
+ if (Update_Policy::operator()(p_l->m_update_metadata))
+ {
+ move_next_to_front(p_l);
+
+ return (std::make_pair(
+ find_iterator(&m_p_l->m_p_next->m_value),
+ !found));
+ }
+ else
+ return (std::make_pair(
+ find_iterator(&p_l->m_p_next->m_value),
+ !found));
+}
+
+PB_ASSOC_CLASS_T_DEC
+inline void
+PB_ASSOC_CLASS_C_DEC::
+insert_new_after(entry_pointer p_l, const_reference r_val)
+{
+ PB_ASSOC_DBG_ONLY(my_map_debug_base::check_key_does_not_exist(
+ PB_ASSOC_V2F(r_val));)
+
+ entry_pointer p_new_l = s_entry_allocator.allocate(1);
+
+ cond_dealtor_t cond(p_new_l);
+
+ new (const_cast<void* >(
+ static_cast<const void* >(&p_new_l->m_value)))
+ value_type(r_val);
+
+ cond.set_no_action();
+
+ PB_ASSOC_DBG_ASSERT(p_l->m_p_next == NULL);
+ p_l->m_p_next = p_new_l;
+
+ p_new_l->m_p_next = NULL;
+
+ ++m_size;
+
+ PB_ASSOC_DBG_ONLY(my_map_debug_base::insert_new(PB_ASSOC_V2F(r_val));)
+ }
+
+#ifdef PB_ASSOC_DATA_TRUE_INDICATOR
+PB_ASSOC_CLASS_T_DEC
+inline typename PB_ASSOC_CLASS_C_DEC::data_reference
+PB_ASSOC_CLASS_C_DEC::
+subscript_imp(const_key_reference r_key)
+{
+ PB_ASSOC_DBG_ONLY(assert_valid();)
+
+ entry_pointer p_l = find_imp(r_key);
+
+ bool found = true;
+
+ if (p_l->m_p_next == NULL)
+ {
+ found = false;
+
+ insert_new_after(p_l, value_type(r_key, data_type()));
+ }
+
+ PB_ASSOC_DBG_ASSERT(Eq_Fn::operator()(
+ PB_ASSOC_V2F(p_l->m_p_next->m_value),
+ PB_ASSOC_V2F(r_val)));
+
+ PB_ASSOC_DBG_ONLY(assert_valid();)
+
+ if (Update_Policy::operator()(p_l->m_update_metadata))
+ {
+ move_next_to_front(p_l);
+
+ return (m_p_l->m_p_next->m_value.second);
+ }
+ else
+ return (p_l->m_p_next->m_value.second);
+}
+#endif // #ifdef PB_ASSOC_DATA_TRUE_INDICATOR
+
diff --git a/libstdc++-v3/include/ext/pb_assoc/detail/lu_map_/iterators_fn_imps.hpp b/libstdc++-v3/include/ext/pb_assoc/detail/lu_map_/iterators_fn_imps.hpp
new file mode 100644
index 00000000000..a3be722020a
--- /dev/null
+++ b/libstdc++-v3/include/ext/pb_assoc/detail/lu_map_/iterators_fn_imps.hpp
@@ -0,0 +1,106 @@
+// -*- C++ -*-
+
+// 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.
+
+// As a special exception, you may use this file as part of a free software
+// library without restriction. Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General 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 iterators_fn_imps.hpp
+ * Contains implementations of lu_map_.
+ */
+
+PB_ASSOC_CLASS_T_DEC
+inline typename PB_ASSOC_CLASS_C_DEC::iterator
+PB_ASSOC_CLASS_C_DEC::
+begin()
+{
+ if (m_size == 0)
+ {
+ PB_ASSOC_DBG_ASSERT(m_p_l->m_p_next == NULL);
+
+ return (end());
+ }
+
+ PB_ASSOC_DBG_ASSERT(m_p_l->m_p_next != NULL);
+
+ return (iterator(&m_p_l->m_p_next->m_value, m_p_l->m_p_next, this));
+}
+
+PB_ASSOC_CLASS_T_DEC
+inline typename PB_ASSOC_CLASS_C_DEC::const_iterator
+PB_ASSOC_CLASS_C_DEC::
+begin() const
+{
+ if (m_size == 0)
+ {
+ PB_ASSOC_DBG_ASSERT(m_p_l->m_p_next == NULL);
+
+ return (end());
+ }
+
+ PB_ASSOC_DBG_ASSERT(m_p_l->m_p_next != NULL);
+
+ return (iterator(&m_p_l->m_p_next->m_value, m_p_l->m_p_next,
+ const_cast<PB_ASSOC_CLASS_C_DEC* >(this)));
+}
+
+PB_ASSOC_CLASS_T_DEC
+inline typename PB_ASSOC_CLASS_C_DEC::iterator
+PB_ASSOC_CLASS_C_DEC::
+end()
+{
+ return (iterator(NULL, NULL, this));
+}
+
+PB_ASSOC_CLASS_T_DEC
+inline typename PB_ASSOC_CLASS_C_DEC::const_iterator
+PB_ASSOC_CLASS_C_DEC::
+end() const
+{
+ return (const_iterator(NULL, NULL,
+ const_cast<PB_ASSOC_CLASS_C_DEC* const>(this)));
+}
+
+PB_ASSOC_CLASS_T_DEC
+void
+PB_ASSOC_CLASS_C_DEC::
+inc_it_state(const_mapped_pointer& r_p_value, entry_pointer& r_pos) const
+{
+ r_pos = r_pos->m_p_next;
+
+ r_p_value = (r_pos == NULL)? NULL :& r_pos->m_value;
+}
+
diff --git a/libstdc++-v3/include/ext/pb_assoc/detail/lu_map_/lu_map_.hpp b/libstdc++-v3/include/ext/pb_assoc/detail/lu_map_/lu_map_.hpp
new file mode 100644
index 00000000000..21316e72a27
--- /dev/null
+++ b/libstdc++-v3/include/ext/pb_assoc/detail/lu_map_/lu_map_.hpp
@@ -0,0 +1,464 @@
+// -*- C++ -*-
+
+// 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.
+
+// As a special exception, you may use this file as part of a free software
+// library without restriction. Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General 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 lu_map_.hpp
+ * Contains a list update map.
+ */
+
+#include <utility>
+#include <iterator>
+#include <ext/pb_assoc/detail/cond_dealtor.hpp>
+#include <ext/pb_assoc/trivial_iterator_def.hpp>
+#include <ext/pb_assoc/detail/types_traits.hpp>
+#include <ext/pb_assoc/exception.hpp>
+#include <ext/pb_assoc/detail/map_debug_base.hpp>
+
+namespace pb_assoc
+{
+
+ namespace detail
+ {
+
+#ifdef PB_ASSOC_LU_MAP_DEBUG_
+#define PB_ASSOC_DBG_ASSERT(X) assert(X)
+#define PB_ASSOC_DBG_VERIFY(X) assert(X)
+#define PB_ASSOC_DBG_ONLY(X) X
+#else // #ifdef PB_ASSOC_LU_MAP_DEBUG_
+#define PB_ASSOC_DBG_ASSERT(X)
+#define PB_ASSOC_DBG_VERIFY(X) {if((X)==0);}
+#define PB_ASSOC_DBG_ONLY(X) ;
+#endif // #ifdef PB_ASSOC_LU_MAP_DEBUG_
+
+#define PB_ASSOC_CLASS_T_DEC \
+ template< \
+ typename Key, \
+ typename Data, \
+ class Eq_Fn, \
+ class Allocator, \
+ class Update_Policy>
+
+#ifdef PB_ASSOC_DATA_TRUE_INDICATOR
+#define PB_ASSOC_CLASS_NAME \
+ lu_map_data_
+#endif // #ifdef PB_ASSOC_DATA_TRUE_INDICATOR
+
+#ifdef PB_ASSOC_DATA_FALSE_INDICATOR
+#define PB_ASSOC_CLASS_NAME \
+ lu_map_no_data_
+#endif // #ifdef PB_ASSOC_DATA_FALSE_INDICATOR
+
+#define PB_ASSOC_CLASS_C_DEC \
+ PB_ASSOC_CLASS_NAME< \
+ Key, \
+ Data, \
+ Eq_Fn, \
+ Allocator, \
+ Update_Policy>
+
+#define PB_ASSOC_TYPES_TRAITS_C_DEC \
+ pb_assoc::detail::types_traits< \
+ Key, \
+ Data, \
+ Allocator>
+
+#ifdef PB_ASSOC_USE_MAP_DEBUG_BASE
+#define PB_ASSOC_MAP_DEBUG_BASE_C_DEC \
+ pb_assoc::detail::map_debug_base< \
+ Key, \
+ Eq_Fn>
+#endif // #ifdef PB_ASSOC_USE_MAP_DEBUG_BASE
+
+#ifdef PB_ASSOC_DATA_TRUE_INDICATOR
+#define PB_ASSOC_V2F(X) (X).first
+#define PB_ASSOC_V2S(X) (X).second
+#define PB_ASSOC_EP2VP(X)& ((X)->m_value)
+#endif // #ifdef PB_ASSOC_DATA_TRUE_INDICATOR
+
+#ifdef PB_ASSOC_DATA_FALSE_INDICATOR
+#define PB_ASSOC_V2F(X) (X)
+#define PB_ASSOC_V2S(X) Data()
+#define PB_ASSOC_EP2VP(X)& ((X)->m_value.first)
+#endif // #ifdef PB_ASSOC_DATA_FALSE_INDICATOR
+
+#ifdef PB_ASSOC_LU_MAP_DEBUG_
+#define PB_ASSOC_DBG_ASSERT(X) assert(X)
+#define PB_ASSOC_DBG_VERIFY(X) assert(X)
+#define PB_ASSOC_DBG_ONLY(X) X
+#else // #ifdef PB_ASSOC_LU_MAP_DEBUG_
+#define PB_ASSOC_DBG_ASSERT(X)
+#define PB_ASSOC_DBG_VERIFY(X) {if((X)==0);}
+#define PB_ASSOC_DBG_ONLY(X) ;
+#endif // #ifdef PB_ASSOC_LU_MAP_DEBUG_
+
+ /* Skip to the lu, my darling. */
+
+ template<typename Key,
+ typename Data,
+ class Eq_Fn,
+ class Allocator,
+ class Update_Policy>
+ class PB_ASSOC_CLASS_NAME :
+#ifdef PB_ASSOC_LU_MAP_DEBUG_
+ protected PB_ASSOC_MAP_DEBUG_BASE_C_DEC,
+#endif // #ifdef PB_ASSOC_LU_MAP_DEBUG_
+ public Eq_Fn,
+ public Update_Policy,
+ public PB_ASSOC_TYPES_TRAITS_C_DEC
+ {
+
+ protected:
+
+ typedef typename Allocator::size_type size_type;
+
+ typedef
+ typename PB_ASSOC_TYPES_TRAITS_C_DEC::const_key_reference
+ const_key_reference;
+
+#ifdef PB_ASSOC_DATA_TRUE_INDICATOR
+
+ typedef typename PB_ASSOC_TYPES_TRAITS_C_DEC::data_type data_type;
+
+ typedef
+ typename PB_ASSOC_TYPES_TRAITS_C_DEC::data_reference
+ data_reference;
+
+ typedef
+ typename PB_ASSOC_TYPES_TRAITS_C_DEC::const_data_reference
+ const_data_reference;
+
+#endif // #ifdef PB_ASSOC_DATA_TRUE_INDICATOR
+
+ typedef typename PB_ASSOC_TYPES_TRAITS_C_DEC::value_type value_type;
+
+ typedef typename PB_ASSOC_TYPES_TRAITS_C_DEC::pointer pointer;
+
+ typedef
+ typename PB_ASSOC_TYPES_TRAITS_C_DEC::const_pointer
+ const_pointer;
+
+ typedef typename PB_ASSOC_TYPES_TRAITS_C_DEC::reference reference;
+
+ typedef
+ typename PB_ASSOC_TYPES_TRAITS_C_DEC::const_reference
+ const_reference;
+
+ typedef Update_Policy update_policy;
+
+ typedef typename Update_Policy::metadata_type update_metadata;
+
+ struct entry
+ {
+ typename PB_ASSOC_TYPES_TRAITS_C_DEC::value_type m_value;
+
+ update_metadata m_update_metadata;
+
+ typename Allocator::template rebind<entry>::other::pointer m_p_next;
+ };
+
+ typedef
+ typename Allocator::template rebind<entry>::other
+ entry_allocator;
+
+ typedef typename entry_allocator::pointer entry_pointer;
+
+ typedef typename entry_allocator::const_pointer const_entry_pointer;
+
+ typedef typename entry_allocator::reference entry_reference;
+
+ typedef
+ typename entry_allocator::const_reference
+ const_entry_reference;
+
+ typedef
+ typename Allocator::template rebind<entry_pointer>::other
+ entry_pointer_allocator;
+
+ typedef typename entry_pointer_allocator::pointer entry_pointer_array;
+
+#define PB_ASSOC_GEN_POS entry_pointer
+
+ typedef value_type mapped_value_type;
+
+ typedef pointer mapped_pointer;
+
+ typedef const_pointer const_mapped_pointer;
+
+ typedef reference mapped_reference;
+
+ typedef const_reference const_mapped_reference;
+
+#include <ext/pb_assoc/detail/unordered_iterator/const_find_iterator.hpp>
+#include <ext/pb_assoc/detail/unordered_iterator/find_iterator.hpp>
+#include <ext/pb_assoc/detail/unordered_iterator/const_iterator.hpp>
+#include <ext/pb_assoc/detail/unordered_iterator/iterator.hpp>
+
+#undef PB_ASSOC_GEN_POS
+
+ typedef find_iterator_ find_iterator;
+
+ typedef const_find_iterator_ const_find_iterator;
+
+ typedef iterator_ iterator;
+
+ typedef const_iterator_ const_iterator;
+
+ typedef Eq_Fn eq_fn;
+
+ typedef Allocator allocator;
+
+ protected:
+
+ PB_ASSOC_CLASS_NAME();
+
+ PB_ASSOC_CLASS_NAME(const Eq_Fn& r_eq_fn);
+
+ PB_ASSOC_CLASS_NAME(const Eq_Fn& r_eq_fn, const Update_Policy& r_update_policy);
+
+ PB_ASSOC_CLASS_NAME(const PB_ASSOC_CLASS_C_DEC& r_other);
+
+ virtual
+ ~PB_ASSOC_CLASS_NAME();
+
+ void
+ swap(PB_ASSOC_CLASS_C_DEC& r_other);
+
+ template<class It>
+ void
+ copy_from_range(It first_it, It last_it);
+
+ inline size_type
+ size() const;
+
+ inline size_type
+ max_size() const;
+
+ inline bool
+ empty() const;
+
+ Eq_Fn&
+ get_eq_fn();
+
+ const Eq_Fn&
+ get_eq_fn() const;
+
+ inline std::pair<find_iterator, bool>
+ insert(const_reference r_val);
+
+#ifdef PB_ASSOC_DATA_TRUE_INDICATOR
+ inline data_reference
+ subscript_imp(const_key_reference r_key);
+#endif // #ifdef PB_ASSOC_DATA_TRUE_INDICATOR
+
+ inline find_iterator
+ find(const_key_reference r_key);
+
+ inline const_find_iterator
+ find(const_key_reference r_key) const;
+
+#ifdef PB_ASSOC_DATA_TRUE_INDICATOR
+ inline const_data_reference
+ const_subscript_imp(const_key_reference r_key) const;
+#endif // #ifdef PB_ASSOC_DATA_TRUE_INDICATOR
+
+ inline size_type
+ erase(const_key_reference r_key);
+
+ template<class Pred>
+ inline size_type
+ erase_if(Pred& r_pred);
+
+ void
+ clear();
+
+ inline iterator
+ begin();
+
+ inline const_iterator
+ begin() const;
+
+ inline iterator
+ end();
+
+ inline const_iterator
+ end() const;
+
+#ifdef PB_ASSOC_LU_MAP_DEBUG_
+
+ virtual void
+ assert_valid() const;
+
+#endif // #ifdef PB_ASSOC_LU_MAP_DEBUG_
+
+ private:
+
+ typedef PB_ASSOC_TYPES_TRAITS_C_DEC my_traits_base;
+
+#ifdef PB_ASSOC_USE_MAP_DEBUG_BASE
+ typedef PB_ASSOC_MAP_DEBUG_BASE_C_DEC my_map_debug_base;
+#endif // #ifdef PB_ASSOC_USE_MAP_DEBUG_BASE
+
+ typedef
+ pb_assoc::detail::cond_dealtor<
+ entry,
+ Allocator>
+ cond_dealtor_t;
+
+ private:
+
+ void
+ deallocate_all(bool deallocate_root);
+
+ inline void
+ move_next_to_front(entry_pointer p_l) const;
+
+ void
+ initialize();
+
+ inline void
+ insert_new_after(entry_pointer p_l, const_reference r_val);
+
+ inline entry_pointer
+ find_imp(const_key_reference r_key) const
+ {
+ entry_pointer p_l = m_p_l;
+
+ while (p_l->m_p_next != NULL)
+ if (Eq_Fn::operator()(
+ r_key,
+ PB_ASSOC_V2F(p_l->m_p_next->m_value)))
+ {
+ if (Update_Policy::operator()(p_l->m_update_metadata))
+ {
+ move_next_to_front(p_l);
+
+ return (m_p_l);
+ }
+ else
+ return (p_l);
+ }
+ else
+ p_l = p_l->m_p_next;
+
+ return (p_l);
+ }
+
+ inline void
+ erase_imp(entry_pointer p_l);
+
+ inline find_iterator
+ find_end();
+
+ inline const_find_iterator
+ find_end() const;
+
+ void
+ inc_it_state(pointer& r_p_value, std::pair<entry_pointer, size_type>& r_pos) const;
+
+ void
+ inc_it_state(const_pointer& r_p_value, entry_pointer& r_pos) const;
+
+ void
+ get_start_it_state(pointer& r_p_value, std::pair<entry_pointer, size_type>& r_pos) const;
+
+#ifdef PB_ASSOC_LU_MAP_DEBUG_
+
+ void
+ assert_entry_pointer_array_valid(const entry_pointer_array a_p_lntries) const;
+
+ void
+ assert_entry_pointer_valid(const entry_pointer p_l, store_hash_true_indicator) const;
+
+ void
+ assert_entry_pointer_valid(const entry_pointer p_l, store_hash_false_indicator) const;
+
+#endif // #ifdef PB_ASSOC_LU_MAP_DEBUG_
+
+ private:
+
+ static entry_allocator s_entry_allocator;
+
+ mutable entry_pointer m_p_l;
+
+ size_type m_size;
+
+ friend class iterator_;
+
+ friend class const_iterator_;
+
+ static iterator s_end_it;
+
+ static const_iterator s_const_end_it;
+
+ static find_iterator s_find_end_it;
+
+ static const_find_iterator s_const_find_end_it;
+
+ };
+
+#include <ext/pb_assoc/detail/lu_map_/constructor_destructor_fn_imps.hpp>
+#include <ext/pb_assoc/detail/lu_map_/info_fn_imps.hpp>
+#include <ext/pb_assoc/detail/lu_map_/debug_fn_imps.hpp>
+#include <ext/pb_assoc/detail/lu_map_/policy_access_fn_imps.hpp>
+#include <ext/pb_assoc/detail/lu_map_/iterators_fn_imps.hpp>
+#include <ext/pb_assoc/detail/lu_map_/erase_fn_imps.hpp>
+#include <ext/pb_assoc/detail/lu_map_/find_fn_imps.hpp>
+#include <ext/pb_assoc/detail/lu_map_/insert_fn_imps.hpp>
+
+#undef PB_ASSOC_CLASS_T_DEC
+
+#undef PB_ASSOC_CLASS_C_DEC
+
+#undef PB_ASSOC_TYPES_TRAITS_C_DEC
+
+#undef PB_ASSOC_MAP_DEBUG_BASE_C_DEC
+
+#undef PB_ASSOC_CLASS_NAME
+
+#undef PB_ASSOC_V2F
+#undef PB_ASSOC_EP2VP
+#undef PB_ASSOC_V2S
+
+#undef PB_ASSOC_DBG_ASSERT
+#undef PB_ASSOC_DBG_VERIFY
+#undef PB_ASSOC_DBG_ONLY
+
+ } // namespace detail
+
+} // namespace pb_assoc
diff --git a/libstdc++-v3/include/ext/pb_assoc/detail/lu_map_/policy_access_fn_imps.hpp b/libstdc++-v3/include/ext/pb_assoc/detail/lu_map_/policy_access_fn_imps.hpp
new file mode 100644
index 00000000000..c29194ba7e9
--- /dev/null
+++ b/libstdc++-v3/include/ext/pb_assoc/detail/lu_map_/policy_access_fn_imps.hpp
@@ -0,0 +1,60 @@
+// -*- C++ -*-
+
+// 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.
+
+// As a special exception, you may use this file as part of a free software
+// library without restriction. Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General 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 policy_access_fn_imps.hpp
+ * Contains implementations of lu_map_.
+ */
+
+PB_ASSOC_CLASS_T_DEC
+Eq_Fn&
+PB_ASSOC_CLASS_C_DEC::
+get_eq_fn()
+{
+ return (*this);
+}
+
+PB_ASSOC_CLASS_T_DEC
+const Eq_Fn&
+PB_ASSOC_CLASS_C_DEC::
+get_eq_fn() const
+{
+ return (*this);
+}
+
diff --git a/libstdc++-v3/include/ext/pb_assoc/detail/lu_policy/counter_lu_metadata_imp.hpp b/libstdc++-v3/include/ext/pb_assoc/detail/lu_policy/counter_lu_metadata_imp.hpp
new file mode 100644
index 00000000000..0a1348d9d87
--- /dev/null
+++ b/libstdc++-v3/include/ext/pb_assoc/detail/lu_policy/counter_lu_metadata_imp.hpp
@@ -0,0 +1,66 @@
+// -*- C++ -*-
+
+// 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.
+
+// As a special exception, you may use this file as part of a free software
+// library without restriction. Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General 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 counter_lu_metadata_imp.hpp
+ * Contains implementation of a lu counter policy's metadata.
+ */
+
+PB_ASSOC_CLASS_T_DEC
+counter_lu_metadata<
+ Size_Type>
+PB_ASSOC_CLASS_C_DEC::
+operator()(size_type m_max_count) const
+{
+ return (counter_lu_metadata<Size_Type>(rand() % m_max_count));
+}
+
+PB_ASSOC_CLASS_T_DEC
+template<typename Metadata_Reference>
+inline bool
+PB_ASSOC_CLASS_C_DEC::
+operator()(Metadata_Reference r_data, size_type m_max_count) const
+{
+ if (++r_data.m_count != m_max_count)
+ return (false);
+
+ r_data.m_count = 0;
+
+ return (true);
+}
diff --git a/libstdc++-v3/include/ext/pb_assoc/detail/lu_policy/counter_lu_policy_imp.hpp b/libstdc++-v3/include/ext/pb_assoc/detail/lu_policy/counter_lu_policy_imp.hpp
new file mode 100644
index 00000000000..392c16444cd
--- /dev/null
+++ b/libstdc++-v3/include/ext/pb_assoc/detail/lu_policy/counter_lu_policy_imp.hpp
@@ -0,0 +1,74 @@
+// -*- C++ -*-
+
+// 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.
+
+// As a special exception, you may use this file as part of a free software
+// library without restriction. Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General 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 counter_lu_policy_imp.hpp
+ * Contains a lu counter policy implementation.
+ */
+
+PB_ASSOC_CLASS_T_DEC
+PB_ASSOC_CLASS_C_DEC::
+counter_lu_policy(size_type max_count /*= 5*/) :
+ m_max_count(max_count)
+{ }
+
+PB_ASSOC_CLASS_T_DEC
+void
+PB_ASSOC_CLASS_C_DEC::
+swap(PB_ASSOC_CLASS_C_DEC& r_other)
+{
+ std::swap(m_max_count, r_other.m_max_count);
+}
+
+PB_ASSOC_CLASS_T_DEC
+counter_lu_metadata<
+ Size_Type>
+PB_ASSOC_CLASS_C_DEC::
+operator()() const
+{
+ return (my_base::operator()(m_max_count));
+}
+
+PB_ASSOC_CLASS_T_DEC
+bool
+PB_ASSOC_CLASS_C_DEC::
+operator()(metadata_reference r_data) const
+{
+ return (my_base::operator()(r_data, m_max_count));
+}
diff --git a/libstdc++-v3/include/ext/pb_assoc/detail/lu_policy/mtf_lu_policy_imp.hpp b/libstdc++-v3/include/ext/pb_assoc/detail/lu_policy/mtf_lu_policy_imp.hpp
new file mode 100644
index 00000000000..8204ce7ff27
--- /dev/null
+++ b/libstdc++-v3/include/ext/pb_assoc/detail/lu_policy/mtf_lu_policy_imp.hpp
@@ -0,0 +1,65 @@
+// -*- C++ -*-
+
+// 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.
+
+// As a special exception, you may use this file as part of a free software
+// library without restriction. Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General 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 mtf_lu_policy.hpp
+ * Contains a move-to-front policy implementation.
+ */
+
+PB_ASSOC_CLASS_T_DEC
+void
+PB_ASSOC_CLASS_C_DEC::
+swap(PB_ASSOC_CLASS_C_DEC& /*r_other*/)
+{ }
+
+PB_ASSOC_CLASS_T_DEC
+typename PB_ASSOC_CLASS_C_DEC::metadata_type
+PB_ASSOC_CLASS_C_DEC::
+operator()() const
+{
+ return (move_to_front_lu_metadata());
+}
+
+PB_ASSOC_CLASS_T_DEC
+inline bool
+PB_ASSOC_CLASS_C_DEC::
+operator()(metadata_reference /*r_data*/) const
+{
+ return (true);
+}
diff --git a/libstdc++-v3/include/ext/pb_assoc/detail/map_debug_base.hpp b/libstdc++-v3/include/ext/pb_assoc/detail/map_debug_base.hpp
new file mode 100644
index 00000000000..2f98a163d1a
--- /dev/null
+++ b/libstdc++-v3/include/ext/pb_assoc/detail/map_debug_base.hpp
@@ -0,0 +1,248 @@
+// -*- C++ -*-
+
+// 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.
+
+// As a special exception, you may use this file as part of a free software
+// library without restriction. Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General 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 MAP_DEBUG_BASE_HPP
+#define MAP_DEBUG_BASE_HPP
+
+#ifdef PB_ASSOC_USE_MAP_DEBUG_BASE
+
+#include <assert.h>
+#include <utility>
+#include <set>
+#include <pb_assoc/testsuite/regression/res_mng/dbg_ex_allocator_base.hpp>
+
+namespace pb_assoc
+{
+
+ namespace detail
+ {
+
+#ifdef PB_ASSOC_MAP_DEBUG_BASE_DEBUG
+#define PB_ASSOC_DBG_ASSERT(X) assert(X)
+#define PB_ASSOC_DBG_VERIFY(X) assert(X)
+#define PB_ASSOC_DBG_ONLY(X) X
+#else // #ifdef PB_ASSOC_MAP_DEBUG_BASE_DEBUG
+#define PB_ASSOC_DBG_ASSERT(X)
+#define PB_ASSOC_DBG_VERIFY(X) {if((X)==0);}
+#define PB_ASSOC_DBG_ONLY(X) ;
+#endif // #ifdef PB_ASSOC_MAP_DEBUG_BASE_DEBUG
+
+#define PB_ASSOC_CLASS_T_DEC \
+ template<typename Key, class Eq_Fn>
+
+#define PB_ASSOC_CLASS_C_DEC \
+ map_debug_base< \
+ Key, \
+ Eq_Fn>
+
+ template<typename Key, class Eq_Fn>
+ class map_debug_base
+ {
+ private:
+ typedef typename std::allocator<Key> key_allocator;
+
+ typedef typename key_allocator::size_type size_type;
+
+ typedef typename key_allocator::const_reference const_key_reference;
+
+ protected:
+ map_debug_base();
+
+ map_debug_base(const PB_ASSOC_CLASS_C_DEC& r_other);
+
+ ~map_debug_base();
+
+ inline void
+ insert_new(const_key_reference r_key);
+
+ inline void
+ insert_existing(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_ASSOC_CLASS_C_DEC& r_other);
+
+ private:
+ typedef std::set<Key> key_set;
+
+ private:
+ key_set m_key_set;
+ };
+
+ PB_ASSOC_CLASS_T_DEC
+ PB_ASSOC_CLASS_C_DEC::
+ map_debug_base()
+ {
+
+ }
+
+ PB_ASSOC_CLASS_T_DEC
+ PB_ASSOC_CLASS_C_DEC::
+ map_debug_base(const PB_ASSOC_CLASS_C_DEC& r_other) :
+ m_key_set(r_other.m_key_set)
+ { }
+
+ PB_ASSOC_CLASS_T_DEC
+ PB_ASSOC_CLASS_C_DEC::
+ ~map_debug_base()
+ { }
+
+ PB_ASSOC_CLASS_T_DEC
+ inline void
+ PB_ASSOC_CLASS_C_DEC::
+ insert_new(const_key_reference r_key)
+ {
+ const double orig_throw_prob =
+ pb_assoc::detail::test::dbg_ex_allocator_base().get_throw_prob();
+
+ pb_assoc::detail::test::dbg_ex_allocator_base().
+ set_throw_prob(0);
+
+ if (m_key_set.find(r_key) != m_key_set.end())
+ abort();
+
+ try
+ {
+ m_key_set.insert(r_key);
+ }
+ catch(...)
+ {
+ pb_assoc::detail::test::dbg_ex_allocator_base().
+ set_throw_prob(orig_throw_prob);
+
+ throw;
+ }
+
+ pb_assoc::detail::test::dbg_ex_allocator_base().
+ set_throw_prob(orig_throw_prob);
+ }
+
+ PB_ASSOC_CLASS_T_DEC
+ inline void
+ PB_ASSOC_CLASS_C_DEC::
+ erase_existing(const_key_reference r_key)
+ {
+ if (m_key_set.find(r_key) == m_key_set.end())
+ abort();
+
+ m_key_set.erase(r_key);
+
+ if (m_key_set.find(r_key) != m_key_set.end())
+ abort();
+ }
+
+ PB_ASSOC_CLASS_T_DEC
+ void
+ PB_ASSOC_CLASS_C_DEC::
+ clear()
+ {
+ m_key_set.clear();
+ }
+
+ PB_ASSOC_CLASS_T_DEC
+ inline void
+ PB_ASSOC_CLASS_C_DEC::
+ check_key_exists(const_key_reference r_key) const
+ {
+ if (m_key_set.find(r_key) == m_key_set.end())
+ abort();
+ }
+
+ PB_ASSOC_CLASS_T_DEC
+ inline void
+ PB_ASSOC_CLASS_C_DEC::
+ check_key_does_not_exist(const_key_reference r_key) const
+ {
+ if (m_key_set.find(r_key) != m_key_set.end())
+ abort();
+ }
+
+ PB_ASSOC_CLASS_T_DEC
+ inline void
+ PB_ASSOC_CLASS_C_DEC::
+ check_size(size_type size) const
+ {
+ const size_type key_set_size = m_key_set.size();
+
+ if (size != key_set_size)
+ abort();
+ }
+
+ PB_ASSOC_CLASS_T_DEC
+ void
+ PB_ASSOC_CLASS_C_DEC::
+ swap(PB_ASSOC_CLASS_C_DEC& r_other)
+ {
+ m_key_set.swap(r_other.m_key_set);
+ }
+
+#undef PB_ASSOC_CLASS_T_DEC
+#undef PB_ASSOC_CLASS_C_DEC
+
+#undef PB_ASSOC_DBG_ASSERT
+#undef PB_ASSOC_DBG_VERIFY
+#undef PB_ASSOC_DBG_ONLY
+
+ } // namespace detail
+
+} // namespace pb_assoc
+
+#endif // #ifdef PB_ASSOC_USE_MAP_DEBUG_BASE
+
+#endif // #ifndef MAP_DEBUG_BASE_HPP
+
diff --git a/libstdc++-v3/include/ext/pb_assoc/detail/mapping_level_imp.hpp b/libstdc++-v3/include/ext/pb_assoc/detail/mapping_level_imp.hpp
new file mode 100644
index 00000000000..47d7d0b4c50
--- /dev/null
+++ b/libstdc++-v3/include/ext/pb_assoc/detail/mapping_level_imp.hpp
@@ -0,0 +1,90 @@
+// -*- C++ -*-
+
+// 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.
+
+// As a special exception, you may use this file as part of a free software
+// library without restriction. Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General 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 mapping_level_imp.hpp
+ * Contains mapping level implementation.
+ */
+
+#ifndef MAPPING_LEVEL_IMP_HPP
+#define MAPPING_LEVEL_IMP_HPP
+
+namespace pb_assoc
+{
+
+ namespace detail
+ {
+
+ template<class Given_Data>
+ struct mapping_level_imp
+ {
+ enum
+ {
+ value = 1
+ };
+ };
+
+ template<>
+ struct mapping_level_imp<
+ null_data_type>
+ {
+ enum
+ {
+ value = 1
+ };
+ };
+
+ template<class Cntnr>
+ struct mapping_level_imp<
+ compound_data_type<
+ Cntnr> >
+ {
+ enum
+ {
+ value = 1 +
+ mapping_level_imp<
+ typename Cntnr::given_data_type>::value
+ };
+ };
+
+ } // namespace detail
+
+} // namespace pb_assoc
+
+#endif // #ifndef MAPPING_LEVEL_IMP_HPP
diff --git a/libstdc++-v3/include/ext/pb_assoc/detail/ms_category_imp.hpp b/libstdc++-v3/include/ext/pb_assoc/detail/ms_category_imp.hpp
new file mode 100644
index 00000000000..2d8b61c283f
--- /dev/null
+++ b/libstdc++-v3/include/ext/pb_assoc/detail/ms_category_imp.hpp
@@ -0,0 +1,81 @@
+// -*- C++ -*-
+
+// 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.
+
+// As a special exception, you may use this file as part of a free software
+// library without restriction. Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General 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 ms_category_imp.hpp
+ * Contains mapping-semantics category implementation.
+ */
+
+#ifndef MS_CATEGORY_IMP_HPP
+#define MS_CATEGORY_IMP_HPP
+
+namespace pb_assoc
+{
+
+ namespace detail
+ {
+
+ template<typename Key, class Data>
+ struct ms_category_imp
+ {
+ typedef data_enabled_ms_tag type;
+ };
+
+ template<typename Key>
+ struct ms_category_imp<
+ Key,
+ null_data_type>
+ {
+ typedef basic_ms_tag type;
+ };
+
+ template<typename Key, class Cntnr>
+ struct ms_category_imp<
+ Key,
+ compound_data_type<
+ Cntnr> >
+ {
+ typedef compound_data_enabled_ms_tag type;
+ };
+
+ } // namespace detail
+
+} // namespace pb_assoc
+
+#endif // #ifndef MS_CATEGORY_IMP_HPP
diff --git a/libstdc++-v3/include/ext/pb_assoc/detail/ms_trait_imp.hpp b/libstdc++-v3/include/ext/pb_assoc/detail/ms_trait_imp.hpp
new file mode 100644
index 00000000000..0822463e9a3
--- /dev/null
+++ b/libstdc++-v3/include/ext/pb_assoc/detail/ms_trait_imp.hpp
@@ -0,0 +1,136 @@
+// -*- C++ -*-
+
+// 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.
+
+// As a special exception, you may use this file as part of a free software
+// library without restriction. Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General 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 ms_category_imp.hpp
+ * Contains mapping-semantics category implementation.
+ */
+
+#ifndef MS_TRAIT_IMP_HPP
+#define MS_TRAIT_IMP_HPP
+
+namespace detail
+{
+
+ template<class Cntnr, class Mapping_Semantics_Category>
+ struct mapping_semantics_traits;
+
+#define PB_ASSOC_CLASS_T_DEC \
+ template<class Cntnr>
+
+#define PB_ASSOC_CLASS_C_DEC \
+ mapping_semantics_traits< \
+ Cntnr, \
+ basic_ms_tag>
+
+ template<class Cntnr>
+ struct mapping_semantics_traits<
+ Cntnr,
+ basic_ms_tag>
+ {
+
+ public:
+ enum
+ {
+ has_data = false,
+ has_compound_data = false,
+ mapping_level = 1
+ };
+ };
+
+#undef PB_ASSOC_CLASS_T_DEC
+
+#undef PB_ASSOC_CLASS_C_DEC
+
+#define PB_ASSOC_CLASS_T_DEC \
+ template<class Cntnr>
+
+#define PB_ASSOC_CLASS_C_DEC \
+ mapping_semantics_traits< \
+ Cntnr, \
+ data_enabled_ms_tag>
+
+ template<class Cntnr>
+ struct mapping_semantics_traits<
+ Cntnr,
+ data_enabled_ms_tag>
+ {
+ public:
+ enum
+ {
+ has_data = true,
+ has_compound_data = false,
+ mapping_level = 1
+ };
+ };
+
+#undef PB_ASSOC_CLASS_T_DEC
+
+#undef PB_ASSOC_CLASS_C_DEC
+
+#define PB_ASSOC_CLASS_T_DEC \
+ template<class Cntnr>
+
+#define PB_ASSOC_CLASS_C_DEC \
+ mapping_semantics_traits< \
+ Cntnr, \
+ compound_data_enabled_ms_tag>
+
+ template<class Cntnr>
+ struct mapping_semantics_traits<
+ Cntnr,
+ compound_data_enabled_ms_tag>
+ {
+ public:
+ enum
+ {
+ has_data = true,
+ has_compound_data = true,
+ mapping_level = mapping_level_imp<
+ typename Cntnr::given_data_type>::value
+ };
+ };
+
+#undef PB_ASSOC_CLASS_T_DEC
+
+#undef PB_ASSOC_CLASS_C_DEC
+
+} // namespace detail
+
+#endif // #ifndef MS_TRAIT_IMP_HPP
diff --git a/libstdc++-v3/include/ext/pb_assoc/detail/order_statistics_imp.hpp b/libstdc++-v3/include/ext/pb_assoc/detail/order_statistics_imp.hpp
new file mode 100644
index 00000000000..d4031583c9c
--- /dev/null
+++ b/libstdc++-v3/include/ext/pb_assoc/detail/order_statistics_imp.hpp
@@ -0,0 +1,436 @@
+// -*- C++ -*-
+
+// 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.
+
+// As a special exception, you may use this file as part of a free software
+// library without restriction. Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General 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 order_statistics_imp.hpp
+ * Contains forward declarations for order_statistics_key
+ */
+
+#ifndef ORDER_STATISTICS_IMP_HPP
+#define ORDER_STATISTICS_IMP_HPP
+
+#define PB_ASSOC_CLASS_T_DEC \
+ template<class Key, class Allocator>
+
+#define PB_ASSOC_CLASS_C_DEC \
+ order_statistics_key< \
+ Key, \
+ Allocator>
+
+PB_ASSOC_CLASS_T_DEC
+inline
+PB_ASSOC_CLASS_C_DEC::
+order_statistics_key(const_key_reference r_key) :
+ m_key(r_key),
+ m_rank(1)
+{ }
+
+PB_ASSOC_CLASS_T_DEC
+inline
+PB_ASSOC_CLASS_C_DEC::
+operator typename PB_ASSOC_CLASS_C_DEC::key_reference()
+{
+ return (m_key);
+}
+
+PB_ASSOC_CLASS_T_DEC
+inline
+PB_ASSOC_CLASS_C_DEC::
+operator typename PB_ASSOC_CLASS_C_DEC::key_type() const
+{
+ return (m_key);
+}
+
+#undef PB_ASSOC_CLASS_T_DEC
+
+#undef PB_ASSOC_CLASS_C_DEC
+
+#define PB_ASSOC_CLASS_T_DEC \
+ template<class Cmp_Fn, class Allocator>
+
+#define PB_ASSOC_CLASS_C_DEC \
+ order_statistics_key_cmp< \
+ Cmp_Fn, \
+ Allocator>
+
+PB_ASSOC_CLASS_T_DEC
+inline
+PB_ASSOC_CLASS_C_DEC::
+order_statistics_key_cmp()
+{ }
+
+PB_ASSOC_CLASS_T_DEC
+inline
+PB_ASSOC_CLASS_C_DEC::
+order_statistics_key_cmp(const Cmp_Fn& r_cmp_fn) :
+ Cmp_Fn(r_cmp_fn)
+{ }
+
+PB_ASSOC_CLASS_T_DEC
+inline bool
+PB_ASSOC_CLASS_C_DEC::
+operator()(const_key_reference r_lhs_key, const_key_reference r_rhs_key) const
+{
+ return Cmp_Fn::operator()((key_type)r_lhs_key, (key_type)r_rhs_key);
+}
+
+PB_ASSOC_CLASS_T_DEC
+inline typename PB_ASSOC_CLASS_C_DEC::cmp_fn&
+PB_ASSOC_CLASS_C_DEC::
+get_cmp_fn()
+{
+ return (*this);
+}
+
+PB_ASSOC_CLASS_T_DEC
+inline const typename PB_ASSOC_CLASS_C_DEC::cmp_fn&
+PB_ASSOC_CLASS_C_DEC::
+get_cmp_fn() const
+{
+ return (*this);
+}
+
+#undef PB_ASSOC_CLASS_T_DEC
+
+#undef PB_ASSOC_CLASS_C_DEC
+
+#define PB_ASSOC_CLASS_T_DEC \
+ template<class Key, class Allocator>
+
+#define PB_ASSOC_CLASS_C_DEC \
+ order_statistics_node_updator< \
+ Key, \
+ Allocator>
+
+PB_ASSOC_CLASS_T_DEC
+inline void
+PB_ASSOC_CLASS_C_DEC::
+operator()(const_key_pointer p_key, const_key_pointer p_l_child_key, const_key_pointer p_r_child_key)
+{
+ /*
+ * The left rank is 0 if there is no left child,
+ * or the rank of the left child, otherwise.
+ */
+ const size_type l_rank =(p_l_child_key == NULL)? 0 : p_l_child_key->m_rank;
+
+ /*
+ * The right rank is 0 if there is no right child,
+ * or the rank of the right child, otherwise.
+ */
+ const size_type r_rank =(p_r_child_key == NULL)? 0 : p_r_child_key->m_rank;
+
+ /*
+ * The rand of the entry is the sumb of the ranks of its
+ * children + 1 (for itself).
+ */
+ p_key->m_rank = 1 + l_rank + r_rank;
+}
+
+PB_ASSOC_CLASS_T_DEC
+inline void
+PB_ASSOC_CLASS_C_DEC::
+swap(PB_ASSOC_CLASS_C_DEC& /*r_other*/)
+{ }
+
+#undef PB_ASSOC_CLASS_T_DEC
+
+#undef PB_ASSOC_CLASS_C_DEC
+
+#define PB_ASSOC_CLASS_T_DEC \
+ template<class Cntnr>
+
+#define PB_ASSOC_CLASS_C_DEC \
+ find_by_order< \
+ Cntnr>
+
+PB_ASSOC_CLASS_T_DEC
+inline typename PB_ASSOC_CLASS_C_DEC::iterator
+PB_ASSOC_CLASS_C_DEC::
+operator()(Cntnr& r_c, size_type order) const
+{
+ return find(r_c, order);
+}
+
+PB_ASSOC_CLASS_T_DEC
+inline typename PB_ASSOC_CLASS_C_DEC::const_iterator
+PB_ASSOC_CLASS_C_DEC::
+operator()(const Cntnr& r_c, size_type order) const
+{
+ return find(r_c, order);
+}
+
+PB_ASSOC_CLASS_T_DEC
+inline typename PB_ASSOC_CLASS_C_DEC::const_iterator
+PB_ASSOC_CLASS_C_DEC::
+find(const Cntnr& r_c, size_type order)
+{
+ if (order > r_c.size())
+ return (r_c.end());
+
+ /*
+ * Start at the top of the tree.
+ */
+ typename Cntnr::const_node_iterator it = r_c.node_begin();
+
+ /*
+ * Loop up to a leaf.
+ */
+ while (it != r_c.node_end())
+ {
+ typename Cntnr::const_node_iterator l_it = it.l_child();
+
+ /*
+ * The order of the element, o, is the rank of the left
+ * child (for the entry itself).
+ */
+ const size_type o = (l_it == r_c.node_end())?
+ 0 :(*l_it)->m_rank;
+
+ /*
+ * If the current order, o, is the order requested,
+ * the key has been found.
+ */
+ if (order == o)
+ return (*it);
+ /*
+ * If the current order, o, is larger than the order requested,
+ * we should move to the left subtree.
+ */
+ else if (order < o)
+ it = l_it;
+ /*
+ * Otherwise adujst the requested order and move to the right subtree.
+ */
+ else
+ {
+ order -= o + 1;
+
+ it = it.r_child();
+ }
+ }
+
+ return (r_c.end());
+}
+
+PB_ASSOC_CLASS_T_DEC
+inline typename PB_ASSOC_CLASS_C_DEC::iterator
+PB_ASSOC_CLASS_C_DEC::
+find(Cntnr& r_c, size_type order)
+{
+ if (order > r_c.size())
+ return (r_c.end());
+
+ /*
+ * Start at the top of the tree.
+ */
+ typename Cntnr::node_iterator it = r_c.node_begin();
+
+ /*
+ * Loop up to a leaf.
+ */
+ while (it != r_c.node_end())
+ {
+ typename Cntnr::node_iterator l_it = it.l_child();
+
+ /*
+ * The order of the element, o, is the rank of the left
+ * child (for the entry itself).
+ */
+ const size_type o = (l_it == r_c.node_end())?
+ 0 :
+ r_c.extract_key(*(*l_it)).m_rank;
+
+ /*
+ * If the current order, o, is the order requested,
+ * the key has been found.
+ */
+ if (order == o)
+ return (*it);
+ /*
+ * If the current order, o, is larger than the order requested,
+ * we should move to the left subtree.
+ */
+ else if (order < o)
+ it = l_it;
+ /*
+ * Otherwise adujst the requested order and move to the right subtree.
+ */
+ else
+ {
+ order -= o + 1;
+
+ it = it.r_child();
+ }
+ }
+
+ return (r_c.end());
+}
+
+#undef PB_ASSOC_CLASS_T_DEC
+
+#undef PB_ASSOC_CLASS_C_DEC
+
+#define PB_ASSOC_CLASS_T_DEC \
+ template<class Cntnr>
+
+#define PB_ASSOC_CLASS_C_DEC \
+ order_by_key< \
+ Cntnr>
+
+PB_ASSOC_CLASS_T_DEC
+inline typename PB_ASSOC_CLASS_C_DEC::size_type
+PB_ASSOC_CLASS_C_DEC::
+operator()(const Cntnr& r_c, const underlying_key_type& r_key) const
+{
+ /*
+ * The logic here is similar to that in order_by_key.
+ */
+
+ typename Cntnr::const_node_iterator it = r_c.node_begin();
+
+ size_type ord = 0;
+
+ while (it != r_c.node_end())
+ {
+ typename Cntnr::const_node_iterator l_it = it.l_child();
+
+ if (r_c.get_cmp_fn().get_cmp_fn()(
+ r_key,
+ r_c.extract_key(*(*it)).m_key))
+ it = l_it;
+ else if (r_c.get_cmp_fn().get_cmp_fn()(
+ r_c.extract_key(*(*it)).m_key,
+ r_key))
+ {
+
+ ord += (l_it == r_c.node_end())?
+ 1 :
+ 1 + r_c.extract_key(*(*l_it)).m_rank;
+
+ it = it.r_child();
+ }
+ else
+ {
+ ord += (l_it == r_c.node_end())?
+ 0 :
+ r_c.extract_key(*(*l_it)).m_rank;
+
+ it = r_c.node_end();
+ }
+ }
+
+ return (ord);
+}
+
+#undef PB_ASSOC_CLASS_T_DEC
+
+#undef PB_ASSOC_CLASS_C_DEC
+
+#define PB_ASSOC_CLASS_T_DEC \
+ template<class Cntnr, class Allocator>
+
+#define PB_ASSOC_CLASS_C_DEC \
+ order_statistics_key_verifier< \
+ Cntnr, \
+ Allocator>
+
+template<class Cntnr, class Allocator = std::allocator<char> >
+class order_statistics_key_verifier
+{
+public:
+ typedef Cntnr map;
+
+ typedef Allocator allocator;
+
+ typedef typename allocator::size_type size_type;
+
+ typedef
+ typename allocator::template rebind<map>::other::const_reference
+ const_map_reference;
+
+public:
+ bool
+ operator()(const Cntnr& r_c) const;
+
+private:
+ typedef typename Cntnr::const_node_iterator const_node_iterator;
+
+ typedef typename Cntnr::const_iterator cntnr_const_it;
+
+ typedef std::pair<bool, size_type> stat;
+
+private:
+ static stat
+ verify_imp(const_node_iterator it, const_node_iterator end_it)
+ {
+ if (it == end_it)
+ return (std::make_pair(true, 0));
+
+ const stat l_ret =
+ verify_imp(it.l_child(), end_it);
+
+ const stat r_ret =
+ verify_imp(it.r_child(), end_it);
+
+ if (!l_ret.first || !r_ret.first)
+ return (std::make_pair(false, 0));
+
+ if ((*it)->m_rank != 1 + l_ret.second + r_ret.second)
+ return (std::make_pair(false, 0));
+
+ return (std::make_pair(true, (*it)->m_rank));
+ }
+};
+
+PB_ASSOC_CLASS_T_DEC
+bool
+PB_ASSOC_CLASS_C_DEC::
+operator()(const Cntnr& r_c) const
+{
+ const stat top_stat =
+ verify_imp(r_c.node_begin(), r_c.node_end());
+
+ return (top_stat.first);
+}
+
+#undef PB_ASSOC_CLASS_T_DEC
+
+#undef PB_ASSOC_CLASS_C_DEC
+
+#endif // #ifndef ORDER_STATISTICS_IMP_HPP
diff --git a/libstdc++-v3/include/ext/pb_assoc/detail/ov_tree_map_/cond_dtor.hpp b/libstdc++-v3/include/ext/pb_assoc/detail/ov_tree_map_/cond_dtor.hpp
new file mode 100644
index 00000000000..0bda538c4ac
--- /dev/null
+++ b/libstdc++-v3/include/ext/pb_assoc/detail/ov_tree_map_/cond_dtor.hpp
@@ -0,0 +1,88 @@
+// -*- C++ -*-
+
+// 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.
+
+// As a special exception, you may use this file as part of a free software
+// library without restriction. Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General 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 cond_dtor.hpp
+ * Contains a conditional destructor
+ */
+
+class cond_dtor
+{
+public:
+ cond_dtor(pointer a_vec, iterator& r_last_it, size_type total_size) : m_a_vec(a_vec),
+ m_r_last_it(r_last_it),
+ m_max_size(total_size),
+ m_no_action(false)
+ { }
+
+ ~cond_dtor()
+ {
+ if (m_no_action)
+ return;
+
+ iterator it = m_a_vec;
+
+ while (it != m_r_last_it)
+ {
+ it->~value_type();
+
+ ++it;
+ }
+
+ if (m_max_size > 0)
+ value_allocator().deallocate(
+ const_cast<typename value_allocator::pointer>(m_a_vec),
+ m_max_size);
+ }
+
+ inline void
+ set_no_action()
+ {
+ m_no_action = true;
+ }
+
+protected:
+ pointer m_a_vec;
+
+ iterator& m_r_last_it;
+
+ const size_type m_max_size;
+
+ bool m_no_action;
+};
diff --git a/libstdc++-v3/include/ext/pb_assoc/detail/ov_tree_map_/constructors_destructor_fn_imps.hpp b/libstdc++-v3/include/ext/pb_assoc/detail/ov_tree_map_/constructors_destructor_fn_imps.hpp
new file mode 100644
index 00000000000..a79f923a178
--- /dev/null
+++ b/libstdc++-v3/include/ext/pb_assoc/detail/ov_tree_map_/constructors_destructor_fn_imps.hpp
@@ -0,0 +1,278 @@
+// -*- C++ -*-
+
+// 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.
+
+// As a special exception, you may use this file as part of a free software
+// library without restriction. Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General 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 constructors_destructor_fn_imps.hpp
+ * Contains an implementation class for ov_tree_.
+ */
+
+PB_ASSOC_CLASS_T_DEC
+typename PB_ASSOC_CLASS_C_DEC::value_allocator
+PB_ASSOC_CLASS_C_DEC::s_alloc;
+
+PB_ASSOC_CLASS_T_DEC
+PB_ASSOC_CLASS_C_DEC::
+PB_ASSOC_OV_TREE_CLASS_NAME() :
+ m_a_values(NULL),
+ m_end_it(NULL),
+ m_size(0)
+{
+ update(node_begin(), (Node_Updator* )this);
+
+ PB_ASSOC_DBG_ONLY(PB_ASSOC_CLASS_C_DEC::assert_valid();)
+ }
+
+PB_ASSOC_CLASS_T_DEC
+PB_ASSOC_CLASS_C_DEC::
+PB_ASSOC_OV_TREE_CLASS_NAME(const Cmp_Fn& r_cmp_fn) :
+ my_cmp_fn_base(r_cmp_fn),
+ m_a_values(NULL),
+ m_end_it(NULL),
+ m_size(0)
+{
+ update(node_begin(), (Node_Updator* )this);
+
+ PB_ASSOC_DBG_ONLY(PB_ASSOC_CLASS_C_DEC::assert_valid();)
+ }
+
+PB_ASSOC_CLASS_T_DEC
+PB_ASSOC_CLASS_C_DEC::
+PB_ASSOC_OV_TREE_CLASS_NAME(const Cmp_Fn& r_cmp_fn, const Node_Updator& r_node_updator) :
+ my_cmp_fn_base(r_cmp_fn),
+ Node_Updator(r_node_updator),
+ m_a_values(NULL),
+ m_end_it(NULL),
+ m_size(0)
+{
+ update(node_begin(), (Node_Updator* )this);
+
+ PB_ASSOC_DBG_ONLY(PB_ASSOC_CLASS_C_DEC::assert_valid();)
+ }
+
+PB_ASSOC_CLASS_T_DEC
+PB_ASSOC_CLASS_C_DEC::
+PB_ASSOC_OV_TREE_CLASS_NAME(const PB_ASSOC_CLASS_C_DEC& r_other) :
+ my_cmp_fn_base(r_other),
+ m_a_values(NULL),
+ m_end_it(NULL),
+ m_size(0)
+{
+ copy_from_ordered_range(r_other.begin(), r_other.end());
+
+ PB_ASSOC_DBG_ONLY(PB_ASSOC_CLASS_C_DEC::assert_valid();)
+ }
+
+PB_ASSOC_CLASS_T_DEC
+template<class It>
+inline void
+PB_ASSOC_CLASS_C_DEC::
+copy_from_range(It first_it, It last_it)
+{
+ enum
+ {
+ is_set_type = is_same_type<Data, null_data_type>::value
+ };
+
+ typedef
+ typename cond_type<
+ is_set_type,
+ std::set<
+ Key,
+ Cmp_Fn,
+ typename Allocator::template rebind<
+ Key>::other>,
+ std::map<
+ Key,
+ Data,
+ Cmp_Fn,
+ typename Allocator::template rebind<
+ std::pair<const Key, Data> >::other> >::type
+ map_type;
+
+ map_type m(first_it, last_it);
+
+ copy_from_ordered_range(m.begin(), m.end());
+}
+
+PB_ASSOC_CLASS_T_DEC
+template<class It>
+void
+PB_ASSOC_CLASS_C_DEC::
+copy_from_ordered_range(It first_it, It last_it)
+{
+ clear();
+
+ const size_type size = std::distance(first_it, last_it);
+
+ pointer a_values = s_alloc.allocate(size);
+
+ iterator target_it = a_values;
+ It source_it = first_it;
+ It source_end_it = last_it;
+
+ cond_dtor cd(a_values, target_it, size);
+
+ while (source_it != source_end_it)
+ {
+ new (const_cast<void* >(
+ static_cast<const void* >(target_it)))
+ value_type(*source_it++);
+
+ ++target_it;
+ }
+
+ cd.set_no_action();
+
+ m_a_values = a_values;
+
+ m_size = size;
+
+ m_end_it = m_a_values + m_size;
+
+ update(node_begin(), (Node_Updator* )this);
+
+#ifdef PB_ASSOC_OV_TREE_DEBUG_
+ const_iterator dbg_it = m_a_values;
+
+ while (dbg_it != m_end_it)
+ {
+ my_map_debug_base::insert_new(PB_ASSOC_V2F(*dbg_it));
+
+ dbg_it++;
+ }
+
+ PB_ASSOC_CLASS_C_DEC::assert_valid();
+#endif // #ifdef PB_ASSOC_OV_TREE_DEBUG_
+}
+
+PB_ASSOC_CLASS_T_DEC
+template<class It>
+void
+PB_ASSOC_CLASS_C_DEC::
+copy_from_ordered_range(It first_it, It last_it, It other_first_it, It other_last_it)
+{
+ clear();
+
+ const size_type size =
+ std::distance(first_it, last_it) +
+ std::distance(other_first_it, other_last_it);
+
+ pointer a_values = s_alloc.allocate(size);
+
+ iterator target_it = a_values;
+ It source_it = first_it;
+ It source_end_it = last_it;
+
+ cond_dtor cd(a_values, target_it, size);
+
+ while (source_it != source_end_it)
+ {
+ new (const_cast<void* >(
+ static_cast<const void* >(target_it)))
+ value_type(*source_it++);
+
+ ++target_it;
+ }
+
+ source_it = other_first_it;
+ source_end_it = other_last_it;
+
+ while (source_it != source_end_it)
+ {
+ new (const_cast<void* >(
+ static_cast<const void* >(target_it)))
+ value_type(*source_it++);
+
+ ++target_it;
+ }
+
+ cd.set_no_action();
+
+ m_a_values = a_values;
+
+ m_size = size;
+
+ m_end_it = m_a_values + m_size;
+
+ update(node_begin(), (Node_Updator* )this);
+
+#ifdef PB_ASSOC_OV_TREE_DEBUG_
+ const_iterator dbg_it = m_a_values;
+
+ while (dbg_it != m_end_it)
+ {
+ my_map_debug_base::insert_new(PB_ASSOC_V2F(*dbg_it));
+
+ dbg_it++;
+ }
+
+ PB_ASSOC_CLASS_C_DEC::assert_valid();
+#endif // #ifdef PB_ASSOC_OV_TREE_DEBUG_
+}
+
+PB_ASSOC_CLASS_T_DEC
+void
+PB_ASSOC_CLASS_C_DEC::
+swap(PB_ASSOC_CLASS_C_DEC& r_other)
+{
+ PB_ASSOC_DBG_ONLY(assert_valid();)
+
+ std::swap(m_a_values, r_other.m_a_values);
+
+ std::swap(m_size, r_other.m_size);
+
+ std::swap(m_end_it, r_other.m_end_it);
+
+ std::swap((Cmp_Fn& )(*this), (Cmp_Fn& )r_other);
+
+ Node_Updator::swap(r_other);
+
+ PB_ASSOC_DBG_ONLY(my_map_debug_base::swap(r_other);)
+
+ PB_ASSOC_DBG_ONLY(assert_valid();)
+ }
+
+PB_ASSOC_CLASS_T_DEC
+PB_ASSOC_CLASS_C_DEC::
+~PB_ASSOC_OV_TREE_CLASS_NAME()
+{
+ PB_ASSOC_DBG_ONLY(assert_valid();)
+
+ cond_dtor cd(m_a_values, m_end_it, m_size);
+}
diff --git a/libstdc++-v3/include/ext/pb_assoc/detail/ov_tree_map_/debug_fn_imps.hpp b/libstdc++-v3/include/ext/pb_assoc/detail/ov_tree_map_/debug_fn_imps.hpp
new file mode 100644
index 00000000000..2b7174edc48
--- /dev/null
+++ b/libstdc++-v3/include/ext/pb_assoc/detail/ov_tree_map_/debug_fn_imps.hpp
@@ -0,0 +1,101 @@
+// -*- C++ -*-
+
+// 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.
+
+// As a special exception, you may use this file as part of a free software
+// library without restriction. Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General 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_fn_imps.hpp
+ * Contains an implementation class for ov_tree_.
+ */
+
+#ifdef PB_ASSOC_OV_TREE_DEBUG_
+
+PB_ASSOC_CLASS_T_DEC
+void
+PB_ASSOC_CLASS_C_DEC::
+assert_valid() const
+{
+ if (m_a_mapped_values == NULL || m_end_it == NULL || m_size == 0)
+ PB_ASSOC_DBG_ASSERT(m_a_mapped_values == NULL&& m_end_it == NULL&&
+ m_size == 0);
+
+ assert_iterators();
+}
+
+PB_ASSOC_CLASS_T_DEC
+void
+PB_ASSOC_CLASS_C_DEC::
+assert_iterators() const
+{
+ my_map_debug_base::check_size(m_size);
+
+ size_type iterated_num = 0;
+
+ const_iterator prev_it = end();
+
+ PB_ASSOC_DBG_ASSERT( m_end_it == m_a_mapped_values + m_size);
+
+ for (const_iterator it = begin(); it != end(); ++it)
+ {
+ ++iterated_num;
+
+ PB_ASSOC_DBG_ONLY(my_map_debug_base::check_key_exists(
+ PB_ASSOC_V2F(*it)));
+
+ PB_ASSOC_DBG_ASSERT(lower_bound(
+ PB_ASSOC_V2F(*it)) == it);
+
+ const_iterator upper_bound_it = upper_bound(
+ PB_ASSOC_V2F(*it));
+
+ --upper_bound_it;
+
+ PB_ASSOC_DBG_ASSERT(upper_bound_it == it);
+
+ if (prev_it != end())
+ PB_ASSOC_DBG_ASSERT(Cmp_Fn::operator()(
+ PB_ASSOC_V2F(*prev_it),
+ PB_ASSOC_V2F(*it)));
+
+ prev_it = it;
+ }
+
+ PB_ASSOC_DBG_ASSERT(iterated_num == m_size);
+}
+
+#endif // #ifdef PB_ASSOC_OV_TREE_DEBUG_
+
diff --git a/libstdc++-v3/include/ext/pb_assoc/detail/ov_tree_map_/erase_fn_imps.hpp b/libstdc++-v3/include/ext/pb_assoc/detail/ov_tree_map_/erase_fn_imps.hpp
new file mode 100644
index 00000000000..29154cb821e
--- /dev/null
+++ b/libstdc++-v3/include/ext/pb_assoc/detail/ov_tree_map_/erase_fn_imps.hpp
@@ -0,0 +1,234 @@
+// -*- C++ -*-
+
+// 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.
+
+// As a special exception, you may use this file as part of a free software
+// library without restriction. Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General 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 erase_fn_imps.hpp
+ * Contains an implementation class for ov_tree_.
+ */
+
+PB_ASSOC_CLASS_T_DEC
+inline typename PB_ASSOC_CLASS_C_DEC::size_type
+PB_ASSOC_CLASS_C_DEC::
+erase(const_key_reference r_key)
+{
+ iterator it = find(r_key);
+
+ if (it == find_end())
+ return (0);
+
+ erase(it);
+
+ return (1);
+}
+
+PB_ASSOC_CLASS_T_DEC
+void
+PB_ASSOC_CLASS_C_DEC::
+clear()
+{
+ PB_ASSOC_DBG_ONLY(assert_valid();)
+
+ if (m_size == 0)
+ {
+ PB_ASSOC_DBG_ONLY(assert_valid();)
+
+ return;
+ }
+ else
+ {
+ cond_dtor cd(m_a_values, m_end_it, m_size);
+ }
+
+ PB_ASSOC_DBG_ONLY(my_map_debug_base::clear();)
+
+ m_a_values = NULL;
+
+ m_size = 0;
+
+ m_end_it = m_a_values;
+
+ PB_ASSOC_DBG_ONLY(PB_ASSOC_CLASS_C_DEC::assert_valid();)
+
+ PB_ASSOC_DBG_ONLY(assert_valid();)
+ }
+
+PB_ASSOC_CLASS_T_DEC
+template<class Pred>
+inline typename PB_ASSOC_CLASS_C_DEC::size_type
+PB_ASSOC_CLASS_C_DEC::
+erase_if(Pred pred)
+{
+ PB_ASSOC_DBG_ONLY(PB_ASSOC_CLASS_C_DEC::assert_valid();)
+
+#ifdef PB_ASSOC_BASIC_REGRESSION
+ throw_prob_adjustor adjust(m_size);
+#endif // #ifdef PB_ASSOC_BASIC_REGRESSION
+
+ size_type new_size = 0;
+
+ size_type num_val_ersd = 0;
+
+ iterator source_it = m_a_values;
+
+ for (source_it = begin(); source_it != m_end_it; ++source_it)
+ {
+ if (pred(*source_it))
+ ++num_val_ersd;
+ else
+ ++new_size;
+ }
+
+ if (new_size == 0)
+ {
+ clear();
+
+ return (num_val_ersd);
+ }
+
+ pointer a_new_values = s_alloc.allocate(new_size);
+
+ iterator target_it = a_new_values;
+
+ cond_dtor cd(a_new_values, target_it, new_size);
+
+ PB_ASSOC_DBG_ONLY(my_map_debug_base::clear());
+
+ for (source_it = begin(); source_it != m_end_it; ++source_it)
+ {
+ if (!pred(*source_it))
+ {
+ new (const_cast<void* >(
+ static_cast<const void* >(target_it)))
+ value_type(*source_it);
+
+ PB_ASSOC_DBG_ONLY(my_map_debug_base::insert_new(
+ PB_ASSOC_V2F(*source_it)));
+
+ ++target_it;
+ }
+ }
+
+ cd.set_no_action();
+
+ {
+ cond_dtor cd1(m_a_values, m_end_it, m_size);
+ }
+
+ m_a_values = a_new_values;
+
+ m_size = new_size;
+
+ m_end_it = target_it;
+
+ PB_ASSOC_DBG_ONLY(assert_valid();)
+
+ return (num_val_ersd);
+}
+
+PB_ASSOC_CLASS_T_DEC
+template<class It>
+It
+PB_ASSOC_CLASS_C_DEC::
+erase(It it)
+{
+ PB_ASSOC_DBG_ONLY(PB_ASSOC_CLASS_C_DEC::assert_valid();)
+
+ if (it == end())
+ return end();
+
+ PB_ASSOC_DBG_ONLY(
+ PB_ASSOC_CLASS_C_DEC::check_key_exists(PB_ASSOC_V2F(*it));)
+
+#ifdef PB_ASSOC_BASIC_REGRESSION
+ throw_prob_adjustor adjust(m_size);
+#endif // #ifdef PB_ASSOC_BASIC_REGRESSION
+
+ PB_ASSOC_DBG_ASSERT(m_size > 0);
+
+ pointer a_values = s_alloc.allocate(m_size - 1);
+
+ iterator source_it = begin();
+ iterator source_end_it = end();
+ iterator target_it = a_values;
+ iterator ret_it = end();
+
+ cond_dtor cd(a_values, target_it, m_size - 1);
+
+ PB_ASSOC_DBG_ONLY(size_type cnt = 0;)
+
+ while (source_it != source_end_it)
+ {
+ if (source_it != it)
+ {
+ PB_ASSOC_DBG_ONLY(++cnt;)
+ PB_ASSOC_DBG_ASSERT(cnt != m_size);
+
+ new (const_cast<void* >(
+ static_cast<const void* >(target_it)))
+ value_type(*source_it);
+
+ ++target_it;
+ }
+ else
+ ret_it = target_it;
+
+ ++source_it;
+ }
+
+ cd.set_no_action();
+
+ PB_ASSOC_DBG_ONLY(
+ PB_ASSOC_CLASS_C_DEC::erase_existing(PB_ASSOC_V2F(*it));)
+ {
+ cond_dtor cd1(m_a_values, m_end_it, m_size);
+ }
+
+ m_a_values = a_values;
+
+ --m_size;
+
+ m_end_it = m_a_values + m_size;
+
+ update(node_begin(), (Node_Updator* )this);
+
+ PB_ASSOC_DBG_ONLY(PB_ASSOC_CLASS_C_DEC::assert_valid();)
+
+ return (It(ret_it));
+}
+
diff --git a/libstdc++-v3/include/ext/pb_assoc/detail/ov_tree_map_/find_fn_imps.hpp b/libstdc++-v3/include/ext/pb_assoc/detail/ov_tree_map_/find_fn_imps.hpp
new file mode 100644
index 00000000000..8b3d6833bf9
--- /dev/null
+++ b/libstdc++-v3/include/ext/pb_assoc/detail/ov_tree_map_/find_fn_imps.hpp
@@ -0,0 +1,44 @@
+// -*- C++ -*-
+
+// 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.
+
+// As a special exception, you may use this file as part of a free software
+// library without restriction. Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General 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 find_fn_imps.hpp
+ * Contains an implementation class for ov_tree_.
+ */
+
diff --git a/libstdc++-v3/include/ext/pb_assoc/detail/ov_tree_map_/info_fn_imps.hpp b/libstdc++-v3/include/ext/pb_assoc/detail/ov_tree_map_/info_fn_imps.hpp
new file mode 100644
index 00000000000..0d271e042dd
--- /dev/null
+++ b/libstdc++-v3/include/ext/pb_assoc/detail/ov_tree_map_/info_fn_imps.hpp
@@ -0,0 +1,95 @@
+// -*- C++ -*-
+
+// 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.
+
+// As a special exception, you may use this file as part of a free software
+// library without restriction. Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General 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 info_fn_imps.hpp
+ * Contains an implementation class for ov_tree_.
+ */
+
+PB_ASSOC_CLASS_T_DEC
+bool
+PB_ASSOC_CLASS_C_DEC::
+cmp_with_other(const PB_ASSOC_CLASS_C_DEC& r_other) const
+{
+ PB_ASSOC_DBG_ONLY(assert_valid();)
+
+ if (size() != r_other.size())
+ return (false);
+
+ const_iterator other_it = r_other.begin();
+ const_iterator it = begin();
+
+ while (it != end())
+ {
+ if (*it !=* other_it)
+ return (false);
+
+ ++it;
+
+ ++other_it;
+ }
+
+ return (true);
+}
+
+PB_ASSOC_CLASS_T_DEC
+inline typename PB_ASSOC_CLASS_C_DEC::size_type
+PB_ASSOC_CLASS_C_DEC::
+size() const
+{
+ PB_ASSOC_DBG_ONLY(assert_valid();)
+
+ return (m_size);
+}
+
+PB_ASSOC_CLASS_T_DEC
+inline typename PB_ASSOC_CLASS_C_DEC::size_type
+PB_ASSOC_CLASS_C_DEC::
+max_size() const
+{
+ return (s_alloc.max_size());
+}
+
+PB_ASSOC_CLASS_T_DEC
+inline bool
+PB_ASSOC_CLASS_C_DEC::
+empty() const
+{
+ return (size() == 0);
+}
diff --git a/libstdc++-v3/include/ext/pb_assoc/detail/ov_tree_map_/insert_fn_imps.hpp b/libstdc++-v3/include/ext/pb_assoc/detail/ov_tree_map_/insert_fn_imps.hpp
new file mode 100644
index 00000000000..e889a182e69
--- /dev/null
+++ b/libstdc++-v3/include/ext/pb_assoc/detail/ov_tree_map_/insert_fn_imps.hpp
@@ -0,0 +1,44 @@
+// -*- C++ -*-
+
+// 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.
+
+// As a special exception, you may use this file as part of a free software
+// library without restriction. Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General 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 insert_fn_imps.hpp
+ * Contains an implementation class for ov_tree_.
+ */
+
diff --git a/libstdc++-v3/include/ext/pb_assoc/detail/ov_tree_map_/iterators_fn_imps.hpp b/libstdc++-v3/include/ext/pb_assoc/detail/ov_tree_map_/iterators_fn_imps.hpp
new file mode 100644
index 00000000000..0f39b62ac13
--- /dev/null
+++ b/libstdc++-v3/include/ext/pb_assoc/detail/ov_tree_map_/iterators_fn_imps.hpp
@@ -0,0 +1,44 @@
+// -*- C++ -*-
+
+// 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.
+
+// As a special exception, you may use this file as part of a free software
+// library without restriction. Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General 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 iterators_fn_imps.hpp
+ * Contains an implementation class for ov_tree_.
+ */
+
diff --git a/libstdc++-v3/include/ext/pb_assoc/detail/ov_tree_map_/node_iterators.hpp b/libstdc++-v3/include/ext/pb_assoc/detail/ov_tree_map_/node_iterators.hpp
new file mode 100644
index 00000000000..5633d8bac20
--- /dev/null
+++ b/libstdc++-v3/include/ext/pb_assoc/detail/ov_tree_map_/node_iterators.hpp
@@ -0,0 +1,178 @@
+// -*- C++ -*-
+
+// 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.
+
+// As a special exception, you may use this file as part of a free software
+// library without restriction. Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General 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 node_iterators.hpp
+ * Contains an implementation class for ov_tree_.
+ */
+
+class const_node_iterator
+{
+
+public:
+
+ typedef trivial_iterator_tag iterator_category;
+
+ typedef trivial_iterator_difference_type difference_type;
+
+ typedef const_iterator value_type;
+
+ typedef const_iterator* pointer;
+
+ typedef const_iterator* const_pointer;
+
+ typedef const_iterator& reference;
+
+ typedef const iterator& const_reference;
+
+public:
+ inline
+ const_node_iterator(value_pointer p_nd = NULL, value_pointer p_begin_nd = NULL, value_pointer p_end_nd = NULL) : m_p_value(p_nd),
+ m_p_begin_value(p_begin_nd),
+ m_p_end_value(p_end_nd)
+ { }
+
+ inline const_iterator
+ operator*() const
+ {
+ return (m_p_value);
+ }
+
+ inline const_node_iterator
+ l_child() const
+ {
+ if (m_p_begin_value == m_p_value)
+ return (const_node_iterator(m_p_begin_value, m_p_begin_value, m_p_begin_value));
+
+ return (const_node_iterator(
+ mid_pointer(m_p_begin_value, m_p_value),
+ m_p_begin_value,
+ m_p_value));
+ }
+
+ inline const_node_iterator
+ r_child() const
+ {
+ if (m_p_value == m_p_end_value)
+ return (const_node_iterator(m_p_end_value, m_p_end_value, m_p_end_value));
+
+ return (const_node_iterator(
+ mid_pointer(m_p_value + 1, m_p_end_value),
+ m_p_value + 1,
+ m_p_end_value));
+ }
+
+ inline bool
+ operator==(const const_node_iterator& r_other) const
+ {
+ const bool is_end = m_p_begin_value == m_p_end_value;
+ const bool is_other_end = r_other.m_p_begin_value == r_other.m_p_end_value;
+
+ if (is_end)
+ return (is_other_end);
+
+ if (is_other_end)
+ return (is_end);
+
+ if (r_other.m_p_begin_value == r_other.m_p_end_value)
+ return (m_p_begin_value == m_p_end_value);
+
+ return (m_p_value == r_other.m_p_value);
+ }
+
+ inline bool
+ operator!=(const const_node_iterator& r_other) const
+ {
+ return (!operator==(r_other));
+ }
+
+private:
+ friend class PB_ASSOC_CLASS_C_DEC;
+
+public:
+ value_pointer m_p_value;
+ value_pointer m_p_begin_value;
+ value_pointer m_p_end_value;
+};
+
+class node_iterator :
+ public const_node_iterator
+
+{
+
+public:
+ inline
+ node_iterator(value_pointer p_nd = NULL, value_pointer p_begin_nd = NULL, value_pointer p_end_nd = NULL) : const_node_iterator(p_nd, p_begin_nd, p_end_nd)
+ { }
+
+ inline iterator
+ operator*() const
+ {
+ return (iterator(const_node_iterator::m_p_value));
+ }
+
+ inline node_iterator
+ l_child() const
+ {
+ if (const_node_iterator::m_p_begin_value == const_node_iterator::m_p_value)
+ return (node_iterator(const_node_iterator::m_p_begin_value, const_node_iterator::m_p_begin_value, const_node_iterator::m_p_begin_value));
+
+ return (node_iterator(
+ mid_pointer(const_node_iterator::m_p_begin_value, const_node_iterator::m_p_value),
+ const_node_iterator::m_p_begin_value,
+ const_node_iterator::m_p_value));
+ }
+
+ inline node_iterator
+ r_child() const
+ {
+ if (const_node_iterator::m_p_value == const_node_iterator::m_p_end_value)
+ return (node_iterator(const_node_iterator::m_p_end_value, const_node_iterator::m_p_end_value, const_node_iterator::m_p_end_value));
+
+ return (node_iterator(
+ mid_pointer(const_node_iterator::m_p_value + 1, const_node_iterator::m_p_end_value),
+ const_node_iterator::m_p_value + 1,
+ const_node_iterator::m_p_end_value));
+ }
+
+private:
+
+ friend class PB_ASSOC_CLASS_C_DEC;
+};
+
diff --git a/libstdc++-v3/include/ext/pb_assoc/detail/ov_tree_map_/ov_tree_map_.hpp b/libstdc++-v3/include/ext/pb_assoc/detail/ov_tree_map_/ov_tree_map_.hpp
new file mode 100644
index 00000000000..bea0bc2e14c
--- /dev/null
+++ b/libstdc++-v3/include/ext/pb_assoc/detail/ov_tree_map_/ov_tree_map_.hpp
@@ -0,0 +1,628 @@
+// -*- C++ -*-
+
+// 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.
+
+// As a special exception, you may use this file as part of a free software
+// library without restriction. Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General 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 ov_tree_map_.hpp
+ * Contains an implementation class for ov_tree_.
+ */
+
+#include <map>
+#include <set>
+#include <ext/pb_assoc/trivial_iterator_def.hpp>
+#include <ext/pb_assoc/tree_policy.hpp>
+#include <ext/pb_assoc/detail/eq_fn/eq_by_less.hpp>
+#include <ext/pb_assoc/detail/types_traits.hpp>
+#include <ext/pb_assoc/detail/map_debug_base.hpp>
+#include <ext/pb_assoc/detail/type_utils.hpp>
+#include <ext/pb_assoc/exception.hpp>
+#include <utility>
+#include <functional>
+#include <algorithm>
+#include <vector>
+#include <cassert>
+#ifdef PB_ASSOC_BASIC_REGRESSION
+#include <pb_assoc/testsuite/regression/basic_test/throw_prob_adjustor.hpp>
+#endif // #ifdef PB_ASSOC_BASIC_REGRESSION
+
+namespace pb_assoc
+{
+
+ namespace detail
+ {
+
+#ifdef PB_ASSOC_OV_TREE_DEBUG_
+#define PB_ASSOC_DBG_ASSERT(X) assert(X);
+#define PB_ASSOC_DBG_VERIFY(X) PB_ASSOC_DBG_ASSERT(X)
+#define PB_ASSOC_DBG_ONLY(X) X
+#else // #ifdef PB_ASSOC_OV_TREE_DEBUG_
+#define PB_ASSOC_DBG_ASSERT(X) ((void)0)
+#define PB_ASSOC_DBG_VERIFY(X) X
+#define PB_ASSOC_DBG_ONLY(X) ;
+#endif // #ifdef PB_ASSOC_OV_TREE_DEBUG_
+
+#define PB_ASSOC_CLASS_T_DEC \
+ template< \
+ typename Key, \
+ typename Data, \
+ class Cmp_Fn, \
+ class Allocator, \
+ class Node_Updator>
+
+#ifdef PB_ASSOC_DATA_TRUE_INDICATOR
+#define PB_ASSOC_OV_TREE_CLASS_NAME \
+ ov_tree_data_
+#endif // #ifdef PB_ASSOC_DATA_TRUE_INDICATOR
+
+#ifdef PB_ASSOC_DATA_FALSE_INDICATOR
+#define PB_ASSOC_OV_TREE_CLASS_NAME \
+ ov_tree_no_data_
+#endif // #ifdef PB_ASSOC_DATA_FALSE_INDICATOR
+
+#define PB_ASSOC_CLASS_C_DEC \
+ PB_ASSOC_OV_TREE_CLASS_NAME< \
+ Key, \
+ Data, \
+ Cmp_Fn, \
+ Allocator, \
+ Node_Updator>
+
+#define PB_ASSOC_TYPES_TRAITS_C_DEC \
+ types_traits< \
+ Key, \
+ Data, \
+ Allocator>
+
+#ifdef PB_ASSOC_USE_MAP_DEBUG_BASE
+#define PB_ASSOC_MAP_DEBUG_BASE_C_DEC \
+ pb_assoc::detail::map_debug_base< \
+ Key, \
+ eq_by_less<Key, Cmp_Fn> >
+#endif // #ifdef PB_ASSOC_USE_MAP_DEBUG_BASE
+
+#ifdef PB_ASSOC_DATA_TRUE_INDICATOR
+#define PB_ASSOC_V2F(X) (X).first
+#define PB_ASSOC_V2S(X) (X).second
+#define PB_ASSOC_EP2VP(X)& ((X)->m_value)
+#endif // #ifdef PB_ASSOC_DATA_TRUE_INDICATOR
+
+#ifdef PB_ASSOC_DATA_FALSE_INDICATOR
+#define PB_ASSOC_V2F(X) (X)
+#define PB_ASSOC_V2S(X) Mapped_Data()
+#define PB_ASSOC_EP2VP(X)& ((X)->m_value.first)
+#endif // #ifdef PB_ASSOC_DATA_FALSE_INDICATOR
+
+ template<typename Key,
+ typename Data,
+ class Cmp_Fn,
+ class Allocator,
+ class Node_Updator>
+ class PB_ASSOC_OV_TREE_CLASS_NAME :
+#ifdef PB_ASSOC_OV_TREE_DEBUG_
+ protected PB_ASSOC_MAP_DEBUG_BASE_C_DEC,
+#endif // #ifdef PB_ASSOC_OV_TREE_DEBUG_
+ public Cmp_Fn,
+ public PB_ASSOC_TYPES_TRAITS_C_DEC,
+ public Node_Updator
+ {
+
+ protected:
+
+ typedef typename Allocator::size_type size_type;
+
+ typedef typename Allocator::difference_type difference_type;
+
+ typedef
+ typename PB_ASSOC_TYPES_TRAITS_C_DEC::const_key_reference
+ const_key_reference;
+
+ typedef typename PB_ASSOC_TYPES_TRAITS_C_DEC::data_type data_type;
+
+ typedef
+ typename PB_ASSOC_TYPES_TRAITS_C_DEC::data_reference
+ data_reference;
+
+ typedef
+ typename PB_ASSOC_TYPES_TRAITS_C_DEC::const_data_reference
+ const_data_reference;
+
+ typedef typename PB_ASSOC_TYPES_TRAITS_C_DEC::value_type value_type;
+
+ typedef typename PB_ASSOC_TYPES_TRAITS_C_DEC::pointer pointer;
+
+ typedef
+ typename PB_ASSOC_TYPES_TRAITS_C_DEC::const_pointer
+ const_pointer;
+
+ typedef typename PB_ASSOC_TYPES_TRAITS_C_DEC::reference reference;
+
+ typedef
+ typename PB_ASSOC_TYPES_TRAITS_C_DEC::const_reference
+ const_reference;
+
+ typedef const_pointer const_find_iterator;
+
+ typedef pointer find_iterator;
+
+ typedef const_find_iterator const_iterator;
+
+ typedef find_iterator iterator;
+
+ typedef pointer value_pointer;
+
+#include <ext/pb_assoc/detail/ov_tree_map_/node_iterators.hpp>
+
+#include <ext/pb_assoc/detail/ov_tree_map_/cond_dtor.hpp>
+
+ typedef Cmp_Fn cmp_fn;
+
+ typedef Allocator allocator;
+
+ typedef PB_ASSOC_TYPES_TRAITS_C_DEC my_traits_base;
+
+ typedef cmp_fn my_cmp_fn_base;
+
+#ifdef PB_ASSOC_USE_MAP_DEBUG_BASE
+ typedef PB_ASSOC_MAP_DEBUG_BASE_C_DEC my_map_debug_base;
+#endif // #ifdef PB_ASSOC_USE_MAP_DEBUG_BASE
+
+ protected:
+
+ PB_ASSOC_OV_TREE_CLASS_NAME();
+
+ PB_ASSOC_OV_TREE_CLASS_NAME(const Cmp_Fn& r_cmp_fn);
+
+ PB_ASSOC_OV_TREE_CLASS_NAME(const Cmp_Fn& r_cmp_fn, const Node_Updator& r_node_updator);
+
+ PB_ASSOC_OV_TREE_CLASS_NAME(const PB_ASSOC_CLASS_C_DEC& r_other);
+
+ ~PB_ASSOC_OV_TREE_CLASS_NAME();
+
+ void
+ swap(PB_ASSOC_CLASS_C_DEC& r_other);
+
+ template<class It>
+ void
+ copy_from_range(It first_it, It last_it);
+
+ template<class Node_Updator_>
+ void
+ update(node_iterator it, Node_Updator_* p_updator)
+ {
+ if (it == node_end())
+ return;
+
+ update(it.l_child(), p_updator);
+ update(it.r_child(), p_updator);
+
+ p_updator->operator()(it.m_p_value,(it.l_child() == node_end())? NULL : it.l_child().m_p_value,(it.r_child() == node_end())? NULL : it.r_child().m_p_value);
+ }
+
+ inline void
+ update(node_iterator /*it*/, pb_assoc::null_node_updator* )
+ { }
+
+ bool
+ cmp_with_other(const PB_ASSOC_CLASS_C_DEC& r_other) const;
+
+ inline size_type
+ max_size() const;
+
+ inline bool
+ empty() const;
+
+ inline size_type
+ size() const;
+
+ Cmp_Fn&
+ get_cmp_fn();
+
+ const Cmp_Fn&
+ get_cmp_fn() const;
+
+#ifdef PB_ASSOC_DATA_TRUE_INDICATOR
+ inline data_reference
+ subscript_imp(const_key_reference r_key)
+ {
+ PB_ASSOC_DBG_ONLY(assert_valid();)
+
+ find_iterator it = lower_bound(r_key);
+
+ if (it != find_end()&& !Cmp_Fn::operator()(
+ r_key,
+ PB_ASSOC_V2F(*it)))
+ {
+ PB_ASSOC_DBG_ONLY(my_map_debug_base::check_key_exists(r_key));
+
+ PB_ASSOC_DBG_ONLY(assert_valid();)
+
+ return (it->second);
+ }
+
+ PB_ASSOC_DBG_ONLY(assert_valid();)
+
+ return (insert_new_val(it,
+ std::make_pair(r_key, data_type()))->second);
+ }
+
+ inline const_data_reference
+ subscript_imp(const_key_reference r_key) const
+ {
+ PB_ASSOC_DBG_ONLY(assert_valid();)
+
+ PB_ASSOC_DBG_ONLY(my_map_debug_base::check_key_exists(r_key));
+
+ find_iterator it = lower_bound(r_key);
+
+ PB_ASSOC_DBG_ASSERT(it != find_end());
+
+ return (it->second);
+ }
+#endif // #ifdef PB_ASSOC_DATA_TRUE_INDICATOR
+
+ inline std::pair<find_iterator, bool>
+ insert(const_reference r_value)
+ {
+ PB_ASSOC_DBG_ONLY(assert_valid();)
+
+ const_key_reference r_key = PB_ASSOC_V2F(r_value);
+
+ find_iterator it = lower_bound(r_key);
+
+ if (it != find_end()&& !Cmp_Fn::operator()(
+ r_key,
+ PB_ASSOC_V2F(*it)))
+ {
+ PB_ASSOC_DBG_ONLY(assert_valid();)
+
+ PB_ASSOC_DBG_ONLY(my_map_debug_base::check_key_exists(r_key));
+
+ return (std::make_pair(it, false));
+ }
+
+ PB_ASSOC_DBG_ONLY(assert_valid();)
+
+ return (std::make_pair(insert_new_val(it, r_value), true));
+ }
+
+ inline static pointer
+ mid_pointer(pointer p_begin, pointer p_end)
+ {
+ PB_ASSOC_DBG_ASSERT(p_end >= p_begin);
+
+ return (p_begin + (p_end - p_begin) / 2);
+ }
+
+ inline find_iterator
+ lower_bound(const_key_reference r_key)
+ {
+ pointer it = m_a_values;
+
+ difference_type dist = m_size;
+
+ while (dist > 0)
+ {
+ const difference_type mid_dist = dist >> 1;
+
+ pointer mid_it = it + mid_dist;
+
+ if (my_cmp_fn_base::operator()(
+ PB_ASSOC_V2F(*(it + mid_dist)),
+ r_key))
+ {
+ it = ++mid_it;
+
+ dist -= mid_dist + 1;
+ }
+ else
+ dist = mid_dist;
+ }
+
+ return (it);
+ }
+
+ inline const_find_iterator
+ lower_bound(const_key_reference r_key) const
+ {
+ return (const_cast<PB_ASSOC_CLASS_C_DEC& >(*this).lower_bound(r_key));
+ }
+
+ inline find_iterator
+ upper_bound(const_key_reference r_key)
+ {
+ iterator pot_it = lower_bound(r_key);
+
+ if (pot_it != find_end()&& !Cmp_Fn::operator()(
+ r_key,
+ PB_ASSOC_V2F(*pot_it)))
+ {
+ PB_ASSOC_DBG_ONLY(my_map_debug_base::check_key_exists(r_key));
+
+ return (++pot_it);
+ }
+
+ PB_ASSOC_DBG_ONLY(my_map_debug_base::check_key_does_not_exist(r_key));
+
+ return (pot_it);
+ }
+
+ inline const_find_iterator
+ upper_bound(const_key_reference r_key) const
+ {
+ return (const_cast<PB_ASSOC_CLASS_C_DEC& >(*this).upper_bound(r_key));
+ }
+
+ inline find_iterator
+ find(const_key_reference r_key)
+ {
+ PB_ASSOC_DBG_ONLY(assert_valid();)
+
+ iterator pot_it = lower_bound(r_key);
+
+ if (pot_it != find_end()&& !Cmp_Fn::operator()(
+ r_key,
+ PB_ASSOC_V2F(*pot_it)))
+ {
+ PB_ASSOC_DBG_ONLY(my_map_debug_base::check_key_exists(r_key));
+
+ return (pot_it);
+ }
+
+ PB_ASSOC_DBG_ONLY(my_map_debug_base::check_key_does_not_exist(r_key));
+
+ return (find_end());
+ }
+
+ inline const_find_iterator
+ find(const_key_reference r_key) const
+ {
+ return (const_cast<PB_ASSOC_CLASS_C_DEC& >(*this).find(r_key));
+ }
+
+ inline size_type
+ erase(const_key_reference r_key);
+
+ template<class Pred>
+ inline size_type
+ erase_if(Pred pred);
+
+ template<class It>
+ inline It
+ erase(It it);
+
+ void
+ clear();
+
+ void
+ join(PB_ASSOC_CLASS_C_DEC& r_other);
+
+ void
+ split(const_key_reference r_key, PB_ASSOC_CLASS_C_DEC& r_other);
+
+ inline iterator
+ begin()
+ {
+ return (m_a_values);
+ }
+
+ inline const_iterator
+ begin() const
+ {
+ return (m_a_values);
+ }
+
+ inline iterator
+ find_end()
+ {
+ return (end());
+ }
+
+ inline const_iterator
+ find_end() const
+ {
+ return (end());
+ }
+
+ inline iterator
+ end()
+ {
+ return (m_end_it);
+ }
+
+ inline const_iterator
+ end() const
+ {
+ return (m_end_it);
+ }
+
+ inline const_node_iterator
+ node_begin() const
+ {
+ return (const_node_iterator(mid_pointer(begin(), end()), begin(), end()));
+ }
+
+ inline node_iterator
+ node_begin()
+ {
+ return (node_iterator(mid_pointer(begin(), end()), begin(), end()));
+ }
+
+ inline const_node_iterator
+ node_end() const
+ {
+ return (const_node_iterator(end(), end(), end()));
+ }
+
+ inline node_iterator
+ node_end()
+ {
+ return (node_iterator(end(), end(), end()));
+ }
+
+ private:
+
+ inline pointer
+ insert_new_val(iterator it, const_reference r_value)
+ {
+ PB_ASSOC_DBG_ONLY(assert_valid();)
+
+#ifdef PB_ASSOC_BASIC_REGRESSION
+ throw_prob_adjustor adjust(m_size);
+#endif // #ifdef PB_ASSOC_BASIC_REGRESSION
+
+ PB_ASSOC_DBG_ONLY(my_map_debug_base::check_key_does_not_exist(
+ PB_ASSOC_V2F(r_value)));
+
+ pointer a_values = s_alloc.allocate(m_size + 1);
+
+ iterator source_it = begin();
+ iterator source_end_it = end();
+ iterator target_it = a_values;
+ iterator ret_it;
+
+ cond_dtor cd(a_values, target_it, m_size + 1);
+
+ while (source_it != it)
+ {
+ new (const_cast<void* >(
+ static_cast<const void* >(target_it)))
+ value_type(*source_it++);
+
+ ++target_it;
+ }
+
+ new (const_cast<void* >(
+ static_cast<const void* >(ret_it = target_it)))
+ value_type(r_value);
+
+ ++target_it;
+
+ while (source_it != source_end_it)
+ {
+ new (const_cast<void* >(
+ static_cast<const void* >(target_it)))
+ value_type(*source_it++);
+
+ ++target_it;
+ }
+
+ cd.set_no_action();
+
+ if (m_size != 0)
+ {
+ cond_dtor cd1(m_a_values, m_end_it, m_size);
+ }
+
+ ++m_size;
+
+ m_a_values = a_values;
+
+ m_end_it = m_a_values + m_size;
+
+ PB_ASSOC_DBG_ONLY(my_map_debug_base::insert_new(
+ PB_ASSOC_V2F(r_value)));
+
+ update(node_begin(), (Node_Updator* )this);
+
+ PB_ASSOC_DBG_ONLY(PB_ASSOC_CLASS_C_DEC::assert_valid();)
+
+ return (ret_it);
+ }
+
+#ifdef PB_ASSOC_OV_TREE_DEBUG_
+
+ virtual void
+ assert_valid() const;
+
+ void
+ assert_iterators() const;
+
+#endif // #ifdef PB_ASSOC_OV_TREE_DEBUG_
+
+ template<class It>
+ void
+ copy_from_ordered_range(It first_it, It last_it);
+
+ template<class It>
+ void
+ copy_from_ordered_range(It first_it, It last_it, It other_first_it, It other_last_it);
+
+ private:
+ typedef
+ typename PB_ASSOC_TYPES_TRAITS_C_DEC::value_type_allocator
+ value_allocator;
+
+ pointer m_a_values;
+
+ static value_allocator s_alloc;
+
+ pointer m_end_it;
+
+ size_type m_size;
+ };
+
+#include <ext/pb_assoc/detail/ov_tree_map_/constructors_destructor_fn_imps.hpp>
+#include <ext/pb_assoc/detail/ov_tree_map_/iterators_fn_imps.hpp>
+#include <ext/pb_assoc/detail/ov_tree_map_/debug_fn_imps.hpp>
+#include <ext/pb_assoc/detail/ov_tree_map_/erase_fn_imps.hpp>
+#include <ext/pb_assoc/detail/ov_tree_map_/insert_fn_imps.hpp>
+#include <ext/pb_assoc/detail/ov_tree_map_/find_fn_imps.hpp>
+#include <ext/pb_assoc/detail/ov_tree_map_/info_fn_imps.hpp>
+#include <ext/pb_assoc/detail/ov_tree_map_/split_join_fn_imps.hpp>
+
+#undef PB_ASSOC_CLASS_C_DEC
+
+#undef PB_ASSOC_CLASS_T_DEC
+
+#undef PB_ASSOC_OV_TREE_CLASS_NAME
+
+#undef PB_ASSOC_TYPES_TRAITS_C_DEC
+
+#undef PB_ASSOC_MAP_DEBUG_BASE_C_DEC
+
+#undef PB_ASSOC_V2F
+#undef PB_ASSOC_EP2VP
+#undef PB_ASSOC_V2S
+
+#undef PB_ASSOC_DBG_ASSERT
+#undef PB_ASSOC_DBG_VERIFY
+#undef PB_ASSOC_DBG_ONLY
+
+ } // namespace detail
+
+} // namespace pb_assoc
diff --git a/libstdc++-v3/include/ext/pb_assoc/detail/ov_tree_map_/split_join_fn_imps.hpp b/libstdc++-v3/include/ext/pb_assoc/detail/ov_tree_map_/split_join_fn_imps.hpp
new file mode 100644
index 00000000000..0cc8a604e3d
--- /dev/null
+++ b/libstdc++-v3/include/ext/pb_assoc/detail/ov_tree_map_/split_join_fn_imps.hpp
@@ -0,0 +1,189 @@
+// -*- C++ -*-
+
+// 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.
+
+// As a special exception, you may use this file as part of a free software
+// library without restriction. Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General 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 split_join_fn_imps.hpp
+ * Contains an implementation class for ov_tree_.
+ */
+
+PB_ASSOC_CLASS_T_DEC
+void
+PB_ASSOC_CLASS_C_DEC::
+split(const_key_reference r_key, PB_ASSOC_CLASS_C_DEC& r_other)
+{
+ PB_ASSOC_DBG_ONLY(assert_valid();)
+ PB_ASSOC_DBG_ONLY(r_other.assert_valid();)
+
+ if (m_size == 0)
+ {
+ r_other.clear();
+
+ PB_ASSOC_DBG_ONLY(assert_valid();)
+ PB_ASSOC_DBG_ONLY(r_other.assert_valid();)
+
+ return;
+ }
+
+ if (Cmp_Fn::operator()(r_key, PB_ASSOC_V2F(*begin())))
+ {
+ swap(r_other);
+
+ PB_ASSOC_DBG_ONLY(assert_valid();)
+ PB_ASSOC_DBG_ONLY(r_other.assert_valid();)
+
+ return;
+ }
+
+ if (!Cmp_Fn::operator()(
+ r_key,
+ PB_ASSOC_V2F(*(end() - 1))))
+ {
+ PB_ASSOC_DBG_ONLY(assert_valid();)
+ PB_ASSOC_DBG_ONLY(r_other.assert_valid();)
+
+ return;
+ }
+
+ if (m_size == 1)
+ {
+ swap(r_other);
+
+ PB_ASSOC_DBG_ONLY(assert_valid();)
+ PB_ASSOC_DBG_ONLY(r_other.assert_valid();)
+
+ return;
+ }
+
+#ifdef PB_ASSOC_BIN_SEARCH_TREE_DEBUG_
+ for (const_iterator it = begin(); it != end(); ++it)
+ if (Cmp_Fn::operator()(
+ r_key,
+ PB_ASSOC_V2F(*it)))
+ {
+ my_map_debug_base::erase_existing(PB_ASSOC_V2F(*it));
+ r_other.my_map_debug_base::insert_new(PB_ASSOC_V2F(*it));
+ }
+#endif // PB_ASSOC_BIN_SEARCH_TREE_DEBUG_
+
+ iterator it = upper_bound(r_key);
+
+ PB_ASSOC_CLASS_C_DEC new_other(r_other, r_other);
+
+ new_other.copy_from_ordered_range(it, end());
+
+ PB_ASSOC_CLASS_C_DEC new_this(*this, * this);
+
+ new_this.copy_from_ordered_range(begin(), it);
+
+ // No exceptions from this point.
+
+ r_other.update(r_other.node_begin(), (Node_Updator* )(&r_other));
+
+ update(node_begin(), (Node_Updator* )this);
+
+ r_other.swap(new_other);
+
+ swap(new_this);
+
+ PB_ASSOC_DBG_ONLY(assert_valid();)
+ PB_ASSOC_DBG_ONLY(r_other.assert_valid();)
+ }
+
+PB_ASSOC_CLASS_T_DEC
+void
+PB_ASSOC_CLASS_C_DEC::
+join(PB_ASSOC_CLASS_C_DEC& r_other)
+{
+ PB_ASSOC_DBG_ONLY(assert_valid();)
+ PB_ASSOC_DBG_ONLY(r_other.assert_valid();)
+
+ if (r_other.m_size == 0)
+ return;
+
+ if (m_size == 0)
+ {
+ swap(r_other);
+
+ return;
+ }
+
+ const bool greater = Cmp_Fn::operator()(
+ PB_ASSOC_V2F(*(end() - 1)),
+ PB_ASSOC_V2F(*r_other.begin()));
+
+ const bool lesser = Cmp_Fn::operator()(
+ PB_ASSOC_V2F(*(r_other.end() - 1)),
+ PB_ASSOC_V2F(*begin()));
+
+ if (!greater&& !lesser)
+ throw cannot_join();
+
+#ifdef PB_ASSOC_BIN_SEARCH_TREE_DEBUG_
+ for (const_iterator other_it = r_other.begin(); other_it != r_other.end();
+ ++other_it)
+ {
+ my_map_debug_base::insert_new(PB_ASSOC_V2F(*other_it));
+ r_other.my_map_debug_base::erase_existing(PB_ASSOC_V2F(*other_it));
+ }
+#endif // PB_ASSOC_BIN_SEARCH_TREE_DEBUG_
+
+ PB_ASSOC_CLASS_C_DEC new_this(*this, * this);
+
+ if (greater)
+ new_this.copy_from_ordered_range(
+ begin(),
+ end(),
+ r_other.begin(),
+ r_other.end());
+ else
+ new_this.copy_from_ordered_range(
+ r_other.begin(),
+ r_other.end(),
+ begin(),
+ end());
+
+ // No exceptions from this point.
+
+ swap(new_this);
+
+ r_other.clear();
+
+ PB_ASSOC_DBG_ONLY(assert_valid();)
+ PB_ASSOC_DBG_ONLY(r_other.assert_valid();)
+ }
diff --git a/libstdc++-v3/include/ext/pb_assoc/detail/rb_tree_map_/constructors_destructor_fn_imps.hpp b/libstdc++-v3/include/ext/pb_assoc/detail/rb_tree_map_/constructors_destructor_fn_imps.hpp
new file mode 100644
index 00000000000..1f9fb7f40f1
--- /dev/null
+++ b/libstdc++-v3/include/ext/pb_assoc/detail/rb_tree_map_/constructors_destructor_fn_imps.hpp
@@ -0,0 +1,116 @@
+// -*- C++ -*-
+
+// 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.
+
+// As a special exception, you may use this file as part of a free software
+// library without restriction. Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General 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 constructors_destructor_fn_imps.hpp
+ * Contains an implementation for rb_tree_.
+ */
+
+PB_ASSOC_CLASS_T_DEC
+template<class It>
+void
+PB_ASSOC_CLASS_C_DEC::
+copy_from_range(It first_it, It last_it)
+{
+ while (first_it != last_it)
+ insert(*(first_it++));
+}
+
+PB_ASSOC_CLASS_T_DEC
+PB_ASSOC_CLASS_C_DEC::
+PB_ASSOC_CLASS_NAME()
+{
+ initialize();
+
+ PB_ASSOC_DBG_ONLY(PB_ASSOC_CLASS_C_DEC::assert_valid();)
+ PB_ASSOC_DBG_ONLY(PB_ASSOC_BASE_C_DEC::assert_valid(true, true);)
+ }
+
+PB_ASSOC_CLASS_T_DEC
+PB_ASSOC_CLASS_C_DEC::
+PB_ASSOC_CLASS_NAME(const Cmp_Fn& r_cmp_fn) :
+ PB_ASSOC_BASE_C_DEC(r_cmp_fn)
+{
+ initialize();
+
+ PB_ASSOC_DBG_ONLY(PB_ASSOC_CLASS_C_DEC::assert_valid();)
+ }
+
+PB_ASSOC_CLASS_T_DEC
+PB_ASSOC_CLASS_C_DEC::
+PB_ASSOC_CLASS_NAME(const Cmp_Fn& r_cmp_fn, const Node_Updator& r_node_updator) :
+ PB_ASSOC_BASE_C_DEC(r_cmp_fn, r_node_updator)
+{
+ initialize();
+
+ PB_ASSOC_DBG_ONLY(PB_ASSOC_CLASS_C_DEC::assert_valid();)
+ }
+
+PB_ASSOC_CLASS_T_DEC
+PB_ASSOC_CLASS_C_DEC::
+PB_ASSOC_CLASS_NAME(const PB_ASSOC_CLASS_C_DEC& r_other) :
+ PB_ASSOC_BASE_C_DEC(r_other)
+{
+ initialize();
+
+ PB_ASSOC_DBG_ONLY(PB_ASSOC_CLASS_C_DEC::assert_valid();)
+ PB_ASSOC_DBG_ONLY(PB_ASSOC_BASE_C_DEC::assert_valid(true, true);)
+ }
+
+PB_ASSOC_CLASS_T_DEC
+void
+PB_ASSOC_CLASS_C_DEC::
+swap(PB_ASSOC_CLASS_C_DEC& r_other)
+{
+ PB_ASSOC_DBG_ONLY(PB_ASSOC_CLASS_C_DEC::assert_valid();)
+ PB_ASSOC_DBG_ONLY(r_other.PB_ASSOC_CLASS_C_DEC::assert_valid();)
+
+ PB_ASSOC_BASE_C_DEC::swap(r_other);
+
+ PB_ASSOC_DBG_ONLY(PB_ASSOC_CLASS_C_DEC::assert_valid();)
+ PB_ASSOC_DBG_ONLY(r_other.PB_ASSOC_CLASS_C_DEC::assert_valid();)
+ }
+
+PB_ASSOC_CLASS_T_DEC
+void
+PB_ASSOC_CLASS_C_DEC::
+initialize()
+{
+ PB_ASSOC_BASE_C_DEC::m_p_head->m_red = true;
+}
diff --git a/libstdc++-v3/include/ext/pb_assoc/detail/rb_tree_map_/debug_fn_imps.hpp b/libstdc++-v3/include/ext/pb_assoc/detail/rb_tree_map_/debug_fn_imps.hpp
new file mode 100644
index 00000000000..efedce9851e
--- /dev/null
+++ b/libstdc++-v3/include/ext/pb_assoc/detail/rb_tree_map_/debug_fn_imps.hpp
@@ -0,0 +1,87 @@
+// -*- C++ -*-
+
+// 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.
+
+// As a special exception, you may use this file as part of a free software
+// library without restriction. Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General 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_fn_imps.hpp
+ * Contains an implementation for rb_tree_.
+ */
+
+#ifdef PB_ASSOC_RB_TREE_DEBUG_
+
+PB_ASSOC_CLASS_T_DEC
+typename PB_ASSOC_CLASS_C_DEC::size_type
+PB_ASSOC_CLASS_C_DEC::
+assert_node_consistent(const node_pointer p_nd) const
+{
+ if (p_nd == NULL)
+ return (1);
+
+ const size_type l_height = assert_node_consistent(p_nd->m_p_left);
+ const size_type r_height = assert_node_consistent(p_nd->m_p_right);
+
+ if (p_nd->m_red)
+ {
+ PB_ASSOC_DBG_ASSERT(is_effectively_black(p_nd->m_p_left));
+
+ PB_ASSOC_DBG_ASSERT(is_effectively_black(p_nd->m_p_right));
+ }
+
+ PB_ASSOC_DBG_ASSERT(l_height == r_height);
+
+ return ((p_nd->m_red? 0 : 1) + l_height);
+}
+
+PB_ASSOC_CLASS_T_DEC
+void
+PB_ASSOC_CLASS_C_DEC::
+assert_valid() const
+{
+ PB_ASSOC_DBG_ASSERT(PB_ASSOC_BASE_C_DEC::m_p_head->m_red);
+
+ if (PB_ASSOC_BASE_C_DEC::m_p_head->m_p_parent != NULL)
+ {
+ PB_ASSOC_DBG_ASSERT(PB_ASSOC_BASE_C_DEC::m_p_head->m_p_parent->m_red
+ == false);
+
+ assert_node_consistent(PB_ASSOC_BASE_C_DEC::m_p_head->m_p_parent);
+ }
+}
+
+#endif // #ifdef PB_ASSOC_RB_TREE_DEBUG_
+
diff --git a/libstdc++-v3/include/ext/pb_assoc/detail/rb_tree_map_/erase_fn_imps.hpp b/libstdc++-v3/include/ext/pb_assoc/detail/rb_tree_map_/erase_fn_imps.hpp
new file mode 100644
index 00000000000..3d5461fc639
--- /dev/null
+++ b/libstdc++-v3/include/ext/pb_assoc/detail/rb_tree_map_/erase_fn_imps.hpp
@@ -0,0 +1,403 @@
+// -*- C++ -*-
+
+// 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.
+
+// As a special exception, you may use this file as part of a free software
+// library without restriction. Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General 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 erase_fn_imps.hpp
+ * Contains an implementation for rb_tree_.
+ */
+
+PB_ASSOC_CLASS_T_DEC
+inline typename PB_ASSOC_CLASS_C_DEC::size_type
+PB_ASSOC_CLASS_C_DEC::
+erase(const_key_reference r_key)
+{
+ iterator it = find(r_key);
+
+ if (it == PB_ASSOC_BASE_C_DEC::find_end())
+ return (0);
+
+ erase(it);
+
+ return (1);
+}
+
+PB_ASSOC_CLASS_T_DEC
+inline typename PB_ASSOC_CLASS_C_DEC::const_iterator
+PB_ASSOC_CLASS_C_DEC::
+erase(const_iterator it)
+{
+ PB_ASSOC_DBG_ONLY(assert_valid());
+ PB_ASSOC_DBG_ONLY(PB_ASSOC_BASE_C_DEC::assert_valid(true, false);)
+
+ if (it == PB_ASSOC_BASE_C_DEC::find_end())
+ return (it);
+
+ const_iterator ret_it = it;
+
+ ++ret_it;
+
+ erase_node(it.m_p_nd);
+
+ PB_ASSOC_DBG_ONLY(assert_valid());
+ PB_ASSOC_DBG_ONLY(PB_ASSOC_BASE_C_DEC::assert_valid(true, false);)
+
+ return (ret_it);
+}
+
+#ifdef PB_ASSOC_DATA_TRUE_INDICATOR
+PB_ASSOC_CLASS_T_DEC
+inline typename PB_ASSOC_CLASS_C_DEC::iterator
+PB_ASSOC_CLASS_C_DEC::
+erase(iterator it)
+{
+ PB_ASSOC_DBG_ONLY(PB_ASSOC_CLASS_C_DEC::assert_valid());
+ PB_ASSOC_DBG_ONLY(PB_ASSOC_BASE_C_DEC::assert_iterators();)
+
+ if (it == PB_ASSOC_BASE_C_DEC::find_end())
+ return (it);
+
+ iterator ret_it = it;
+
+ ++ret_it;
+
+ erase_node(it.m_p_nd);
+
+ PB_ASSOC_DBG_ONLY(PB_ASSOC_CLASS_C_DEC::assert_valid());
+ PB_ASSOC_DBG_ONLY(PB_ASSOC_BASE_C_DEC::assert_iterators();)
+
+ return (ret_it);
+}
+#endif // #ifdef PB_ASSOC_DATA_TRUE_INDICATOR
+
+PB_ASSOC_CLASS_T_DEC
+inline typename PB_ASSOC_CLASS_C_DEC::const_reverse_iterator
+PB_ASSOC_CLASS_C_DEC::
+erase(const_reverse_iterator it)
+{
+ PB_ASSOC_DBG_ONLY(PB_ASSOC_CLASS_C_DEC::assert_valid());
+ PB_ASSOC_DBG_ONLY(PB_ASSOC_BASE_C_DEC::assert_iterators();)
+
+ if (it == PB_ASSOC_BASE_C_DEC::find_rend())
+ return (it);
+
+ const_reverse_iterator ret_it = it;
+
+ ++ret_it;
+
+ erase_node(it.m_p_nd);
+
+ PB_ASSOC_DBG_ONLY(PB_ASSOC_CLASS_C_DEC::assert_valid());
+ PB_ASSOC_DBG_ONLY(PB_ASSOC_BASE_C_DEC::assert_iterators();)
+
+ return (ret_it);
+}
+
+#ifdef PB_ASSOC_DATA_TRUE_INDICATOR
+PB_ASSOC_CLASS_T_DEC
+inline typename PB_ASSOC_CLASS_C_DEC::reverse_iterator
+PB_ASSOC_CLASS_C_DEC::
+erase(reverse_iterator it)
+{
+ PB_ASSOC_DBG_ONLY(PB_ASSOC_CLASS_C_DEC::assert_valid());
+
+ if (it == PB_ASSOC_BASE_C_DEC::find_rend())
+ return (it);
+
+ reverse_iterator ret_it = it;
+
+ ++ret_it;
+
+ erase_node(it.m_p_nd);
+
+ PB_ASSOC_DBG_ONLY(PB_ASSOC_CLASS_C_DEC::assert_valid());
+
+ return (ret_it);
+}
+#endif // #ifdef PB_ASSOC_DATA_TRUE_INDICATOR
+
+PB_ASSOC_CLASS_T_DEC
+template<class Pred>
+inline typename PB_ASSOC_CLASS_C_DEC::size_type
+PB_ASSOC_CLASS_C_DEC::
+erase_if(Pred pred)
+{
+ PB_ASSOC_DBG_ONLY(PB_ASSOC_CLASS_C_DEC::assert_valid();)
+
+ size_type num_ersd = 0;
+
+ iterator it = PB_ASSOC_BASE_C_DEC::begin();
+
+ while (it != PB_ASSOC_BASE_C_DEC::end())
+ if (pred(*it))
+ {
+ ++num_ersd;
+
+ it = erase(it);
+ }
+ else
+ ++it;
+
+ PB_ASSOC_DBG_ONLY(PB_ASSOC_CLASS_C_DEC::assert_valid();)
+
+ return (num_ersd);
+}
+
+PB_ASSOC_CLASS_T_DEC
+void
+PB_ASSOC_CLASS_C_DEC::
+erase_node(node_pointer p_nd)
+{
+ remove_node(p_nd);
+
+ PB_ASSOC_BASE_C_DEC::actual_erase_node(p_nd);
+
+ PB_ASSOC_DBG_ONLY(assert_valid());
+ PB_ASSOC_DBG_ONLY(PB_ASSOC_BASE_C_DEC::assert_valid(true, false);)
+ }
+
+PB_ASSOC_CLASS_T_DEC
+void
+PB_ASSOC_CLASS_C_DEC::
+remove_node(node_pointer p_z)
+{
+ update_min_max_for_erased_node(p_z);
+
+ node_pointer p_y = p_z;
+
+ node_pointer p_x = NULL;
+
+ node_pointer p_new_x_parent = NULL;
+
+ if (p_y->m_p_left == NULL)
+ p_x = p_y->m_p_right;
+ else if (p_y->m_p_right == NULL)
+ p_x = p_y->m_p_left;
+ else
+ {
+ p_y = p_y->m_p_right;
+
+ while (p_y->m_p_left != NULL)
+ p_y = p_y->m_p_left;
+
+ p_x = p_y->m_p_right;
+ }
+
+ if (p_y == p_z)
+ {
+ p_new_x_parent = p_y->m_p_parent;
+
+ if (p_x != NULL)
+ p_x->m_p_parent = p_y->m_p_parent;
+
+ if (PB_ASSOC_BASE_C_DEC::m_p_head->m_p_parent == p_z)
+ PB_ASSOC_BASE_C_DEC::m_p_head->m_p_parent = p_x;
+ else if (p_z->m_p_parent->m_p_left == p_z)
+ {
+ p_y->m_p_left = p_z->m_p_parent;
+
+ p_z->m_p_parent->m_p_left = p_x;
+ }
+ else
+ {
+ p_y->m_p_left = NULL;
+
+ p_z->m_p_parent->m_p_right = p_x;
+ }
+ }
+ else
+ {
+ p_z->m_p_left->m_p_parent = p_y;
+
+ p_y->m_p_left = p_z->m_p_left;
+
+ if (p_y != p_z->m_p_right)
+ {
+ p_new_x_parent = p_y->m_p_parent;
+
+ if (p_x != NULL)
+ p_x->m_p_parent = p_y->m_p_parent;
+
+ p_y->m_p_parent->m_p_left = p_x;
+
+ p_y->m_p_right = p_z->m_p_right;
+
+ p_z->m_p_right->m_p_parent = p_y;
+ }
+ else
+ p_new_x_parent = p_y;
+
+ if (PB_ASSOC_BASE_C_DEC::m_p_head->m_p_parent == p_z)
+ PB_ASSOC_BASE_C_DEC::m_p_head->m_p_parent = p_y;
+ else if (p_z->m_p_parent->m_p_left == p_z)
+ p_z->m_p_parent->m_p_left = p_y;
+ else
+ p_z->m_p_parent->m_p_right = p_y;
+
+ p_y->m_p_parent = p_z->m_p_parent;
+
+ std::swap(p_y->m_red, p_z->m_red);
+
+ p_y = p_z;
+ }
+
+ update_to_top(p_new_x_parent, (Node_Updator* )this);
+
+ if (p_y->m_red)
+ return;
+
+ remove_fixup(p_x, p_new_x_parent);
+}
+
+PB_ASSOC_CLASS_T_DEC
+void
+PB_ASSOC_CLASS_C_DEC::
+remove_fixup(node_pointer p_x, node_pointer p_new_x_parent)
+{
+ PB_ASSOC_DBG_ASSERT(p_x == NULL || p_x->m_p_parent == p_new_x_parent);
+
+ while (p_x != PB_ASSOC_BASE_C_DEC::m_p_head->m_p_parent&&
+ is_effectively_black(p_x))
+ if (p_x == p_new_x_parent->m_p_left)
+ {
+ node_pointer p_w = p_new_x_parent->m_p_right;
+
+ if (p_w->m_red)
+ {
+ p_w->m_red = false;
+
+ p_new_x_parent->m_red = true;
+
+ PB_ASSOC_BASE_C_DEC::rotate_left(p_new_x_parent);
+
+ p_w = p_new_x_parent->m_p_right;
+ }
+
+ if (is_effectively_black(p_w->m_p_left)&&
+ is_effectively_black(p_w->m_p_right))
+ {
+ p_w->m_red = true;
+
+ p_x = p_new_x_parent;
+
+ p_new_x_parent = p_new_x_parent->m_p_parent;
+ }
+ else
+ {
+ if (is_effectively_black(p_w->m_p_right))
+ {
+ if (p_w->m_p_left != NULL)
+ p_w->m_p_left->m_red = false;
+
+ p_w->m_red = true;
+
+ PB_ASSOC_BASE_C_DEC::rotate_right(p_w);
+
+ p_w = p_new_x_parent->m_p_right;
+ }
+
+ p_w->m_red = p_new_x_parent->m_red;
+
+ p_new_x_parent->m_red = false;
+
+ if (p_w->m_p_right != NULL)
+ p_w->m_p_right->m_red = false;
+
+ PB_ASSOC_BASE_C_DEC::rotate_left(p_new_x_parent);
+
+ update_to_top(p_new_x_parent, (Node_Updator* )this);
+
+ break;
+ }
+ }
+ else
+ {
+ node_pointer p_w = p_new_x_parent->m_p_left;
+
+ if (p_w->m_red == true)
+ {
+ p_w->m_red = false;
+
+ p_new_x_parent->m_red = true;
+
+ PB_ASSOC_BASE_C_DEC::rotate_right(p_new_x_parent);
+
+ p_w = p_new_x_parent->m_p_left;
+ }
+
+ if (is_effectively_black(p_w->m_p_right)&&
+ is_effectively_black(p_w->m_p_left))
+ {
+ p_w->m_red = true;
+
+ p_x = p_new_x_parent;
+
+ p_new_x_parent = p_new_x_parent->m_p_parent;
+ }
+ else
+ {
+ if (is_effectively_black(p_w->m_p_left))
+ {
+ if (p_w->m_p_right != NULL)
+ p_w->m_p_right->m_red = false;
+
+ p_w->m_red = true;
+
+ PB_ASSOC_BASE_C_DEC::rotate_left(p_w);
+
+ p_w = p_new_x_parent->m_p_left;
+ }
+
+ p_w->m_red = p_new_x_parent->m_red;
+
+ p_new_x_parent->m_red = false;
+
+ if (p_w->m_p_left != NULL)
+ p_w->m_p_left->m_red = false;
+
+ PB_ASSOC_BASE_C_DEC::rotate_right(p_new_x_parent);
+
+ update_to_top(p_new_x_parent, (Node_Updator* )this);
+
+ break;
+ }
+ }
+
+ if (p_x != NULL)
+ p_x->m_red = false;
+}
diff --git a/libstdc++-v3/include/ext/pb_assoc/detail/rb_tree_map_/find_fn_imps.hpp b/libstdc++-v3/include/ext/pb_assoc/detail/rb_tree_map_/find_fn_imps.hpp
new file mode 100644
index 00000000000..c0984298f68
--- /dev/null
+++ b/libstdc++-v3/include/ext/pb_assoc/detail/rb_tree_map_/find_fn_imps.hpp
@@ -0,0 +1,44 @@
+// -*- C++ -*-
+
+// 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.
+
+// As a special exception, you may use this file as part of a free software
+// library without restriction. Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General 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 find_fn_imps.hpp
+ * Contains an implementation for rb_tree_.
+ */
+
diff --git a/libstdc++-v3/include/ext/pb_assoc/detail/rb_tree_map_/info_fn_imps.hpp b/libstdc++-v3/include/ext/pb_assoc/detail/rb_tree_map_/info_fn_imps.hpp
new file mode 100644
index 00000000000..84a452df956
--- /dev/null
+++ b/libstdc++-v3/include/ext/pb_assoc/detail/rb_tree_map_/info_fn_imps.hpp
@@ -0,0 +1,52 @@
+// -*- C++ -*-
+
+// 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.
+
+// As a special exception, you may use this file as part of a free software
+// library without restriction. Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General 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 info_fn_imps.hpp
+ * Contains an implementation for rb_tree_.
+ */
+
+PB_ASSOC_CLASS_T_DEC
+inline bool
+PB_ASSOC_CLASS_C_DEC::
+is_effectively_black(const node_pointer p_nd)
+{
+ return (p_nd == NULL || !p_nd->m_red);
+}
+
diff --git a/libstdc++-v3/include/ext/pb_assoc/detail/rb_tree_map_/insert_fn_imps.hpp b/libstdc++-v3/include/ext/pb_assoc/detail/rb_tree_map_/insert_fn_imps.hpp
new file mode 100644
index 00000000000..413707817bc
--- /dev/null
+++ b/libstdc++-v3/include/ext/pb_assoc/detail/rb_tree_map_/insert_fn_imps.hpp
@@ -0,0 +1,176 @@
+// -*- C++ -*-
+
+// 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.
+
+// As a special exception, you may use this file as part of a free software
+// library without restriction. Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General 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 insert_fn_imps.hpp
+ * Contains an implementation for rb_tree_.
+ */
+
+PB_ASSOC_CLASS_T_DEC
+inline std::pair<typename PB_ASSOC_CLASS_C_DEC::find_iterator, bool>
+PB_ASSOC_CLASS_C_DEC::
+insert(const_reference r_value)
+{
+ PB_ASSOC_DBG_ONLY(PB_ASSOC_CLASS_C_DEC::assert_valid();)
+
+ std::pair<find_iterator, bool> ins_pair =
+ PB_ASSOC_BASE_C_DEC::insert_leaf(r_value);
+
+ if (ins_pair.second == true)
+ {
+ ins_pair.first.m_p_nd->m_red = true;
+
+ PB_ASSOC_DBG_ONLY(PB_ASSOC_BASE_C_DEC::assert_valid(false, true);)
+
+ insert_fixup(ins_pair.first.m_p_nd);
+ }
+
+ PB_ASSOC_DBG_ONLY(PB_ASSOC_BASE_C_DEC::assert_valid(true, true);)
+ PB_ASSOC_DBG_ONLY(PB_ASSOC_CLASS_C_DEC::assert_valid());
+
+ return (ins_pair);
+}
+
+#ifdef PB_ASSOC_DATA_TRUE_INDICATOR
+PB_ASSOC_CLASS_T_DEC
+inline typename PB_ASSOC_CLASS_C_DEC::data_reference
+PB_ASSOC_CLASS_C_DEC::
+subscript_imp(const_key_reference r_key)
+{
+ PB_ASSOC_DBG_ONLY(PB_ASSOC_CLASS_C_DEC::assert_valid();)
+
+ std::pair<find_iterator, bool> ins_pair =
+ PB_ASSOC_BASE_C_DEC::insert_leaf(
+ value_type(r_key, data_type()));
+
+ if (ins_pair.second == true)
+ {
+ ins_pair.first.m_p_nd->m_red = true;
+
+ PB_ASSOC_DBG_ONLY(PB_ASSOC_BASE_C_DEC::assert_valid());
+
+ insert_fixup(ins_pair.first.m_p_nd);
+ }
+
+ PB_ASSOC_DBG_ONLY(PB_ASSOC_CLASS_C_DEC::assert_valid());
+ PB_ASSOC_DBG_ONLY(PB_ASSOC_BASE_C_DEC::assert_iterators();)
+
+ return (ins_pair.first.m_p_nd->m_value.second);
+}
+#endif // #ifdef PB_ASSOC_DATA_TRUE
+
+PB_ASSOC_CLASS_T_DEC
+inline void
+PB_ASSOC_CLASS_C_DEC::
+insert_fixup(node_pointer p_nd)
+{
+ PB_ASSOC_DBG_ASSERT(p_nd->m_red == true);
+
+ while (p_nd != PB_ASSOC_BASE_C_DEC::m_p_head->m_p_parent&&
+ p_nd->m_p_parent->m_red)
+ {
+ if (p_nd->m_p_parent == p_nd->m_p_parent->m_p_parent->m_p_left)
+ {
+ node_pointer p_y = p_nd->m_p_parent->m_p_parent->m_p_right;
+
+ if (p_y != NULL&& p_y->m_red)
+ {
+ p_nd->m_p_parent->m_red = false;
+
+ p_y->m_red = false;
+
+ p_nd->m_p_parent->m_p_parent->m_red = true;
+
+ p_nd = p_nd->m_p_parent->m_p_parent;
+ }
+ else
+ {
+ if (p_nd == p_nd->m_p_parent->m_p_right)
+ {
+ p_nd = p_nd->m_p_parent;
+
+ PB_ASSOC_BASE_C_DEC::rotate_left(p_nd);
+ }
+
+ p_nd->m_p_parent->m_red = false;
+
+ p_nd->m_p_parent->m_p_parent->m_red = true;
+
+ PB_ASSOC_BASE_C_DEC::rotate_right(
+ p_nd->m_p_parent->m_p_parent);
+ }
+ }
+ else
+ {
+ node_pointer p_y = p_nd->m_p_parent->m_p_parent->m_p_left;
+
+ if (p_y != NULL&& p_y->m_red)
+ {
+ p_nd->m_p_parent->m_red = false;
+
+ p_y->m_red = false;
+
+ p_nd->m_p_parent->m_p_parent->m_red = true;
+
+ p_nd = p_nd->m_p_parent->m_p_parent;
+ }
+ else
+ {
+ if (p_nd == p_nd->m_p_parent->m_p_left)
+ {
+ p_nd = p_nd->m_p_parent;
+
+ PB_ASSOC_BASE_C_DEC::rotate_right(p_nd);
+ }
+
+ p_nd->m_p_parent->m_red = false;
+
+ p_nd->m_p_parent->m_p_parent->m_red = true;
+
+ PB_ASSOC_BASE_C_DEC::rotate_left(
+ p_nd->m_p_parent->m_p_parent);
+ }
+ }
+ }
+
+ PB_ASSOC_BASE_C_DEC::update_to_top(p_nd, (Node_Updator* )this);
+
+ PB_ASSOC_BASE_C_DEC::m_p_head->m_p_parent->m_red = false;
+}
+
diff --git a/libstdc++-v3/include/ext/pb_assoc/detail/rb_tree_map_/node.hpp b/libstdc++-v3/include/ext/pb_assoc/detail/rb_tree_map_/node.hpp
new file mode 100644
index 00000000000..9a5773bc8e7
--- /dev/null
+++ b/libstdc++-v3/include/ext/pb_assoc/detail/rb_tree_map_/node.hpp
@@ -0,0 +1,89 @@
+// -*- C++ -*-
+
+// 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.
+
+// As a special exception, you may use this file as part of a free software
+// library without restriction. Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General 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 node.hpp
+ * Contains an implementation for rb_tree_.
+ */
+
+#ifndef RB_TREE_NODE_HPP
+#define RB_TREE_NODE_HPP
+
+namespace pb_assoc
+{
+
+ namespace detail
+ {
+
+ template<class Value_Type, class Allocator>
+ struct rb_tree_node_
+ {
+ public:
+ typedef
+ typename Allocator::template rebind<
+ rb_tree_node_<
+ Value_Type,
+ Allocator> >::other::pointer
+ node_pointer;
+
+ public:
+ inline bool
+ special_dec_check() const
+ {
+ return (m_red);
+ }
+
+ public:
+ node_pointer m_p_left;
+ node_pointer m_p_right;
+
+ node_pointer m_p_parent;
+
+ typedef Value_Type value_type;
+
+ value_type m_value;
+
+ bool m_red;
+ };
+
+ } // namespace detail
+
+} // namespace pb_assoc
+
+#endif // #ifndef RB_TREE_NODE_HPP
diff --git a/libstdc++-v3/include/ext/pb_assoc/detail/rb_tree_map_/rb_tree_.hpp b/libstdc++-v3/include/ext/pb_assoc/detail/rb_tree_map_/rb_tree_.hpp
new file mode 100644
index 00000000000..f890323dada
--- /dev/null
+++ b/libstdc++-v3/include/ext/pb_assoc/detail/rb_tree_map_/rb_tree_.hpp
@@ -0,0 +1,360 @@
+// -*- C++ -*-
+
+// 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.
+
+// As a special exception, you may use this file as part of a free software
+// library without restriction. Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General 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 rb_tree_.hpp
+ * Contains an implementation for rb_tree_.
+ */
+
+/*
+ * This implementation uses an idea from the SGI STL (using a "header" node
+ * which is needed for efficient iteration).
+ */
+
+#ifdef PB_ASSOC_DATA_TRUE_INDICATOR
+#ifndef BIN_SEARCH_TREE_HPP__DATA_TRUE_INDICATOR
+#define BIN_SEARCH_TREE_HPP__DATA_TRUE_INDICATOR
+#include <ext/pb_assoc/detail/bin_search_tree_/bin_search_tree_.hpp>
+#endif // #ifndef BIN_SEARCH_TREE_HPP__DATA_TRUE_INDICATOR
+#endif // #ifdef PB_ASSOC_DATA_TRUE_INDICATOR
+
+#ifdef PB_ASSOC_DATA_FALSE_INDICATOR
+#ifndef BIN_SEARCH_TREE_HPP__DATA_FALSE_INDICATOR
+#define BIN_SEARCH_TREE_HPP__DATA_FALSE_INDICATOR
+#include <ext/pb_assoc/detail/bin_search_tree_/bin_search_tree_.hpp>
+#endif // #ifndef BIN_SEARCH_TREE_HPP__DATA_FALSE_INDICATOR
+#endif // #ifdef PB_ASSOC_DATA_FALSE_INDICATOR
+
+#include <ext/pb_assoc/tree_policy.hpp>
+#include <ext/pb_assoc/detail/standard_policies.hpp>
+#include <ext/pb_assoc/detail/rb_tree_map_/node.hpp>
+#include <utility>
+#include <vector>
+#include <assert.h>
+
+namespace pb_assoc
+{
+
+ namespace detail
+ {
+
+#ifdef PB_ASSOC_RB_TREE_DEBUG_
+#define PB_ASSOC_DBG_ASSERT(X) assert(X)
+#define PB_ASSOC_DBG_VERIFY(X) assert(X)
+#define PB_ASSOC_DBG_ONLY(X) X
+#else // #ifdef PB_ASSOC_RB_TREE_DEBUG_
+#define PB_ASSOC_DBG_ASSERT(X)
+#define PB_ASSOC_DBG_VERIFY(X) {if((X)==0);}
+#define PB_ASSOC_DBG_ONLY(X) ;
+#endif // #ifdef PB_ASSOC_RB_TREE_DEBUG_
+
+#define PB_ASSOC_CLASS_T_DEC \
+ template< \
+ typename Key, \
+ typename Data, \
+ class Cmp_Fn, \
+ class Allocator, \
+ class Node_Updator>
+
+#ifdef PB_ASSOC_DATA_TRUE_INDICATOR
+#define PB_ASSOC_CLASS_NAME \
+ rb_tree_data_
+#endif // #ifdef PB_ASSOC_DATA_TRUE_INDICATOR
+
+#ifdef PB_ASSOC_DATA_FALSE_INDICATOR
+#define PB_ASSOC_CLASS_NAME \
+ rb_tree_no_data_
+#endif // #ifdef PB_ASSOC_DATA_FALSE_INDICATOR
+
+#ifdef PB_ASSOC_DATA_TRUE_INDICATOR
+#define PB_ASSOC_BASE_CLASS_NAME \
+ bin_search_tree_data_
+#endif // #ifdef PB_ASSOC_DATA_TRUE_INDICATOR
+
+#ifdef PB_ASSOC_DATA_FALSE_INDICATOR
+#define PB_ASSOC_BASE_CLASS_NAME \
+ bin_search_tree_no_data_
+#endif // #ifdef PB_ASSOC_DATA_FALSE_INDICATOR
+
+#define PB_ASSOC_CLASS_C_DEC \
+ PB_ASSOC_CLASS_NAME< \
+ Key, \
+ Data, \
+ Cmp_Fn, \
+ Allocator, \
+ Node_Updator>
+
+#define PB_ASSOC_TYPES_TRAITS_C_DEC \
+ types_traits< \
+ Key, \
+ Data, \
+ Allocator>
+
+#define PB_ASSOC_NODE_C_DEC \
+ rb_tree_node_< \
+ typename PB_ASSOC_TYPES_TRAITS_C_DEC::value_type, \
+ Allocator>
+
+#define PB_ASSOC_BASE_C_DEC \
+ PB_ASSOC_BASE_CLASS_NAME< \
+ Key, \
+ Data, \
+ PB_ASSOC_NODE_C_DEC, \
+ Cmp_Fn, \
+ Allocator, \
+ Node_Updator>
+
+#ifdef PB_ASSOC_DATA_TRUE_INDICATOR
+#define PB_ASSOC_V2F(X) (X).first
+#define PB_ASSOC_V2S(X) (X).second
+#define PB_ASSOC_EP2VP(X)& ((X)->m_value)
+#endif // #ifdef PB_ASSOC_DATA_TRUE_INDICATOR
+
+#ifdef PB_ASSOC_DATA_FALSE_INDICATOR
+#define PB_ASSOC_V2F(X) (X)
+#define PB_ASSOC_V2S(X) Mapped_Data()
+#define PB_ASSOC_EP2VP(X)& ((X)->m_value.first)
+#endif // #ifdef PB_ASSOC_DATA_FALSE_INDICATOR
+
+ template<typename Key,
+ typename Data,
+ class Cmp_Fn,
+ class Allocator,
+ class Node_Updator>
+ struct PB_ASSOC_CLASS_NAME : public PB_ASSOC_BASE_C_DEC
+ {
+
+ public:
+
+ typedef typename Allocator::size_type size_type;
+
+ typedef
+ typename PB_ASSOC_TYPES_TRAITS_C_DEC::const_key_reference
+ const_key_reference;
+
+ typedef typename PB_ASSOC_TYPES_TRAITS_C_DEC::data_type data_type;
+
+ typedef
+ typename PB_ASSOC_TYPES_TRAITS_C_DEC::data_reference
+ data_reference;
+
+ typedef
+ typename PB_ASSOC_TYPES_TRAITS_C_DEC::const_data_reference
+ const_data_reference;
+
+ typedef typename PB_ASSOC_TYPES_TRAITS_C_DEC::value_type value_type;
+
+ typedef typename PB_ASSOC_TYPES_TRAITS_C_DEC::pointer pointer;
+
+ typedef
+ typename PB_ASSOC_TYPES_TRAITS_C_DEC::const_pointer
+ const_pointer;
+
+ typedef typename PB_ASSOC_TYPES_TRAITS_C_DEC::reference reference;
+
+ typedef
+ typename PB_ASSOC_TYPES_TRAITS_C_DEC::const_reference
+ const_reference;
+
+ typedef typename PB_ASSOC_BASE_C_DEC::find_iterator find_iterator;
+
+ typedef
+ typename PB_ASSOC_BASE_C_DEC::const_iterator
+ const_find_iterator;
+
+ typedef typename PB_ASSOC_BASE_C_DEC::iterator iterator;
+
+ typedef typename PB_ASSOC_BASE_C_DEC::const_iterator const_iterator;
+
+ typedef
+ typename PB_ASSOC_BASE_C_DEC::reverse_iterator
+ reverse_iterator;
+
+ typedef
+ typename PB_ASSOC_BASE_C_DEC::const_reverse_iterator
+ const_reverse_iterator;
+
+ private:
+
+ typedef typename PB_ASSOC_BASE_C_DEC::node_pointer node_pointer;
+
+ protected:
+
+ PB_ASSOC_CLASS_NAME();
+
+ PB_ASSOC_CLASS_NAME(const Cmp_Fn& r_cmp_fn);
+
+ PB_ASSOC_CLASS_NAME(const Cmp_Fn& r_cmp_fn, const Node_Updator& r_node_updator);
+
+ PB_ASSOC_CLASS_NAME(const PB_ASSOC_CLASS_C_DEC& r_other);
+
+ void
+ swap(PB_ASSOC_CLASS_C_DEC& r_other);
+
+ template<class It>
+ void
+ copy_from_range(It first_it, It last_it);
+
+ inline std::pair<find_iterator, bool>
+ insert(const_reference r_value);
+
+#ifdef PB_ASSOC_DATA_TRUE_INDICATOR
+ inline data_reference
+ subscript_imp(const_key_reference r_key);
+#endif // #ifdef PB_ASSOC_DATA_TRUE
+
+ inline static bool
+ is_effectively_black(const node_pointer p_nd);
+
+ inline size_type
+ erase(const_key_reference r_key);
+
+ inline const_iterator
+ erase(const_iterator it);
+
+#ifdef PB_ASSOC_DATA_TRUE_INDICATOR
+ inline iterator
+ erase(iterator it);
+#endif // #ifdef PB_ASSOC_DATA_TRUE_INDICATOR
+
+ inline const_reverse_iterator
+ erase(const_reverse_iterator it);
+
+#ifdef PB_ASSOC_DATA_TRUE_INDICATOR
+ inline reverse_iterator
+ erase(reverse_iterator it);
+#endif // #ifdef PB_ASSOC_DATA_TRUE_INDICATOR
+
+ template<class Pred>
+ inline size_type
+ erase_if(Pred pred);
+
+ void
+ join(PB_ASSOC_CLASS_C_DEC& r_other);
+
+ void
+ split(const_key_reference r_key, PB_ASSOC_CLASS_C_DEC& r_other);
+
+#ifdef PB_ASSOC_RB_TREE_DEBUG_
+
+ virtual void
+ assert_valid() const;
+
+ size_type
+ assert_node_consistent(const node_pointer p_nd) const;
+
+#endif // #ifdef PB_ASSOC_RB_TREE_DEBUG_
+
+ private:
+
+ void
+ initialize();
+
+ void
+ insert_fixup(node_pointer p_nd);
+
+ void
+ erase_node(node_pointer p_nd);
+
+ void
+ remove_node(node_pointer p_nd);
+
+ void
+ remove_fixup(node_pointer p_x, node_pointer p_new_x_parent);
+
+ void
+ split_imp(node_pointer p_nd, PB_ASSOC_CLASS_C_DEC& r_other);
+
+ inline node_pointer
+ split_min();
+
+ std::pair<node_pointer, node_pointer>
+ split_min_imp();
+
+ void
+ join_imp(node_pointer p_x, node_pointer p_r);
+
+ std::pair<node_pointer, node_pointer>
+ find_join_pos_right(node_pointer p_l, size_type h_l, size_type h_r);
+
+ std::pair<node_pointer, node_pointer>
+ find_join_pos_left(node_pointer p_r, size_type h_l, size_type h_r);
+
+ inline size_type
+ black_height(node_pointer p_nd);
+
+ void
+ split_at_node(node_pointer p_nd, PB_ASSOC_CLASS_C_DEC& r_other);
+
+ };
+
+#include <ext/pb_assoc/detail/rb_tree_map_/constructors_destructor_fn_imps.hpp>
+#include <ext/pb_assoc/detail/rb_tree_map_/insert_fn_imps.hpp>
+#include <ext/pb_assoc/detail/rb_tree_map_/erase_fn_imps.hpp>
+#include <ext/pb_assoc/detail/rb_tree_map_/find_fn_imps.hpp>
+#include <ext/pb_assoc/detail/rb_tree_map_/debug_fn_imps.hpp>
+#include <ext/pb_assoc/detail/rb_tree_map_/split_join_fn_imps.hpp>
+#include <ext/pb_assoc/detail/rb_tree_map_/info_fn_imps.hpp>
+
+#undef PB_ASSOC_CLASS_T_DEC
+
+#undef PB_ASSOC_CLASS_C_DEC
+
+#undef PB_ASSOC_CLASS_NAME
+
+#undef PB_ASSOC_TYPES_TRAITS_C_DEC
+
+#undef PB_ASSOC_BASE_CLASS_NAME
+
+#undef PB_ASSOC_NODE_C_DEC
+
+#undef PB_ASSOC_BASE_C_DEC
+
+#undef PB_ASSOC_DBG_ASSERT
+#undef PB_ASSOC_DBG_VERIFY
+#undef PB_ASSOC_DBG_ONLY
+
+#undef PB_ASSOC_V2F
+#undef PB_ASSOC_EP2VP
+#undef PB_ASSOC_V2S
+
+ } // namespace detail
+
+} // namespace pb_assoc
+
diff --git a/libstdc++-v3/include/ext/pb_assoc/detail/rb_tree_map_/split_join_fn_imps.hpp b/libstdc++-v3/include/ext/pb_assoc/detail/rb_tree_map_/split_join_fn_imps.hpp
new file mode 100644
index 00000000000..211a5249642
--- /dev/null
+++ b/libstdc++-v3/include/ext/pb_assoc/detail/rb_tree_map_/split_join_fn_imps.hpp
@@ -0,0 +1,381 @@
+// -*- C++ -*-
+
+// 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.
+
+// As a special exception, you may use this file as part of a free software
+// library without restriction. Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General 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 split_join_fn_imps.hpp
+ * Contains an implementation for rb_tree_.
+ */
+
+PB_ASSOC_CLASS_T_DEC
+inline void
+PB_ASSOC_CLASS_C_DEC::
+join(PB_ASSOC_CLASS_C_DEC& r_other)
+{
+ PB_ASSOC_DBG_ONLY(assert_valid();)
+ PB_ASSOC_DBG_ONLY(PB_ASSOC_BASE_C_DEC::assert_valid(true, true);)
+
+ PB_ASSOC_DBG_ONLY(r_other.assert_valid();)
+ PB_ASSOC_DBG_ONLY(r_other.PB_ASSOC_BASE_C_DEC::assert_valid(true, true);)
+
+ if (PB_ASSOC_BASE_C_DEC::join_prep(r_other) == false)
+ {
+ PB_ASSOC_DBG_ONLY(assert_valid();)
+ PB_ASSOC_DBG_ONLY(r_other.assert_valid();)
+
+ return;
+ }
+
+ const node_pointer p_x = r_other.split_min();
+
+ join_imp(p_x, r_other.m_p_head->m_p_parent);
+
+ PB_ASSOC_BASE_C_DEC::join_finish(r_other);
+
+ PB_ASSOC_DBG_ONLY(assert_valid();)
+ PB_ASSOC_DBG_ONLY(PB_ASSOC_BASE_C_DEC::assert_valid(true, true);)
+
+ PB_ASSOC_DBG_ONLY(r_other.assert_valid();)
+ PB_ASSOC_DBG_ONLY(r_other.PB_ASSOC_BASE_C_DEC::assert_valid(true, true);)
+ }
+
+PB_ASSOC_CLASS_T_DEC
+void
+PB_ASSOC_CLASS_C_DEC::
+join_imp(node_pointer p_x, node_pointer p_r)
+{
+ PB_ASSOC_DBG_ASSERT(p_x != NULL);
+
+ if (p_r != NULL)
+ p_r->m_red = false;
+
+ const size_type h =
+ black_height(PB_ASSOC_BASE_C_DEC::m_p_head->m_p_parent);
+ const size_type other_h = black_height(p_r);
+
+ node_pointer p_x_l;
+ node_pointer p_x_r;
+
+ std::pair<node_pointer, node_pointer> join_pos;
+
+ const bool right_join = h >= other_h;
+
+ if (right_join)
+ {
+ join_pos = find_join_pos_right(PB_ASSOC_BASE_C_DEC::m_p_head->m_p_parent, h, other_h);
+
+ p_x_l = join_pos.first;
+ p_x_r = p_r;
+ }
+ else
+ {
+ p_x_l = PB_ASSOC_BASE_C_DEC::m_p_head->m_p_parent;
+
+ PB_ASSOC_BASE_C_DEC::m_p_head->m_p_parent = p_r;
+ if (p_r != NULL)
+ p_r->m_p_parent = PB_ASSOC_BASE_C_DEC::m_p_head;
+
+ join_pos = find_join_pos_left(PB_ASSOC_BASE_C_DEC::m_p_head->m_p_parent, h, other_h);
+
+ p_x_r = join_pos.first;
+ }
+
+ node_pointer p_parent = join_pos.second;
+
+ if (p_parent == PB_ASSOC_BASE_C_DEC::m_p_head)
+ {
+ PB_ASSOC_BASE_C_DEC::m_p_head->m_p_parent = p_x;
+
+ p_x->m_p_parent = PB_ASSOC_BASE_C_DEC::m_p_head;
+ }
+ else
+ {
+ p_x->m_p_parent = p_parent;
+
+ if (right_join)
+ p_x->m_p_parent->m_p_right = p_x;
+ else
+ p_x->m_p_parent->m_p_left = p_x;
+ }
+
+ p_x->m_p_left = p_x_l;
+ if (p_x_l != NULL)
+ p_x_l->m_p_parent = p_x;
+
+ p_x->m_p_right = p_x_r;
+ if (p_x_r != NULL)
+ p_x_r->m_p_parent = p_x;
+
+ p_x->m_red = true;
+
+ PB_ASSOC_BASE_C_DEC::initialize_min_max();
+
+ PB_ASSOC_DBG_ONLY(PB_ASSOC_BASE_C_DEC::assert_valid(true, false);)
+
+ PB_ASSOC_BASE_C_DEC::update_to_top(p_x, (Node_Updator* )this);
+
+ insert_fixup(p_x);
+
+ PB_ASSOC_DBG_ONLY(assert_valid());
+ PB_ASSOC_DBG_ONLY(PB_ASSOC_BASE_C_DEC::assert_valid(true, false);)
+ }
+
+PB_ASSOC_CLASS_T_DEC
+inline typename PB_ASSOC_CLASS_C_DEC::node_pointer
+PB_ASSOC_CLASS_C_DEC::
+split_min()
+{
+ PB_ASSOC_DBG_ASSERT(PB_ASSOC_BASE_C_DEC::m_p_head->m_p_left !=
+ PB_ASSOC_BASE_C_DEC::m_p_head);
+
+ node_pointer p_min = PB_ASSOC_BASE_C_DEC::m_p_head->m_p_left;
+
+ remove_node(p_min);
+
+ return (p_min);
+}
+
+PB_ASSOC_CLASS_T_DEC
+std::pair<
+ typename PB_ASSOC_CLASS_C_DEC::node_pointer,
+ typename PB_ASSOC_CLASS_C_DEC::node_pointer>
+PB_ASSOC_CLASS_C_DEC::
+find_join_pos_right(node_pointer p_l, size_type h_l, size_type h_r)
+{
+ PB_ASSOC_DBG_ASSERT(h_l >= h_r);
+
+ if (PB_ASSOC_BASE_C_DEC::m_p_head->m_p_parent == NULL)
+ return (std::make_pair((node_pointer)NULL,
+ PB_ASSOC_BASE_C_DEC::m_p_head));
+
+ node_pointer p_l_parent = PB_ASSOC_BASE_C_DEC::m_p_head;
+
+ while (h_l > h_r)
+ {
+ if (p_l->m_red == false)
+ {
+ PB_ASSOC_DBG_ASSERT(h_l > 0);
+
+ --h_l;
+ }
+
+ p_l_parent = p_l;
+
+ p_l = p_l->m_p_right;
+ }
+
+ if (!is_effectively_black(p_l))
+ {
+ p_l_parent = p_l;
+
+ p_l = p_l->m_p_right;
+ }
+
+ PB_ASSOC_DBG_ASSERT(is_effectively_black(p_l));
+ PB_ASSOC_DBG_ASSERT(black_height(p_l) == h_r);
+ PB_ASSOC_DBG_ASSERT(p_l == NULL || p_l->m_p_parent == p_l_parent);
+
+ return (std::make_pair(p_l, p_l_parent));
+}
+
+PB_ASSOC_CLASS_T_DEC
+std::pair<
+ typename PB_ASSOC_CLASS_C_DEC::node_pointer,
+ typename PB_ASSOC_CLASS_C_DEC::node_pointer>
+PB_ASSOC_CLASS_C_DEC::
+find_join_pos_left(node_pointer p_r, size_type h_l, size_type h_r)
+{
+ PB_ASSOC_DBG_ASSERT(h_r > h_l);
+
+ if (PB_ASSOC_BASE_C_DEC::m_p_head->m_p_parent == NULL)
+ return (std::make_pair((node_pointer)NULL,
+ PB_ASSOC_BASE_C_DEC::m_p_head));
+
+ node_pointer p_r_parent = PB_ASSOC_BASE_C_DEC::m_p_head;
+
+ while (h_r > h_l)
+ {
+ if (p_r->m_red == false)
+ {
+ PB_ASSOC_DBG_ASSERT(h_r > 0);
+
+ --h_r;
+ }
+
+ p_r_parent = p_r;
+
+ p_r = p_r->m_p_left;
+ }
+
+ if (!is_effectively_black(p_r))
+ {
+ p_r_parent = p_r;
+
+ p_r = p_r->m_p_left;
+ }
+
+ PB_ASSOC_DBG_ASSERT(is_effectively_black(p_r));
+ PB_ASSOC_DBG_ASSERT(black_height(p_r) == h_l);
+ PB_ASSOC_DBG_ASSERT(p_r == NULL || p_r->m_p_parent == p_r_parent);
+
+ return (std::make_pair(p_r, p_r_parent));
+}
+
+PB_ASSOC_CLASS_T_DEC
+inline typename PB_ASSOC_CLASS_C_DEC::size_type
+PB_ASSOC_CLASS_C_DEC::
+black_height(node_pointer p_nd)
+{
+ size_type h = 1;
+
+ while (p_nd != NULL)
+ {
+ if (p_nd->m_red == false)
+ ++h;
+
+ p_nd = p_nd->m_p_left;
+ }
+
+ return (h);
+}
+
+PB_ASSOC_CLASS_T_DEC
+void
+PB_ASSOC_CLASS_C_DEC::
+split(const_key_reference r_key, PB_ASSOC_CLASS_C_DEC& r_other)
+{
+ PB_ASSOC_DBG_ONLY(assert_valid());
+ PB_ASSOC_DBG_ONLY(PB_ASSOC_BASE_C_DEC::assert_valid(true, true);)
+
+ PB_ASSOC_DBG_ONLY(r_other.assert_valid());
+ PB_ASSOC_DBG_ONLY(r_other.PB_ASSOC_BASE_C_DEC::assert_valid(true, true);)
+
+ if (PB_ASSOC_BASE_C_DEC::split_prep(r_key, r_other) == false)
+ {
+ PB_ASSOC_DBG_ONLY(assert_valid());
+ PB_ASSOC_DBG_ONLY(r_other.assert_valid());
+
+ return;
+ }
+
+ PB_ASSOC_DBG_ONLY(assert_valid());
+ PB_ASSOC_DBG_ONLY(PB_ASSOC_BASE_C_DEC::assert_valid(true, false);)
+
+ PB_ASSOC_DBG_ONLY(r_other.assert_valid());
+ PB_ASSOC_DBG_ONLY(r_other.PB_ASSOC_BASE_C_DEC::assert_valid(true, false);)
+
+ node_pointer p_nd = upper_bound(r_key).m_p_nd;
+
+ do
+ {
+ node_pointer p_next_nd = p_nd->m_p_parent;
+
+ if (Cmp_Fn::operator()(
+ r_key,
+ PB_ASSOC_V2F(p_nd->m_value)))
+ split_at_node(p_nd, r_other);
+
+ PB_ASSOC_DBG_ONLY(assert_valid());
+ PB_ASSOC_DBG_ONLY(PB_ASSOC_BASE_C_DEC::assert_valid(true, false);)
+
+ PB_ASSOC_DBG_ONLY(r_other.assert_valid());
+ PB_ASSOC_DBG_ONLY(r_other.PB_ASSOC_BASE_C_DEC::assert_valid(true, false);)
+
+ p_nd = p_next_nd;
+ }
+ while (p_nd != PB_ASSOC_BASE_C_DEC::m_p_head);
+
+ PB_ASSOC_BASE_C_DEC::split_finish(r_other);
+
+ PB_ASSOC_DBG_ONLY(assert_valid());
+ PB_ASSOC_DBG_ONLY(PB_ASSOC_BASE_C_DEC::assert_valid(true, true);)
+
+ PB_ASSOC_DBG_ONLY(r_other.assert_valid());
+ PB_ASSOC_DBG_ONLY(r_other.PB_ASSOC_BASE_C_DEC::assert_valid(true, true);)
+ }
+
+PB_ASSOC_CLASS_T_DEC
+void
+PB_ASSOC_CLASS_C_DEC::
+split_at_node(node_pointer p_nd, PB_ASSOC_CLASS_C_DEC& r_other)
+{
+ PB_ASSOC_DBG_ASSERT(p_nd != NULL);
+
+ node_pointer p_l = p_nd->m_p_left;
+ node_pointer p_r = p_nd->m_p_right;
+
+ node_pointer p_parent = p_nd->m_p_parent;
+
+ if (p_parent == PB_ASSOC_BASE_C_DEC::m_p_head)
+ {
+ PB_ASSOC_BASE_C_DEC::m_p_head->m_p_parent = p_l;
+
+ if (p_l != NULL)
+ {
+ p_l->m_p_parent = PB_ASSOC_BASE_C_DEC::m_p_head;
+
+ p_l->m_red = false;
+ }
+ }
+ else
+ {
+ if (p_parent->m_p_left == p_nd)
+ p_parent->m_p_left = p_l;
+ else
+ p_parent->m_p_right = p_l;
+
+ if (p_l != NULL)
+ p_l->m_p_parent = p_parent;
+
+ update_to_top(p_parent, (Node_Updator* )this);
+
+ if (!p_nd->m_red)
+ remove_fixup(p_l, p_parent);
+ }
+
+ PB_ASSOC_BASE_C_DEC::initialize_min_max();
+
+ PB_ASSOC_DBG_ONLY(assert_valid());
+ PB_ASSOC_DBG_ONLY(PB_ASSOC_BASE_C_DEC::assert_valid(true, false);)
+
+ PB_ASSOC_DBG_ONLY(r_other.assert_valid());
+ PB_ASSOC_DBG_ONLY(r_other.PB_ASSOC_BASE_C_DEC::assert_valid(true, false);)
+
+ r_other.join_imp(p_nd, p_r);
+}
+
diff --git a/libstdc++-v3/include/ext/pb_assoc/detail/resize_policy/cc_hash_max_collision_resize_trigger_imp.hpp b/libstdc++-v3/include/ext/pb_assoc/detail/resize_policy/cc_hash_max_collision_resize_trigger_imp.hpp
new file mode 100644
index 00000000000..9504d02c291
--- /dev/null
+++ b/libstdc++-v3/include/ext/pb_assoc/detail/resize_policy/cc_hash_max_collision_resize_trigger_imp.hpp
@@ -0,0 +1,227 @@
+// -*- C++ -*-
+
+// 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.
+
+// As a special exception, you may use this file as part of a free software
+// library without restriction. Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General 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 cc_hash_max_collision_check_resize_trigger_imp.hpp
+ * Contains an implementation of cc_hash_max_collision_check_resize_trigger.
+ */
+
+PB_ASSOC_CLASS_T_DEC
+pb_assoc::detail::int_to_type<External_Load_Access>
+PB_ASSOC_CLASS_C_DEC::s_external_load_access_ind;
+
+PB_ASSOC_CLASS_T_DEC
+PB_ASSOC_CLASS_C_DEC::
+cc_hash_max_collision_check_resize_trigger(float load) :
+ m_load(load),
+ m_size(0),
+ m_num_col(0),
+ m_max_col(0),
+ m_resize_needed(false)
+{ }
+
+PB_ASSOC_CLASS_T_DEC
+inline void
+PB_ASSOC_CLASS_C_DEC::
+notify_find_search_start()
+{ }
+
+PB_ASSOC_CLASS_T_DEC
+inline void
+PB_ASSOC_CLASS_C_DEC::
+notify_find_search_collision()
+{ }
+
+PB_ASSOC_CLASS_T_DEC
+inline void
+PB_ASSOC_CLASS_C_DEC::
+notify_find_search_end()
+{ }
+
+PB_ASSOC_CLASS_T_DEC
+inline void
+PB_ASSOC_CLASS_C_DEC::
+notify_insert_search_start()
+{
+ m_num_col = 0;
+}
+
+PB_ASSOC_CLASS_T_DEC
+inline void
+PB_ASSOC_CLASS_C_DEC::
+notify_insert_search_collision()
+{
+ ++m_num_col;
+}
+
+PB_ASSOC_CLASS_T_DEC
+inline void
+PB_ASSOC_CLASS_C_DEC::
+notify_insert_search_end()
+{
+ PB_ASSOC_DBG_ASSERT(NOTHING_HT_RESIZE_ACTION == 0);
+
+ m_resize_needed =
+ m_resize_needed || (m_num_col >= m_max_col);
+}
+
+PB_ASSOC_CLASS_T_DEC
+inline void
+PB_ASSOC_CLASS_C_DEC::
+notify_erase_search_start()
+{ }
+
+PB_ASSOC_CLASS_T_DEC
+inline void
+PB_ASSOC_CLASS_C_DEC::
+notify_erase_search_collision()
+{ }
+
+PB_ASSOC_CLASS_T_DEC
+inline void
+PB_ASSOC_CLASS_C_DEC::
+notify_erase_search_end()
+{ }
+
+PB_ASSOC_CLASS_T_DEC
+inline void
+PB_ASSOC_CLASS_C_DEC::
+notify_inserted(size_type num_e)
+{
+ PB_ASSOC_DBG_ASSERT(num_e <= m_size);
+
+ if (num_e == m_size)
+ m_resize_needed = true;
+}
+
+PB_ASSOC_CLASS_T_DEC
+inline void
+PB_ASSOC_CLASS_C_DEC::
+notify_erased(size_type num_e)
+{
+ PB_ASSOC_DBG_ASSERT(num_e <= m_size);
+
+ m_resize_needed = false;
+}
+
+PB_ASSOC_CLASS_T_DEC
+void
+PB_ASSOC_CLASS_C_DEC::
+notify_cleared()
+{
+ m_resize_needed = false;
+}
+
+PB_ASSOC_CLASS_T_DEC
+inline bool
+PB_ASSOC_CLASS_C_DEC::
+is_resize_needed() const
+{
+ return (m_resize_needed);
+}
+
+PB_ASSOC_CLASS_T_DEC
+inline bool
+PB_ASSOC_CLASS_C_DEC::
+is_grow_needed(size_type /*size*/, size_type /*num_used_e*/) const
+{
+ PB_ASSOC_DBG_ASSERT(m_resize_needed);
+
+ return (true);
+}
+
+PB_ASSOC_CLASS_T_DEC
+inline bool
+PB_ASSOC_CLASS_C_DEC::
+is_shrink_needed(size_type size, size_type num_used_e) const
+{
+ PB_ASSOC_DBG_ASSERT(m_resize_needed);
+
+ return (false);
+}
+
+PB_ASSOC_CLASS_T_DEC
+void
+PB_ASSOC_CLASS_C_DEC::
+notify_resized(size_type new_size)
+{
+ m_size = new_size;
+
+ // max_col <-- \sqrt{2 load \ln( 2 m \ln( m ) ) }
+
+ const double ln_arg = 2* m_size* ::log( (double)m_size);
+
+ m_max_col = (size_type)::ceil( ::sqrt(2* m_load* ::log(ln_arg) ) );
+
+ m_num_col = 0;
+
+ m_resize_needed = false;
+}
+
+PB_ASSOC_CLASS_T_DEC
+void
+PB_ASSOC_CLASS_C_DEC::
+notify_externally_resized(size_type new_size)
+{
+ notify_resized(new_size);
+}
+
+PB_ASSOC_CLASS_T_DEC
+void
+PB_ASSOC_CLASS_C_DEC::
+swap(PB_ASSOC_CLASS_C_DEC& r_other)
+{
+ std::swap(m_load, r_other.m_load);
+
+ std::swap(m_size, r_other.m_size);
+
+ std::swap(m_num_col, r_other.m_num_col);
+
+ std::swap(m_max_col, r_other.m_max_col);
+
+ std::swap(m_resize_needed, r_other.m_resize_needed);
+}
+
+PB_ASSOC_CLASS_T_DEC
+inline float
+PB_ASSOC_CLASS_C_DEC::
+get_load_imp(pb_assoc::detail::int_to_type<true>) const
+{
+ return (m_load);
+}
diff --git a/libstdc++-v3/include/ext/pb_assoc/detail/resize_policy/hash_exponential_size_policy_imp.hpp b/libstdc++-v3/include/ext/pb_assoc/detail/resize_policy/hash_exponential_size_policy_imp.hpp
new file mode 100644
index 00000000000..62e30e1d874
--- /dev/null
+++ b/libstdc++-v3/include/ext/pb_assoc/detail/resize_policy/hash_exponential_size_policy_imp.hpp
@@ -0,0 +1,123 @@
+// -*- C++ -*-
+
+// 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.
+
+// As a special exception, you may use this file as part of a free software
+// library without restriction. Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General 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 hash_exponential_size_policy_imp.hpp
+ * Contains an implementation of hash_exponential_size_policy.
+ */
+
+#ifdef PB_ASSOC_HT_EXPONENTIAL_SIZE_POLICY_DEBUG
+#define PB_ASSOC_DBG_ASSERT(X) assert(X)
+#define PB_ASSOC_DBG_VERIFY(X) assert(X)
+#define PB_ASSOC_DBG_ONLY(X) X
+#else // #ifdef PB_ASSOC_HT_EXPONENTIAL_SIZE_POLICY_DEBUG
+#define PB_ASSOC_DBG_ASSERT(X)
+#define PB_ASSOC_DBG_VERIFY(X) {if((X)==0);}
+#define PB_ASSOC_DBG_ONLY(X) ;
+#endif // #ifdef PB_ASSOC_HT_EXPONENTIAL_SIZE_POLICY_DEBUG
+
+PB_ASSOC_CLASS_T_DEC
+PB_ASSOC_CLASS_C_DEC::
+hash_exponential_size_policy(size_type start_size, size_type grow_factor) :
+ m_start_size(start_size),
+ m_grow_factor(grow_factor)
+{ }
+
+PB_ASSOC_CLASS_T_DEC
+void
+PB_ASSOC_CLASS_C_DEC::
+swap(PB_ASSOC_CLASS_C_DEC& r_other)
+{
+ std::swap(m_start_size, r_other.m_start_size);
+
+ std::swap(m_grow_factor, r_other.m_grow_factor);
+}
+
+PB_ASSOC_CLASS_T_DEC
+typename PB_ASSOC_CLASS_C_DEC::size_type
+PB_ASSOC_CLASS_C_DEC::
+get_init_size(size_type suggested_size) const
+{
+ size_type ret = m_start_size;
+
+ while (ret < suggested_size)
+ ret *= m_grow_factor;
+
+ return (ret);
+}
+
+PB_ASSOC_CLASS_T_DEC
+typename PB_ASSOC_CLASS_C_DEC::size_type
+PB_ASSOC_CLASS_C_DEC::
+get_nearest_larger_size(size_type cur_size) const
+{
+ PB_ASSOC_DBG_ONLY(assert_is_one_of_my_sizes(size);)
+
+ const size_type pot_ret = cur_size* m_grow_factor;
+
+ return ((pot_ret > cur_size)? pot_ret : cur_size);
+}
+
+PB_ASSOC_CLASS_T_DEC
+typename PB_ASSOC_CLASS_C_DEC::size_type
+PB_ASSOC_CLASS_C_DEC::
+get_nearest_smaller_size(size_type cur_size) const
+{
+ PB_ASSOC_DBG_ONLY(assert_is_one_of_my_sizes(size);)
+
+ const size_type pot_ret = cur_size / m_grow_factor;
+
+ return ((pot_ret > 0)? pot_ret : m_start_size);
+}
+
+#ifdef PB_ASSOC_HT_EXPONENTIAL_SIZE_POLICY_DEBUG
+PB_ASSOC_CLASS_T_DEC
+void
+PB_ASSOC_CLASS_C_DEC::
+assert_is_one_of_my_sizes(size_type size)
+{
+ PB_ASSOC_DBG_ASSERT(size >= m_start_size);
+
+ while (size >m_start_size)
+ size /= m_grow_factor;
+
+ PB_ASSOC_DBG_ASSERT(size == m_start_size);
+}
+#endif // #ifdef PB_ASSOC_HT_EXPONENTIAL_SIZE_POLICY_DEBUG
+
diff --git a/libstdc++-v3/include/ext/pb_assoc/detail/resize_policy/hash_load_check_resize_trigger_imp.hpp b/libstdc++-v3/include/ext/pb_assoc/detail/resize_policy/hash_load_check_resize_trigger_imp.hpp
new file mode 100644
index 00000000000..24a2a9a3411
--- /dev/null
+++ b/libstdc++-v3/include/ext/pb_assoc/detail/resize_policy/hash_load_check_resize_trigger_imp.hpp
@@ -0,0 +1,352 @@
+// -*- C++ -*-
+
+// 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.
+
+// As a special exception, you may use this file as part of a free software
+// library without restriction. Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General 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 hash_load_check_resize_trigger_imp.hpp.hpp
+ * Contains an implementation of hash_load_check_resize_trigger..
+ */
+
+PB_ASSOC_CLASS_T_DEC
+pb_assoc::detail::int_to_type<External_Load_Access>
+PB_ASSOC_CLASS_C_DEC::s_external_load_access_ind;
+
+PB_ASSOC_CLASS_T_DEC
+PB_ASSOC_CLASS_C_DEC::
+hash_load_check_resize_trigger(float load_min, float load_max) :
+ m_load_min(load_min),
+ m_load_max(load_max),
+ m_next_shrink_size(0),
+ m_next_grow_size(0),
+ m_resize_needed(false)
+{
+ PB_ASSOC_DBG_ONLY(assert_valid();)
+ }
+
+PB_ASSOC_CLASS_T_DEC
+inline void
+PB_ASSOC_CLASS_C_DEC::
+notify_find_search_start()
+{
+ PB_ASSOC_DBG_ONLY(assert_valid();)
+ }
+
+PB_ASSOC_CLASS_T_DEC
+inline void
+PB_ASSOC_CLASS_C_DEC::
+notify_find_search_collision()
+{
+ PB_ASSOC_DBG_ONLY(assert_valid();)
+ }
+
+PB_ASSOC_CLASS_T_DEC
+inline void
+PB_ASSOC_CLASS_C_DEC::
+notify_find_search_end()
+{
+ PB_ASSOC_DBG_ONLY(assert_valid();)
+ }
+
+PB_ASSOC_CLASS_T_DEC
+inline void
+PB_ASSOC_CLASS_C_DEC::
+notify_insert_search_start()
+{
+ PB_ASSOC_DBG_ONLY(assert_valid();)
+ }
+
+PB_ASSOC_CLASS_T_DEC
+inline void
+PB_ASSOC_CLASS_C_DEC::
+notify_insert_search_collision()
+{
+ PB_ASSOC_DBG_ONLY(assert_valid();)
+ }
+
+PB_ASSOC_CLASS_T_DEC
+inline void
+PB_ASSOC_CLASS_C_DEC::
+notify_insert_search_end()
+{
+ PB_ASSOC_DBG_ONLY(assert_valid();)
+ }
+
+PB_ASSOC_CLASS_T_DEC
+inline void
+PB_ASSOC_CLASS_C_DEC::
+notify_erase_search_start()
+{
+ PB_ASSOC_DBG_ONLY(assert_valid();)
+ }
+
+PB_ASSOC_CLASS_T_DEC
+inline void
+PB_ASSOC_CLASS_C_DEC::
+notify_erase_search_collision()
+{
+ PB_ASSOC_DBG_ONLY(assert_valid();)
+ }
+
+PB_ASSOC_CLASS_T_DEC
+inline void
+PB_ASSOC_CLASS_C_DEC::
+notify_erase_search_end()
+{
+ PB_ASSOC_DBG_ONLY(assert_valid();)
+ }
+
+PB_ASSOC_CLASS_T_DEC
+inline void
+PB_ASSOC_CLASS_C_DEC::
+notify_inserted(size_type num_entries)
+{
+ PB_ASSOC_DBG_ASSERT(num_entries <= m_next_grow_size);
+
+ my_size_base::set_size(num_entries);
+
+ m_resize_needed = (num_entries == m_next_grow_size);
+
+ PB_ASSOC_DBG_ONLY(assert_valid();)
+ }
+
+PB_ASSOC_CLASS_T_DEC
+inline void
+PB_ASSOC_CLASS_C_DEC::
+notify_erased(size_type num_entries)
+{
+ PB_ASSOC_DBG_ASSERT(num_entries >= m_next_shrink_size);
+
+ my_size_base::set_size(num_entries);
+
+ m_resize_needed = (num_entries == m_next_shrink_size);
+
+ PB_ASSOC_DBG_ONLY(assert_valid();)
+
+ PB_ASSOC_DBG_ONLY(assert_valid();)
+ }
+
+PB_ASSOC_CLASS_T_DEC
+inline bool
+PB_ASSOC_CLASS_C_DEC::
+is_resize_needed() const
+{
+ PB_ASSOC_DBG_ONLY(assert_valid();)
+
+ return (m_resize_needed);
+}
+
+PB_ASSOC_CLASS_T_DEC
+inline bool
+PB_ASSOC_CLASS_C_DEC::
+is_grow_needed(size_type /*size*/, size_type num_entries) const
+{
+ PB_ASSOC_DBG_ASSERT(m_resize_needed);
+
+ return (num_entries >= m_next_grow_size);
+}
+
+PB_ASSOC_CLASS_T_DEC
+inline bool
+PB_ASSOC_CLASS_C_DEC::
+is_shrink_needed(size_type /*size*/, size_type num_entries) const
+{
+ PB_ASSOC_DBG_ASSERT(m_resize_needed);
+
+ return (num_entries <= m_next_shrink_size);
+}
+
+PB_ASSOC_CLASS_T_DEC
+PB_ASSOC_CLASS_C_DEC::
+~hash_load_check_resize_trigger()
+{ }
+
+PB_ASSOC_CLASS_T_DEC
+void
+PB_ASSOC_CLASS_C_DEC::
+notify_resized(size_type new_size)
+{
+ m_resize_needed = false;
+
+ m_next_grow_size =
+ size_type(m_load_max* new_size - 1);
+
+ m_next_shrink_size =
+ size_type(m_load_min* new_size );
+
+ PB_ASSOC_DBG_ONLY(assert_valid();)
+ }
+
+PB_ASSOC_CLASS_T_DEC
+void
+PB_ASSOC_CLASS_C_DEC::
+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 );
+
+ if (new_grow_size >= m_next_grow_size)
+ {
+ PB_ASSOC_DBG_ASSERT(new_shrink_size > m_next_shrink_size);
+
+ m_next_grow_size = new_grow_size;
+
+ PB_ASSOC_DBG_ONLY(assert_valid();)
+
+ return;
+ }
+
+ PB_ASSOC_DBG_ASSERT(new_shrink_size <= m_next_shrink_size);
+
+ m_next_shrink_size = new_shrink_size;
+
+ PB_ASSOC_DBG_ONLY(assert_valid();)
+ }
+
+PB_ASSOC_CLASS_T_DEC
+void
+PB_ASSOC_CLASS_C_DEC::
+notify_cleared()
+{
+ my_size_base::set_size(0);
+
+ m_resize_needed = (0 < m_next_shrink_size);
+
+ PB_ASSOC_DBG_ONLY(assert_valid();)
+ }
+
+PB_ASSOC_CLASS_T_DEC
+void
+PB_ASSOC_CLASS_C_DEC::
+swap(PB_ASSOC_CLASS_C_DEC& r_other)
+{
+ PB_ASSOC_DBG_ONLY(assert_valid();)
+ PB_ASSOC_DBG_ONLY(r_other.assert_valid();)
+
+ my_size_base::swap(r_other);
+
+ std::swap(m_load_min, r_other.m_load_min);
+ std::swap(m_load_max, r_other.m_load_max);
+
+ std::swap(m_resize_needed, r_other.m_resize_needed);
+
+ std::swap(m_next_grow_size, r_other.m_next_grow_size);
+ std::swap(m_next_shrink_size, r_other.m_next_shrink_size);
+
+ PB_ASSOC_DBG_ONLY(assert_valid();)
+ PB_ASSOC_DBG_ONLY(r_other.assert_valid();)
+ }
+
+PB_ASSOC_CLASS_T_DEC
+inline std::pair<float, float>
+PB_ASSOC_CLASS_C_DEC::
+get_loads() const
+{
+ return (get_loads_imp(s_external_load_access_ind));
+}
+
+PB_ASSOC_CLASS_T_DEC
+void
+PB_ASSOC_CLASS_C_DEC::
+set_loads(std::pair<float, float> load_pair)
+{
+ set_loads_imp(load_pair, s_external_load_access_ind);
+}
+
+PB_ASSOC_CLASS_T_DEC
+inline std::pair<float, float>
+PB_ASSOC_CLASS_C_DEC::
+get_loads_imp(pb_assoc::detail::int_to_type<true>) const
+{
+ return (std::make_pair(m_load_min, m_load_max));
+}
+
+PB_ASSOC_CLASS_T_DEC
+void
+PB_ASSOC_CLASS_C_DEC::
+set_loads_imp(std::pair<float, float> load_pair, pb_assoc::detail::int_to_type<true>)
+{
+ const float old_load_min = m_load_min;
+ const float old_load_max = m_load_max;
+ const size_type old_next_shrink_size = m_next_shrink_size;
+ const size_type old_next_grow_size = m_next_grow_size;
+ const bool old_resize_needed = m_resize_needed;
+
+ try
+ {
+ m_load_min = load_pair.first;
+ m_load_max = load_pair.second;
+
+ do_resize(static_cast<size_type>(
+ my_size_base::get_size() / ((m_load_min + m_load_max) / 2)));
+ }
+ catch(...)
+ {
+ m_load_min = old_load_min;
+ m_load_max = old_load_max;
+ m_next_shrink_size = old_next_shrink_size;
+ m_next_grow_size = old_next_grow_size;
+ m_resize_needed = old_resize_needed;
+
+ throw;
+ }
+}
+
+PB_ASSOC_CLASS_T_DEC
+void
+PB_ASSOC_CLASS_C_DEC::
+do_resize(size_type /*new_size*/)
+{
+ abort();
+}
+
+#ifdef PB_ASSOC_HT_LOAD_CHECK_RESIZE_TRIGGER_DEBUG
+PB_ASSOC_CLASS_T_DEC
+void
+PB_ASSOC_CLASS_C_DEC::
+assert_valid() const
+{
+ PB_ASSOC_DBG_ASSERT(m_load_max > m_load_min);
+
+ PB_ASSOC_DBG_ASSERT(m_next_grow_size >= m_next_shrink_size);
+}
+#endif // #ifdef PB_ASSOC_HT_LOAD_CHECK_RESIZE_TRIGGER_DEBUG
diff --git a/libstdc++-v3/include/ext/pb_assoc/detail/resize_policy/hash_prime_size_policy_imp.hpp b/libstdc++-v3/include/ext/pb_assoc/detail/resize_policy/hash_prime_size_policy_imp.hpp
new file mode 100644
index 00000000000..153b0efb939
--- /dev/null
+++ b/libstdc++-v3/include/ext/pb_assoc/detail/resize_policy/hash_prime_size_policy_imp.hpp
@@ -0,0 +1,150 @@
+// -*- C++ -*-
+
+// 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.
+
+// As a special exception, you may use this file as part of a free software
+// library without restriction. Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General 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 hash_prime_size_policy_imp.hpp
+ * Contains an implementation of hash_prime_size_policy.
+ */
+
+namespace detail
+{
+
+ enum
+ {
+ num_distinct_sizes = 28
+ };
+
+ static const size_t s_a_sizes[num_distinct_sizes] =
+ {
+ /* Dealing cards... */
+ /* 0 */ 53ul,
+ /* 1 */ 97ul,
+ /* 2 */ 193ul,
+ /* 3 */ 389ul,
+ /* 4 */ 769ul,
+ /* 5 */ 1543ul,
+ /* 6 */ 3079ul,
+ /* 7 */ 6151ul,
+ /* 8 */ 12289ul,
+ /* 9 */ 24593ul,
+ /* 10 */ 49157ul,
+ /* 11 */ 98317ul,
+ /* 12 */ 196613ul,
+ /* 13 */ 393241ul,
+ /* 14 */ 786433ul,
+ /* 15 */ 1572869ul,
+ /* 16 */ 3145739ul,
+ /* 17 */ 6291469ul,
+ /* 18 */ 12582917ul,
+ /* 19 */ 25165843ul,
+ /* 20 */ 50331653ul,
+ /* 21 */ 100663319ul,
+ /* 22 */ 201326611ul,
+ /* 23 */ 402653189ul,
+ /* 24 */ 805306457ul,
+ /* 25 */ 1610612741,
+ /* 26 */ 3221225473ul,
+ /* 27 */ 4294967291ul
+ /* Pot's good, let's play */
+ };
+
+} // namespace detail
+
+PB_ASSOC_CLASS_T_DEC
+inline void
+PB_ASSOC_CLASS_C_DEC::
+swap(PB_ASSOC_CLASS_C_DEC& /*r_other*/)
+{ }
+
+PB_ASSOC_CLASS_T_DEC
+PB_ASSOC_CLASS_C_DEC::size_type
+PB_ASSOC_CLASS_C_DEC::
+get_init_size(size_type suggested_size) const
+{
+ return (get_nearest_larger_size_imp(suggested_size));
+}
+
+PB_ASSOC_CLASS_T_DEC
+inline PB_ASSOC_CLASS_C_DEC::size_type
+PB_ASSOC_CLASS_C_DEC::
+get_nearest_larger_size(size_type cur_size) const
+{
+ PB_ASSOC_DBG_ONLY(assert_is_one_of_my_sizes(cur_size);)
+
+ return (get_nearest_larger_size_imp(cur_size));
+}
+
+PB_ASSOC_CLASS_T_DEC
+inline PB_ASSOC_CLASS_C_DEC::size_type
+PB_ASSOC_CLASS_C_DEC::
+get_nearest_smaller_size(size_type cur_size) const
+{
+ PB_ASSOC_DBG_ONLY(assert_is_one_of_my_sizes(cur_size);)
+
+ return (*std::lower_bound(detail::s_a_sizes, detail::s_a_sizes + detail::num_distinct_sizes, cur_size - 1));
+}
+
+PB_ASSOC_CLASS_T_DEC
+inline PB_ASSOC_CLASS_C_DEC::size_type
+PB_ASSOC_CLASS_C_DEC::
+get_nearest_larger_size_imp(size_type size) const
+{
+ const size_t* const p_upper =
+ std::upper_bound(detail::s_a_sizes, detail::s_a_sizes + detail::num_distinct_sizes, size);
+
+ return ((p_upper == detail::s_a_sizes + detail::num_distinct_sizes)?
+ size :
+ *p_upper);
+}
+
+#ifdef PB_ASSOC_HT_PRIME_SIZE_POLICY_DEBUG
+PB_ASSOC_CLASS_T_DEC
+void
+PB_ASSOC_CLASS_C_DEC::
+assert_is_one_of_my_sizes(size_type size)
+{
+ const size_t* const p_end =
+ detail::s_a_sizes + detail::num_distinct_sizes;
+
+ const size_t* const p_found =
+ std::find(detail::s_a_sizes, p_end, size)
+
+ PB_ASSOC_DBG_ASSERT(p_found != p_end);
+}
+#endif // #ifdef PB_ASSOC_HT_PRIME_SIZE_POLICY_DEBUG
diff --git a/libstdc++-v3/include/ext/pb_assoc/detail/resize_policy/hash_standard_resize_policy_imp.hpp b/libstdc++-v3/include/ext/pb_assoc/detail/resize_policy/hash_standard_resize_policy_imp.hpp
new file mode 100644
index 00000000000..1e266d2dd82
--- /dev/null
+++ b/libstdc++-v3/include/ext/pb_assoc/detail/resize_policy/hash_standard_resize_policy_imp.hpp
@@ -0,0 +1,342 @@
+// -*- C++ -*-
+
+// 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.
+
+// As a special exception, you may use this file as part of a free software
+// library without restriction. Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General 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 hash_standard_resize_policy_imp.hpp
+ * Contains an implementation of hash_standard_resize_policy.
+ */
+
+#ifdef PB_ASSOC_HT_STANDARD_RESIZE_POLICY_DEBUG
+#define PB_ASSOC_DBG_ASSERT(X) assert(X)
+#define PB_ASSOC_DBG_VERIFY(X) assert(X)
+#define PB_ASSOC_DBG_ONLY(X) X
+#else // #ifdef PB_ASSOC_HT_STANDARD_RESIZE_POLICY_DEBUG
+#define PB_ASSOC_DBG_ASSERT(X)
+#define PB_ASSOC_DBG_VERIFY(X) {if((X)==0);}
+#define PB_ASSOC_DBG_ONLY(X) ;
+#endif // #ifdef PB_ASSOC_HT_STANDARD_RESIZE_POLICY_DEBUG
+
+PB_ASSOC_CLASS_T_DEC
+pb_assoc::detail::int_to_type<External_Size_Access>
+PB_ASSOC_CLASS_C_DEC::s_external_size_access_indicator;
+
+PB_ASSOC_CLASS_T_DEC
+PB_ASSOC_CLASS_C_DEC::
+hash_standard_resize_policy(size_type suggested_size /*= 8*/) :
+ m_size(Size_Policy::get_init_size(suggested_size))
+{
+ my_trigger_policy_base::notify_externally_resized(
+ Size_Policy::get_init_size(suggested_size));
+}
+
+PB_ASSOC_CLASS_T_DEC
+PB_ASSOC_CLASS_C_DEC::
+hash_standard_resize_policy(const Size_Policy& r_size_policy, size_type suggested_size /*= 8*/) :
+ Size_Policy(r_size_policy),
+ m_size(Size_Policy::get_init_size(suggested_size))
+{ }
+
+PB_ASSOC_CLASS_T_DEC
+PB_ASSOC_CLASS_C_DEC::
+hash_standard_resize_policy(const Size_Policy& r_size_policy, const Trigger_Policy& r_trigger_policy, size_type suggested_size /*= 8*/) :
+ Size_Policy(r_size_policy),
+ Trigger_Policy(r_trigger_policy),
+ m_size(Size_Policy::get_init_size(suggested_size))
+{ }
+
+PB_ASSOC_CLASS_T_DEC
+PB_ASSOC_CLASS_C_DEC::
+~hash_standard_resize_policy()
+{ }
+
+PB_ASSOC_CLASS_T_DEC
+void
+PB_ASSOC_CLASS_C_DEC::
+swap(PB_ASSOC_CLASS_C_DEC& r_other)
+{
+ my_trigger_policy_base::swap(r_other);
+
+ my_size_policy_base::swap(r_other);
+
+ std::swap(m_size, r_other.m_size);
+}
+
+PB_ASSOC_CLASS_T_DEC
+inline void
+PB_ASSOC_CLASS_C_DEC::
+notify_find_search_start()
+{
+ my_trigger_policy_base::notify_find_search_start();
+}
+
+PB_ASSOC_CLASS_T_DEC
+inline void
+PB_ASSOC_CLASS_C_DEC::
+notify_find_search_collision()
+{
+ my_trigger_policy_base::notify_find_search_collision();
+}
+
+PB_ASSOC_CLASS_T_DEC
+inline void
+PB_ASSOC_CLASS_C_DEC::
+notify_find_search_end()
+{
+ my_trigger_policy_base::notify_find_search_end();
+}
+
+PB_ASSOC_CLASS_T_DEC
+inline void
+PB_ASSOC_CLASS_C_DEC::
+notify_insert_search_start()
+{
+ my_trigger_policy_base::notify_insert_search_start();
+}
+
+PB_ASSOC_CLASS_T_DEC
+inline void
+PB_ASSOC_CLASS_C_DEC::
+notify_insert_search_collision()
+{
+ my_trigger_policy_base::notify_insert_search_collision();
+}
+
+PB_ASSOC_CLASS_T_DEC
+inline void
+PB_ASSOC_CLASS_C_DEC::
+notify_insert_search_end()
+{
+ my_trigger_policy_base::notify_insert_search_end();
+}
+
+PB_ASSOC_CLASS_T_DEC
+inline void
+PB_ASSOC_CLASS_C_DEC::
+notify_erase_search_start()
+{
+ my_trigger_policy_base::notify_erase_search_start();
+}
+
+PB_ASSOC_CLASS_T_DEC
+inline void
+PB_ASSOC_CLASS_C_DEC::
+notify_erase_search_collision()
+{
+ my_trigger_policy_base::notify_erase_search_collision();
+}
+
+PB_ASSOC_CLASS_T_DEC
+inline void
+PB_ASSOC_CLASS_C_DEC::
+notify_erase_search_end()
+{
+ my_trigger_policy_base::notify_erase_search_end();
+}
+
+PB_ASSOC_CLASS_T_DEC
+inline void
+PB_ASSOC_CLASS_C_DEC::
+notify_inserted(size_type num_e)
+{
+ my_trigger_policy_base::notify_inserted(num_e);
+}
+
+PB_ASSOC_CLASS_T_DEC
+inline void
+PB_ASSOC_CLASS_C_DEC::
+notify_erased(size_type num_e)
+{
+ my_trigger_policy_base::notify_inserted(num_e);
+}
+
+PB_ASSOC_CLASS_T_DEC
+void
+PB_ASSOC_CLASS_C_DEC::
+notify_cleared()
+{
+ my_trigger_policy_base::notify_cleared();
+}
+
+PB_ASSOC_CLASS_T_DEC
+inline bool
+PB_ASSOC_CLASS_C_DEC::
+is_resize_needed() const
+{
+ return (my_trigger_policy_base::is_resize_needed());
+}
+
+PB_ASSOC_CLASS_T_DEC
+typename PB_ASSOC_CLASS_C_DEC::size_type
+PB_ASSOC_CLASS_C_DEC::
+get_new_size(size_type size, size_type num_used_e) const
+{
+ PB_ASSOC_DBG_ASSERT(m_size == size);
+
+ if (my_trigger_policy_base::
+ is_grow_needed(size, num_used_e))
+ return (my_size_policy_base::get_nearest_larger_size(m_size));
+
+ PB_ASSOC_DBG_ASSERT(my_trigger_policy_base::
+ is_shrink_needed(size, num_used_e));
+
+ return (my_size_policy_base::get_nearest_smaller_size(m_size));
+}
+
+PB_ASSOC_CLASS_T_DEC
+typename PB_ASSOC_CLASS_C_DEC::size_type
+PB_ASSOC_CLASS_C_DEC::
+get_init_size() const
+{
+ PB_ASSOC_DBG_ASSERT(m_size ==
+ my_trigger_policy_base::get_init_size());
+
+ return (m_size);
+}
+
+PB_ASSOC_CLASS_T_DEC
+void
+PB_ASSOC_CLASS_C_DEC::
+notify_resized(size_type new_size)
+{
+ my_trigger_policy_base::notify_resized(new_size);
+
+ m_size = new_size;
+}
+
+PB_ASSOC_CLASS_T_DEC
+inline typename PB_ASSOC_CLASS_C_DEC::size_type
+PB_ASSOC_CLASS_C_DEC::
+get_actual_size() const
+{
+ return (get_actual_size(s_external_size_access_indicator));
+}
+
+PB_ASSOC_CLASS_T_DEC
+inline typename PB_ASSOC_CLASS_C_DEC::size_type
+PB_ASSOC_CLASS_C_DEC::
+get_actual_size(external_resize_true_indicator) const
+{
+ return (m_size);
+}
+
+PB_ASSOC_CLASS_T_DEC
+void
+PB_ASSOC_CLASS_C_DEC::
+resize(size_type new_size)
+{
+ resize(new_size, s_external_size_access_indicator);
+}
+
+PB_ASSOC_CLASS_T_DEC
+void
+PB_ASSOC_CLASS_C_DEC::
+resize(size_type new_size, external_resize_true_indicator)
+{
+ size_type actual_new_size = my_size_policy_base::get_init_size(1);
+ while (actual_new_size < new_size)
+ {
+ const size_type pot =
+ my_size_policy_base::get_nearest_larger_size(actual_new_size);
+
+ if (pot == actual_new_size&& pot < new_size)
+ throw cannot_resize();
+
+ actual_new_size = pot;
+ }
+
+ const size_type old_size = m_size;
+
+ try
+ {
+ do_resize(actual_new_size);
+ }
+ catch(cannot_insert& )
+ {
+ m_size = old_size;
+
+ throw cannot_resize();
+ }
+ catch(...)
+ {
+ m_size = old_size;
+
+ throw;
+ }
+}
+
+PB_ASSOC_CLASS_T_DEC
+void
+PB_ASSOC_CLASS_C_DEC::
+do_resize(size_type /*new_size*/)
+{
+ // Tmp Ami
+ abort();
+}
+
+PB_ASSOC_CLASS_T_DEC
+Trigger_Policy&
+PB_ASSOC_CLASS_C_DEC::
+get_trigger_policy()
+{
+ return (*this);
+}
+
+PB_ASSOC_CLASS_T_DEC
+const Trigger_Policy&
+PB_ASSOC_CLASS_C_DEC::
+get_trigger_policy() const
+{
+ return (*this);
+}
+
+PB_ASSOC_CLASS_T_DEC
+Size_Policy&
+PB_ASSOC_CLASS_C_DEC::
+get_size_policy()
+{
+ return (*this);
+}
+
+PB_ASSOC_CLASS_T_DEC
+const Size_Policy&
+PB_ASSOC_CLASS_C_DEC::
+get_size_policy() const
+{
+ return (*this);
+}
diff --git a/libstdc++-v3/include/ext/pb_assoc/detail/resize_policy/ht_prime_size_policy_imp.hpp b/libstdc++-v3/include/ext/pb_assoc/detail/resize_policy/ht_prime_size_policy_imp.hpp
new file mode 100644
index 00000000000..7f250dad0aa
--- /dev/null
+++ b/libstdc++-v3/include/ext/pb_assoc/detail/resize_policy/ht_prime_size_policy_imp.hpp
@@ -0,0 +1,97 @@
+// -*- C++ -*-
+
+// 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.
+
+// As a special exception, you may use this file as part of a free software
+// library without restriction. Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General 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 ht_prime_size_policy_imp.hpp
+ * Contains implementation details for ht_prime_size_policy.
+ */
+
+#ifndef HT_PRIME_SIZE_POLICY_IMP_HPP
+#define HT_PRIME_SIZE_POLICY_IMP_HPP
+
+namespace pb_assoc
+{
+
+ namespace detail
+ {
+
+ enum
+ {
+ num_distinct_sizes = 28
+ };
+
+ static const size_t s_a_sizes[num_distinct_sizes] =
+ {
+ /* Dealing cards... */
+ /* 0 */ 53ul,
+ /* 1 */ 97ul,
+ /* 2 */ 193ul,
+ /* 3 */ 389ul,
+ /* 4 */ 769ul,
+ /* 5 */ 1543ul,
+ /* 6 */ 3079ul,
+ /* 7 */ 6151ul,
+ /* 8 */ 12289ul,
+ /* 9 */ 24593ul,
+ /* 10 */ 49157ul,
+ /* 11 */ 98317ul,
+ /* 12 */ 196613ul,
+ /* 13 */ 393241ul,
+ /* 14 */ 786433ul,
+ /* 15 */ 1572869ul,
+ /* 16 */ 3145739ul,
+ /* 17 */ 6291469ul,
+ /* 18 */ 12582917ul,
+ /* 19 */ 25165843ul,
+ /* 20 */ 50331653ul,
+ /* 21 */ 100663319ul,
+ /* 22 */ 201326611ul,
+ /* 23 */ 402653189ul,
+ /* 24 */ 805306457ul,
+ /* 25 */ 1610612741,
+ /* 26 */ 3221225473ul,
+ /* 27 */ 4294967291ul
+ /* Pot's good, let's play */
+ };
+
+ } // namespace detail
+
+} // namespace pb_assoc
+
+#endif // #ifndef HT_PRIME_SIZE_POLICY_IMP_HPP
diff --git a/libstdc++-v3/include/ext/pb_assoc/detail/resize_policy/size_base.hpp b/libstdc++-v3/include/ext/pb_assoc/detail/resize_policy/size_base.hpp
new file mode 100644
index 00000000000..270352b99ec
--- /dev/null
+++ b/libstdc++-v3/include/ext/pb_assoc/detail/resize_policy/size_base.hpp
@@ -0,0 +1,170 @@
+// -*- C++ -*-
+
+// 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.
+
+// As a special exception, you may use this file as part of a free software
+// library without restriction. Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General 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 size_base.hpp
+ * Contains an base holding size for some resize policies.
+ */
+
+#ifndef SIZE_BASE_HPP
+#define SIZE_BASE_HPP
+
+namespace pb_assoc
+{
+
+ namespace detail
+ {
+
+ template<typename Size_Type, bool Hold_Size>
+ class size_base;
+
+#define PB_ASSOC_CLASS_T_DEC \
+ template<typename Size_Type>
+
+#define PB_ASSOC_CLASS_C_DEC \
+ size_base< \
+ Size_Type, \
+ true>
+
+ template<typename Size_Type>
+ class size_base<
+ Size_Type,
+ true>
+ {
+ protected:
+ typedef Size_Type size_type;
+
+ protected:
+ inline
+ size_base();
+
+ inline void
+ swap(PB_ASSOC_CLASS_C_DEC& r_other);
+
+ inline void
+ set_size(size_type size);
+
+ inline size_type
+ get_size() const;
+
+ private:
+ size_type m_size;
+ };
+
+ PB_ASSOC_CLASS_T_DEC
+ PB_ASSOC_CLASS_C_DEC::
+ size_base() :
+ m_size(0)
+ { }
+
+ PB_ASSOC_CLASS_T_DEC
+ inline void
+ PB_ASSOC_CLASS_C_DEC::
+ set_size(size_type size)
+ {
+ m_size = size;
+ }
+
+ PB_ASSOC_CLASS_T_DEC
+ inline typename PB_ASSOC_CLASS_C_DEC::size_type
+ PB_ASSOC_CLASS_C_DEC::
+ get_size() const
+ {
+ return (m_size);
+ }
+
+ PB_ASSOC_CLASS_T_DEC
+ inline void
+ PB_ASSOC_CLASS_C_DEC::
+ swap(PB_ASSOC_CLASS_C_DEC& r_other)
+ {
+ std::swap(m_size, r_other.m_size);
+ }
+
+#undef PB_ASSOC_CLASS_T_DEC
+
+#undef PB_ASSOC_CLASS_C_DEC
+
+#define PB_ASSOC_CLASS_T_DEC \
+ template<typename Size_Type>
+
+#define PB_ASSOC_CLASS_C_DEC \
+ size_base< \
+ Size_Type, \
+ false>
+
+ template<typename Size_Type>
+ class size_base<
+ Size_Type,
+ false>
+ {
+ protected:
+ typedef Size_Type size_type;
+
+ protected:
+ inline void
+ swap(PB_ASSOC_CLASS_C_DEC& r_other);
+
+ inline void
+ set_size(size_type size);
+ };
+
+ PB_ASSOC_CLASS_T_DEC
+ inline void
+ PB_ASSOC_CLASS_C_DEC::
+ swap(PB_ASSOC_CLASS_C_DEC& /*r_other*/)
+ { }
+
+ PB_ASSOC_CLASS_T_DEC
+ inline void
+ PB_ASSOC_CLASS_C_DEC::
+ set_size(size_type /*size*/)
+ {
+ // Do nothing
+ }
+
+#undef PB_ASSOC_CLASS_T_DEC
+
+#undef PB_ASSOC_CLASS_C_DEC
+
+ } // namespace detail
+
+} // namespace pb_assoc
+
+#endif // #ifndef SIZE_BASE_HPP
diff --git a/libstdc++-v3/include/ext/pb_assoc/detail/splay_tree_/constructors_destructor_fn_imps.hpp b/libstdc++-v3/include/ext/pb_assoc/detail/splay_tree_/constructors_destructor_fn_imps.hpp
new file mode 100644
index 00000000000..77cbdd9d241
--- /dev/null
+++ b/libstdc++-v3/include/ext/pb_assoc/detail/splay_tree_/constructors_destructor_fn_imps.hpp
@@ -0,0 +1,112 @@
+// -*- C++ -*-
+
+// 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.
+
+// As a special exception, you may use this file as part of a free software
+// library without restriction. Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General 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 constructors_destructor_fn_imps.hpp
+ * Contains an implementation class for splay_tree_.
+ */
+
+PB_ASSOC_CLASS_T_DEC
+template<class It>
+void
+PB_ASSOC_CLASS_C_DEC::
+copy_from_range(It first_it, It last_it)
+{
+ while (first_it != last_it)
+ insert(*(first_it++));
+}
+
+PB_ASSOC_CLASS_T_DEC
+PB_ASSOC_CLASS_C_DEC::
+PB_ASSOC_CLASS_NAME()
+{
+ initialize();
+
+ PB_ASSOC_DBG_ONLY(PB_ASSOC_CLASS_C_DEC::assert_valid();)
+ }
+
+PB_ASSOC_CLASS_T_DEC
+PB_ASSOC_CLASS_C_DEC::
+PB_ASSOC_CLASS_NAME(const Cmp_Fn& r_cmp_fn) :
+ PB_ASSOC_BASE_C_DEC(r_cmp_fn)
+{
+ initialize();
+
+ PB_ASSOC_DBG_ONLY(PB_ASSOC_CLASS_C_DEC::assert_valid();)
+ }
+
+PB_ASSOC_CLASS_T_DEC
+PB_ASSOC_CLASS_C_DEC::
+PB_ASSOC_CLASS_NAME(const Cmp_Fn& r_cmp_fn, const Node_Updator& r_node_updator) :
+ PB_ASSOC_BASE_C_DEC(r_cmp_fn, r_node_updator)
+{
+ initialize();
+
+ PB_ASSOC_DBG_ONLY(PB_ASSOC_CLASS_C_DEC::assert_valid();)
+ }
+
+PB_ASSOC_CLASS_T_DEC
+PB_ASSOC_CLASS_C_DEC::
+PB_ASSOC_CLASS_NAME(const PB_ASSOC_CLASS_C_DEC& r_other) :
+ PB_ASSOC_BASE_C_DEC(r_other)
+{
+ PB_ASSOC_DBG_ONLY(PB_ASSOC_CLASS_C_DEC::assert_valid();)
+ }
+
+PB_ASSOC_CLASS_T_DEC
+void
+PB_ASSOC_CLASS_C_DEC::
+swap(PB_ASSOC_CLASS_C_DEC& r_other)
+{
+ PB_ASSOC_DBG_ONLY(PB_ASSOC_CLASS_C_DEC::assert_valid();)
+ PB_ASSOC_DBG_ONLY(r_other.PB_ASSOC_CLASS_C_DEC::assert_valid();)
+
+ PB_ASSOC_BASE_C_DEC::swap(r_other);
+
+ PB_ASSOC_DBG_ONLY(PB_ASSOC_CLASS_C_DEC::assert_valid();)
+ PB_ASSOC_DBG_ONLY(r_other.PB_ASSOC_CLASS_C_DEC::assert_valid();)
+ }
+
+PB_ASSOC_CLASS_T_DEC
+void
+PB_ASSOC_CLASS_C_DEC::
+initialize()
+{
+ PB_ASSOC_BASE_C_DEC::m_p_head->m_special = true;
+}
diff --git a/libstdc++-v3/include/ext/pb_assoc/detail/splay_tree_/debug_fn_imps.hpp b/libstdc++-v3/include/ext/pb_assoc/detail/splay_tree_/debug_fn_imps.hpp
new file mode 100644
index 00000000000..51c8fa5eb8d
--- /dev/null
+++ b/libstdc++-v3/include/ext/pb_assoc/detail/splay_tree_/debug_fn_imps.hpp
@@ -0,0 +1,73 @@
+// -*- C++ -*-
+
+// 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.
+
+// As a special exception, you may use this file as part of a free software
+// library without restriction. Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General 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_fn_imps.hpp
+ * Contains an implementation class for splay_tree_.
+ */
+
+#ifdef PB_ASSOC_SPLAY_TREE_DEBUG_
+
+PB_ASSOC_CLASS_T_DEC
+void
+PB_ASSOC_CLASS_C_DEC::
+assert_valid() const
+{
+ PB_ASSOC_BASE_C_DEC::assert_valid(true, true);
+
+ assert_special_imp(m_p_head->m_p_parent);
+}
+
+PB_ASSOC_CLASS_T_DEC
+void
+PB_ASSOC_CLASS_C_DEC::
+assert_special_imp(const node_pointer p_nd) const
+{
+ if (p_nd == NULL)
+ return;
+
+ PB_ASSOC_DBG_ASSERT(!p_nd->m_special);
+
+ assert_special_imp(p_nd->m_p_left);
+
+ assert_special_imp(p_nd->m_p_right);
+}
+
+#endif // #ifdef PB_ASSOC_SPLAY_TREE_DEBUG_
+
diff --git a/libstdc++-v3/include/ext/pb_assoc/detail/splay_tree_/erase_fn_imps.hpp b/libstdc++-v3/include/ext/pb_assoc/detail/splay_tree_/erase_fn_imps.hpp
new file mode 100644
index 00000000000..1a0c00c77df
--- /dev/null
+++ b/libstdc++-v3/include/ext/pb_assoc/detail/splay_tree_/erase_fn_imps.hpp
@@ -0,0 +1,245 @@
+// -*- C++ -*-
+
+// 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.
+
+// As a special exception, you may use this file as part of a free software
+// library without restriction. Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General 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 erase_fn_imps.hpp
+ * Contains an implementation class for splay_tree_.
+ */
+
+PB_ASSOC_CLASS_T_DEC
+inline typename PB_ASSOC_CLASS_C_DEC::size_type
+PB_ASSOC_CLASS_C_DEC::
+erase(const_key_reference r_key)
+{
+ iterator it = find(r_key);
+
+ if (it == PB_ASSOC_BASE_C_DEC::find_end())
+ return (0);
+
+ erase(it);
+
+ return (1);
+}
+
+PB_ASSOC_CLASS_T_DEC
+inline typename PB_ASSOC_CLASS_C_DEC::const_iterator
+PB_ASSOC_CLASS_C_DEC::
+erase(const_iterator it)
+{
+ PB_ASSOC_DBG_ONLY(PB_ASSOC_CLASS_C_DEC::assert_valid());
+
+ if (it == PB_ASSOC_BASE_C_DEC::find_end())
+ return (it);
+
+ const_iterator ret_it = it;
+
+ ++ret_it;
+
+ erase_node(it.m_p_nd);
+
+ return (ret_it);
+}
+
+#ifdef PB_ASSOC_DATA_TRUE_INDICATOR
+PB_ASSOC_CLASS_T_DEC
+inline typename PB_ASSOC_CLASS_C_DEC::iterator
+PB_ASSOC_CLASS_C_DEC::
+erase(iterator it)
+{
+ PB_ASSOC_DBG_ONLY(PB_ASSOC_CLASS_C_DEC::assert_valid());
+ PB_ASSOC_DBG_ONLY(PB_ASSOC_BASE_C_DEC::assert_iterators();)
+
+ if (it == PB_ASSOC_BASE_C_DEC::find_end())
+ return (it);
+
+ iterator ret_it = it;
+
+ ++ret_it;
+
+ erase_node(it.m_p_nd);
+
+ PB_ASSOC_DBG_ONLY(PB_ASSOC_CLASS_C_DEC::assert_valid());
+ PB_ASSOC_DBG_ONLY(PB_ASSOC_BASE_C_DEC::assert_iterators();)
+
+ return (ret_it);
+}
+#endif // #ifdef PB_ASSOC_DATA_TRUE_INDICATOR
+
+PB_ASSOC_CLASS_T_DEC
+inline typename PB_ASSOC_CLASS_C_DEC::const_reverse_iterator
+PB_ASSOC_CLASS_C_DEC::
+erase(const_reverse_iterator it)
+{
+ PB_ASSOC_DBG_ONLY(PB_ASSOC_CLASS_C_DEC::assert_valid());
+
+ if (it == PB_ASSOC_BASE_C_DEC::find_rend())
+ return (it);
+
+ const_reverse_iterator ret_it = it;
+
+ ++ret_it;
+
+ erase_node(it.m_p_nd);
+
+ PB_ASSOC_DBG_ONLY(PB_ASSOC_CLASS_C_DEC::assert_valid());
+
+ return (ret_it);
+}
+
+#ifdef PB_ASSOC_DATA_TRUE_INDICATOR
+PB_ASSOC_CLASS_T_DEC
+inline typename PB_ASSOC_CLASS_C_DEC::reverse_iterator
+PB_ASSOC_CLASS_C_DEC::
+erase(reverse_iterator it)
+{
+ PB_ASSOC_DBG_ONLY(PB_ASSOC_CLASS_C_DEC::assert_valid());
+
+ if (it == PB_ASSOC_BASE_C_DEC::find_rend())
+ return (it);
+
+ reverse_iterator ret_it = it;
+
+ ++ret_it;
+
+ erase_node(it.m_p_nd);
+
+ PB_ASSOC_DBG_ONLY(PB_ASSOC_CLASS_C_DEC::assert_valid());
+
+ return (ret_it);
+}
+#endif // #ifdef PB_ASSOC_DATA_TRUE_INDICATOR
+
+PB_ASSOC_CLASS_T_DEC
+template<class Pred>
+inline typename PB_ASSOC_CLASS_C_DEC::size_type
+PB_ASSOC_CLASS_C_DEC::
+erase_if(Pred pred)
+{
+ PB_ASSOC_DBG_ONLY(PB_ASSOC_CLASS_C_DEC::assert_valid();)
+
+ size_type num_ersd = 0;
+
+ iterator it = PB_ASSOC_BASE_C_DEC::begin();
+
+ while (it != PB_ASSOC_BASE_C_DEC::end())
+ if (pred(*it))
+ {
+ ++num_ersd;
+
+ it = erase(it);
+ }
+ else
+ ++it;
+
+ PB_ASSOC_DBG_ONLY(PB_ASSOC_CLASS_C_DEC::assert_valid();)
+
+ return (num_ersd);
+}
+
+PB_ASSOC_CLASS_T_DEC
+void
+PB_ASSOC_CLASS_C_DEC::
+erase_node(node_pointer p_nd)
+{
+ PB_ASSOC_DBG_ASSERT(p_nd != NULL);
+
+ splay(p_nd);
+
+ PB_ASSOC_DBG_ONLY(assert_valid();)
+ PB_ASSOC_DBG_ASSERT(p_nd == PB_ASSOC_BASE_C_DEC::m_p_head->m_p_parent);
+
+ node_pointer p_l = p_nd->m_p_left;
+ node_pointer p_r = p_nd->m_p_right;
+
+ PB_ASSOC_BASE_C_DEC::update_min_max_for_erased_node(p_nd);
+
+ PB_ASSOC_BASE_C_DEC::actual_erase_node(p_nd);
+
+ if (p_r == NULL)
+ {
+ PB_ASSOC_BASE_C_DEC::m_p_head->m_p_parent = p_l;
+
+ if (p_l != NULL)
+ p_l->m_p_parent = PB_ASSOC_BASE_C_DEC::m_p_head;
+
+ PB_ASSOC_DBG_ONLY(assert_valid();)
+
+ return;
+ }
+
+ node_pointer p_target_r = leftmost(p_r);
+
+ PB_ASSOC_DBG_ASSERT(p_target_r != NULL);
+
+ p_r->m_p_parent = PB_ASSOC_BASE_C_DEC::m_p_head;
+
+ PB_ASSOC_BASE_C_DEC::m_p_head->m_p_parent = p_r;
+
+ splay(p_target_r);
+
+ PB_ASSOC_DBG_ONLY(p_target_r->m_p_left = NULL);
+
+ PB_ASSOC_DBG_ASSERT(p_target_r->m_p_parent ==
+ PB_ASSOC_BASE_C_DEC::m_p_head);
+
+ PB_ASSOC_DBG_ASSERT(PB_ASSOC_BASE_C_DEC::m_p_head->m_p_parent ==
+ p_target_r);
+
+ p_target_r->m_p_left = p_l;
+
+ if (p_l != NULL)
+ p_l->m_p_parent = p_target_r;
+
+ PB_ASSOC_DBG_ONLY(assert_valid();)
+
+ apply_update(p_target_r, (Node_Updator* )this);
+}
+
+PB_ASSOC_CLASS_T_DEC
+inline typename PB_ASSOC_CLASS_C_DEC::node_pointer
+PB_ASSOC_CLASS_C_DEC::
+leftmost(node_pointer p_nd)
+{
+ PB_ASSOC_DBG_ASSERT(p_nd != NULL);
+
+ while (p_nd->m_p_left != NULL)
+ p_nd = p_nd->m_p_left;
+
+ return (p_nd);
+}
diff --git a/libstdc++-v3/include/ext/pb_assoc/detail/splay_tree_/find_fn_imps.hpp b/libstdc++-v3/include/ext/pb_assoc/detail/splay_tree_/find_fn_imps.hpp
new file mode 100644
index 00000000000..ff67f5983ef
--- /dev/null
+++ b/libstdc++-v3/include/ext/pb_assoc/detail/splay_tree_/find_fn_imps.hpp
@@ -0,0 +1,122 @@
+// -*- C++ -*-
+
+// 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.
+
+// As a special exception, you may use this file as part of a free software
+// library without restriction. Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General 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 find_fn_imps.hpp
+ * Contains an implementation class for splay_tree_.
+ */
+
+PB_ASSOC_CLASS_T_DEC
+inline typename PB_ASSOC_CLASS_C_DEC::find_iterator
+PB_ASSOC_CLASS_C_DEC::
+lower_bound(const_key_reference r_key)
+{
+ find_iterator it = PB_ASSOC_BASE_C_DEC::find(r_key);
+
+ if (it != PB_ASSOC_BASE_C_DEC::end())
+ splay(it.m_p_nd);
+
+ return (it);
+}
+
+PB_ASSOC_CLASS_T_DEC
+inline typename PB_ASSOC_CLASS_C_DEC::const_find_iterator
+PB_ASSOC_CLASS_C_DEC::
+lower_bound(const_key_reference r_key) const
+{
+ find_iterator it = PB_ASSOC_BASE_C_DEC::lower_bound(r_key);
+
+ if (it != PB_ASSOC_BASE_C_DEC::end())
+ splay(it.m_p_nd);
+
+ return (it);
+}
+
+PB_ASSOC_CLASS_T_DEC
+inline typename PB_ASSOC_CLASS_C_DEC::find_iterator
+PB_ASSOC_CLASS_C_DEC::
+upper_bound(const_key_reference r_key)
+{
+ find_iterator it = PB_ASSOC_BASE_C_DEC::upper_bound(r_key);
+
+ if (it != PB_ASSOC_BASE_C_DEC::end())
+ splay(it.m_p_nd);
+
+ return (it);
+}
+
+PB_ASSOC_CLASS_T_DEC
+inline typename PB_ASSOC_CLASS_C_DEC::const_find_iterator
+PB_ASSOC_CLASS_C_DEC::
+upper_bound(const_key_reference r_key) const
+{
+ find_iterator it = PB_ASSOC_BASE_C_DEC::upper_bound(r_key);
+
+ if (it != PB_ASSOC_BASE_C_DEC::end())
+ splay(it.m_p_nd);
+
+ return (it);
+}
+
+PB_ASSOC_CLASS_T_DEC
+inline typename PB_ASSOC_CLASS_C_DEC::find_iterator
+PB_ASSOC_CLASS_C_DEC::
+find(const_key_reference r_key)
+{
+ find_iterator it = PB_ASSOC_BASE_C_DEC::find(r_key);
+
+ if (it != PB_ASSOC_BASE_C_DEC::end())
+ splay(it.m_p_nd);
+
+ return (it);
+}
+
+PB_ASSOC_CLASS_T_DEC
+inline typename PB_ASSOC_CLASS_C_DEC::const_find_iterator
+PB_ASSOC_CLASS_C_DEC::
+find(const_key_reference r_key) const
+{
+ const_find_iterator it = PB_ASSOC_BASE_C_DEC::find(r_key);
+
+ if (it != PB_ASSOC_BASE_C_DEC::end())
+ const_cast<PB_ASSOC_CLASS_C_DEC* >(this)->splay(it.m_p_nd);
+
+ return (it);
+}
+
diff --git a/libstdc++-v3/include/ext/pb_assoc/detail/splay_tree_/info_fn_imps.hpp b/libstdc++-v3/include/ext/pb_assoc/detail/splay_tree_/info_fn_imps.hpp
new file mode 100644
index 00000000000..186812153da
--- /dev/null
+++ b/libstdc++-v3/include/ext/pb_assoc/detail/splay_tree_/info_fn_imps.hpp
@@ -0,0 +1,43 @@
+// -*- C++ -*-
+
+// 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.
+
+// As a special exception, you may use this file as part of a free software
+// library without restriction. Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General 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 info_fn_imps.hpp
+ * Contains an implementation.
+ */
diff --git a/libstdc++-v3/include/ext/pb_assoc/detail/splay_tree_/insert_fn_imps.hpp b/libstdc++-v3/include/ext/pb_assoc/detail/splay_tree_/insert_fn_imps.hpp
new file mode 100644
index 00000000000..77882f3e6c9
--- /dev/null
+++ b/libstdc++-v3/include/ext/pb_assoc/detail/splay_tree_/insert_fn_imps.hpp
@@ -0,0 +1,89 @@
+// -*- C++ -*-
+
+// 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.
+
+// As a special exception, you may use this file as part of a free software
+// library without restriction. Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General 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 insert_fn_imps.hpp
+ * Contains an implementation class for splay_tree_.
+ */
+
+PB_ASSOC_CLASS_T_DEC
+inline std::pair<typename PB_ASSOC_CLASS_C_DEC::find_iterator, bool>
+PB_ASSOC_CLASS_C_DEC::
+insert(const_reference r_value)
+{
+ PB_ASSOC_DBG_ONLY(PB_ASSOC_CLASS_C_DEC::assert_valid();)
+
+ std::pair<find_iterator, bool> ins_pair =
+ PB_ASSOC_BASE_C_DEC::insert_leaf(r_value);
+
+ ins_pair.first.m_p_nd->m_special = false;
+
+ PB_ASSOC_DBG_ONLY(PB_ASSOC_BASE_C_DEC::assert_valid(true, true));
+
+ splay(ins_pair.first.m_p_nd);
+
+ PB_ASSOC_DBG_ONLY(PB_ASSOC_BASE_C_DEC::assert_valid(true, true));
+
+ return (ins_pair);
+}
+
+#ifdef PB_ASSOC_DATA_TRUE_INDICATOR
+PB_ASSOC_CLASS_T_DEC
+inline typename PB_ASSOC_CLASS_C_DEC::data_reference
+PB_ASSOC_CLASS_C_DEC::
+subscript_imp(const_key_reference r_key)
+{
+ PB_ASSOC_DBG_ONLY(PB_ASSOC_CLASS_C_DEC::assert_valid();)
+
+ std::pair<find_iterator, bool> ins_pair =
+ PB_ASSOC_BASE_C_DEC::insert_leaf(
+ value_type(r_key, Data()));
+
+ ins_pair.first.m_p_nd->m_special = false;
+
+ PB_ASSOC_DBG_ONLY(PB_ASSOC_BASE_C_DEC::assert_valid());
+
+ splay(ins_pair.first.m_p_nd);
+
+ PB_ASSOC_DBG_ONLY(PB_ASSOC_CLASS_C_DEC::assert_valid();)
+
+ return (ins_pair.first.m_p_nd->m_value.second);
+}
+#endif // #ifdef PB_ASSOC_DATA_TRUE
+
diff --git a/libstdc++-v3/include/ext/pb_assoc/detail/splay_tree_/node.hpp b/libstdc++-v3/include/ext/pb_assoc/detail/splay_tree_/node.hpp
new file mode 100644
index 00000000000..5012d587f5d
--- /dev/null
+++ b/libstdc++-v3/include/ext/pb_assoc/detail/splay_tree_/node.hpp
@@ -0,0 +1,89 @@
+// -*- C++ -*-
+
+// 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.
+
+// As a special exception, you may use this file as part of a free software
+// library without restriction. Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General 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 node.hpp
+ * Contains an implementation struct for splay_tree_'s node.
+ */
+
+#ifndef SPLAY_TREE_NODE_HPP
+#define SPLAY_TREE_NODE_HPP
+
+namespace pb_assoc
+{
+
+ namespace detail
+ {
+
+ template<class Value_Type, class Allocator>
+ struct splay_tree_node_
+ {
+ public:
+ typedef
+ typename Allocator::template rebind<
+ splay_tree_node_<
+ Value_Type,
+ Allocator> >::other::pointer
+ node_pointer;
+
+ public:
+ inline bool
+ special_dec_check() const
+ {
+ return (m_special);
+ }
+
+ public:
+ typedef Value_Type value_type;
+
+ value_type m_value;
+
+ bool m_special;
+
+ node_pointer m_p_left;
+ node_pointer m_p_right;
+
+ node_pointer m_p_parent;
+ };
+
+ } // namespace detail
+
+} // namespace pb_assoc
+
+#endif // #ifndef SPLAY_TREE_NODE_HPP
diff --git a/libstdc++-v3/include/ext/pb_assoc/detail/splay_tree_/splay_fn_imps.hpp b/libstdc++-v3/include/ext/pb_assoc/detail/splay_tree_/splay_fn_imps.hpp
new file mode 100644
index 00000000000..ffccf7b6569
--- /dev/null
+++ b/libstdc++-v3/include/ext/pb_assoc/detail/splay_tree_/splay_fn_imps.hpp
@@ -0,0 +1,289 @@
+// -*- C++ -*-
+
+// 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.
+
+// As a special exception, you may use this file as part of a free software
+// library without restriction. Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General 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 splay_fn_imps.hpp
+ * Contains an implementation class for splay_tree_.
+ */
+
+PB_ASSOC_CLASS_T_DEC
+void
+PB_ASSOC_CLASS_C_DEC::
+splay(node_pointer p_nd)
+{
+ while (p_nd->m_p_parent != PB_ASSOC_BASE_C_DEC::m_p_head)
+ {
+ PB_ASSOC_DBG_ONLY(PB_ASSOC_BASE_C_DEC::assert_node_consistent(p_nd);)
+
+ if (p_nd->m_p_parent->m_p_parent ==
+ PB_ASSOC_BASE_C_DEC::m_p_head)
+ {
+ PB_ASSOC_BASE_C_DEC::rotate_parent(p_nd);
+
+ PB_ASSOC_DBG_ASSERT(p_nd ==
+ PB_ASSOC_BASE_C_DEC::m_p_head->m_p_parent);
+ }
+ else
+ {
+ const node_pointer p_parent = p_nd->m_p_parent;
+ const node_pointer p_grandparent = p_parent->m_p_parent;
+
+#ifdef PB_ASSOC_SPLAY_TREE_DEBUG_
+ const size_type total =
+ PB_ASSOC_BASE_C_DEC::recursive_count(p_grandparent);
+
+ PB_ASSOC_DBG_ASSERT(total >= 3);
+#endif // #ifdef PB_ASSOC_SPLAY_TREE_DEBUG_
+
+ if (p_parent->m_p_left == p_nd&&
+ p_grandparent->m_p_right == p_parent)
+ splay_zig_zag_left(p_nd, p_parent, p_grandparent);
+ else if (p_parent->m_p_right == p_nd&&
+ p_grandparent->m_p_left == p_parent)
+ splay_zig_zag_right(p_nd, p_parent, p_grandparent);
+ else if (p_parent->m_p_left == p_nd&&
+ p_grandparent->m_p_left == p_parent)
+ splay_zig_zig_left(p_nd, p_parent, p_grandparent);
+ else
+ splay_zig_zig_right(p_nd, p_parent, p_grandparent);
+
+ PB_ASSOC_DBG_ASSERT(total ==
+ PB_ASSOC_BASE_C_DEC::recursive_count(p_nd));
+ }
+
+ PB_ASSOC_DBG_ONLY(assert_node_consistent(p_nd);)
+ }
+}
+
+PB_ASSOC_CLASS_T_DEC
+inline void
+PB_ASSOC_CLASS_C_DEC::
+splay_zig_zag_left(node_pointer p_nd, node_pointer p_parent, node_pointer p_grandparent)
+{
+ PB_ASSOC_DBG_ASSERT(p_parent == p_nd->m_p_parent);
+ PB_ASSOC_DBG_ASSERT(p_grandparent == p_parent->m_p_parent);
+
+ PB_ASSOC_DBG_ONLY(assert_node_consistent(p_grandparent);)
+
+ PB_ASSOC_DBG_ASSERT(p_parent->m_p_left == p_nd&&
+ p_grandparent->m_p_right == p_parent);
+
+ splay_zz_start(p_nd, p_parent, p_grandparent);
+
+ node_pointer p_b = p_nd->m_p_right;
+ node_pointer p_c = p_nd->m_p_left;
+
+ p_nd->m_p_right = p_parent;
+ p_parent->m_p_parent = p_nd;
+
+ p_nd->m_p_left = p_grandparent;
+ p_grandparent->m_p_parent = p_nd;
+
+ p_parent->m_p_left = p_b;
+ if (p_b != NULL)
+ p_b->m_p_parent = p_parent;
+
+ p_grandparent->m_p_right = p_c;
+ if (p_c != NULL)
+ p_c->m_p_parent = p_grandparent;
+
+ splay_zz_end(p_nd, p_parent, p_grandparent);
+}
+
+PB_ASSOC_CLASS_T_DEC
+inline void
+PB_ASSOC_CLASS_C_DEC::
+splay_zig_zag_right(node_pointer p_nd, node_pointer p_parent, node_pointer p_grandparent)
+{
+ PB_ASSOC_DBG_ASSERT(p_parent == p_nd->m_p_parent);
+ PB_ASSOC_DBG_ASSERT(p_grandparent == p_parent->m_p_parent);
+
+ PB_ASSOC_DBG_ONLY(assert_node_consistent(p_grandparent);)
+
+ PB_ASSOC_DBG_ASSERT(p_parent->m_p_right == p_nd&&
+ p_grandparent->m_p_left == p_parent);
+
+ splay_zz_start(p_nd, p_parent, p_grandparent);
+
+ node_pointer p_b = p_nd->m_p_left;
+ node_pointer p_c = p_nd->m_p_right;
+
+ p_nd->m_p_left = p_parent;
+ p_parent->m_p_parent = p_nd;
+
+ p_nd->m_p_right = p_grandparent;
+ p_grandparent->m_p_parent = p_nd;
+
+ p_parent->m_p_right = p_b;
+ if (p_b != NULL)
+ p_b->m_p_parent = p_parent;
+
+ p_grandparent->m_p_left = p_c;
+ if (p_c != NULL)
+ p_c->m_p_parent = p_grandparent;
+
+ splay_zz_end(p_nd, p_parent, p_grandparent);
+}
+
+PB_ASSOC_CLASS_T_DEC
+inline void
+PB_ASSOC_CLASS_C_DEC::
+splay_zig_zig_left(node_pointer p_nd, node_pointer p_parent, node_pointer p_grandparent)
+{
+ PB_ASSOC_DBG_ASSERT(p_parent == p_nd->m_p_parent);
+ PB_ASSOC_DBG_ASSERT(p_grandparent == p_parent->m_p_parent);
+
+ PB_ASSOC_DBG_ONLY(assert_node_consistent(p_grandparent);)
+
+ PB_ASSOC_DBG_ASSERT(p_parent->m_p_left == p_nd&&
+ p_nd->m_p_parent->m_p_parent->m_p_left == p_nd->m_p_parent);
+
+ splay_zz_start(p_nd, p_parent, p_grandparent);
+
+ node_pointer p_b = p_nd->m_p_right;
+ node_pointer p_c = p_parent->m_p_right;
+
+ p_nd->m_p_right = p_parent;
+ p_parent->m_p_parent = p_nd;
+
+ p_parent->m_p_right = p_grandparent;
+ p_grandparent->m_p_parent = p_parent;
+
+ p_parent->m_p_left = p_b;
+ if (p_b != NULL)
+ p_b->m_p_parent = p_parent;
+
+ p_grandparent->m_p_left = p_c;
+ if (p_c != NULL)
+ p_c->m_p_parent = p_grandparent;
+
+ splay_zz_end(p_nd, p_parent, p_grandparent);
+}
+
+PB_ASSOC_CLASS_T_DEC
+inline void
+PB_ASSOC_CLASS_C_DEC::
+splay_zig_zig_right(node_pointer p_nd, node_pointer p_parent, node_pointer p_grandparent)
+{
+ PB_ASSOC_DBG_ASSERT(p_parent == p_nd->m_p_parent);
+ PB_ASSOC_DBG_ASSERT(p_grandparent == p_parent->m_p_parent);
+
+ PB_ASSOC_DBG_ONLY(assert_node_consistent(p_grandparent);)
+
+ PB_ASSOC_DBG_ASSERT(p_parent->m_p_right == p_nd&&
+ p_nd->m_p_parent->m_p_parent->m_p_right == p_nd->m_p_parent);
+
+ splay_zz_start(p_nd, p_parent, p_grandparent);
+
+ node_pointer p_b = p_nd->m_p_left;
+ node_pointer p_c = p_parent->m_p_left;
+
+ p_nd->m_p_left = p_parent;
+ p_parent->m_p_parent = p_nd;
+
+ p_parent->m_p_left = p_grandparent;
+ p_grandparent->m_p_parent = p_parent;
+
+ p_parent->m_p_right = p_b;
+ if (p_b != NULL)
+ p_b->m_p_parent = p_parent;
+
+ p_grandparent->m_p_right = p_c;
+ if (p_c != NULL)
+ p_c->m_p_parent = p_grandparent;
+
+ PB_ASSOC_BASE_C_DEC::update_to_top(
+ p_grandparent, (Node_Updator* )this);
+
+ splay_zz_end(p_nd, p_parent, p_grandparent);
+}
+
+PB_ASSOC_CLASS_T_DEC
+inline void
+PB_ASSOC_CLASS_C_DEC::
+splay_zz_start(node_pointer p_nd,
+#ifdef PB_ASSOC_SPLAY_TREE_DEBUG_
+ node_pointer p_parent,
+#else // #ifdef PB_ASSOC_SPLAY_TREE_DEBUG_
+ node_pointer /*p_parent*/,
+#endif // #ifdef PB_ASSOC_SPLAY_TREE_DEBUG_
+ node_pointer p_grandparent)
+{
+ PB_ASSOC_DBG_ASSERT(p_nd != NULL);
+ PB_ASSOC_DBG_ASSERT(p_parent != NULL);
+ PB_ASSOC_DBG_ASSERT(p_grandparent != NULL);
+
+ const bool grandparent_head =
+ p_grandparent->m_p_parent == PB_ASSOC_BASE_C_DEC::m_p_head;
+
+ if (grandparent_head)
+ {
+ PB_ASSOC_BASE_C_DEC::m_p_head->m_p_parent =
+ PB_ASSOC_BASE_C_DEC::m_p_head->m_p_parent;
+
+ p_nd->m_p_parent = PB_ASSOC_BASE_C_DEC::m_p_head;
+
+ return;
+ }
+
+ node_pointer p_greatgrandparent = p_grandparent->m_p_parent;
+
+ p_nd->m_p_parent = p_greatgrandparent;
+
+ if (p_grandparent == p_greatgrandparent->m_p_left)
+ p_greatgrandparent->m_p_left = p_nd;
+ else
+ p_greatgrandparent->m_p_right = p_nd;
+}
+
+PB_ASSOC_CLASS_T_DEC
+inline void
+PB_ASSOC_CLASS_C_DEC::
+splay_zz_end(node_pointer p_nd, node_pointer p_parent, node_pointer p_grandparent)
+{
+ if (p_nd->m_p_parent == PB_ASSOC_BASE_C_DEC::m_p_head)
+ PB_ASSOC_BASE_C_DEC::m_p_head->m_p_parent = p_nd;
+
+ apply_update(p_grandparent, (Node_Updator* )this);
+ apply_update(p_parent, (Node_Updator* )this);
+ apply_update(p_nd, (Node_Updator* )this);
+
+ PB_ASSOC_DBG_ONLY(assert_node_consistent(p_nd);)
+ }
+
diff --git a/libstdc++-v3/include/ext/pb_assoc/detail/splay_tree_/splay_tree_.hpp b/libstdc++-v3/include/ext/pb_assoc/detail/splay_tree_/splay_tree_.hpp
new file mode 100644
index 00000000000..e6762c9d9c5
--- /dev/null
+++ b/libstdc++-v3/include/ext/pb_assoc/detail/splay_tree_/splay_tree_.hpp
@@ -0,0 +1,342 @@
+// -*- C++ -*-
+
+// 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.
+
+// As a special exception, you may use this file as part of a free software
+// library without restriction. Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General 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 splay_tree_.hpp
+ * Contains an implementation class for splay_tree_.
+ */
+
+#ifdef PB_ASSOC_DATA_TRUE_INDICATOR
+#ifndef BIN_SEARCH_TREE_HPP__DATA_TRUE_INDICATOR
+#define BIN_SEARCH_TREE_HPP__DATA_TRUE_INDICATOR
+#include <ext/pb_assoc/detail/bin_search_tree_/bin_search_tree_.hpp>
+#endif // #ifndef BIN_SEARCH_TREE_HPP__DATA_TRUE_INDICATOR
+#endif // #ifdef PB_ASSOC_DATA_TRUE_INDICATOR
+
+#ifdef PB_ASSOC_DATA_FALSE_INDICATOR
+#ifndef BIN_SEARCH_TREE_HPP__DATA_FALSE_INDICATOR
+#define BIN_SEARCH_TREE_HPP__DATA_FALSE_INDICATOR
+#include <ext/pb_assoc/detail/bin_search_tree_/bin_search_tree_.hpp>
+#endif // #ifndef BIN_SEARCH_TREE_HPP__DATA_FALSE_INDICATOR
+#endif // #ifdef PB_ASSOC_DATA_FALSE_INDICATOR
+
+#include <ext/pb_assoc/detail/splay_tree_/node.hpp>
+#include <utility>
+#include <vector>
+#include <assert.h>
+
+namespace pb_assoc
+{
+
+ namespace detail
+ {
+
+#ifdef PB_ASSOC_SPLAY_TREE_DEBUG_
+#define PB_ASSOC_DBG_ASSERT(X) assert(X)
+#define PB_ASSOC_DBG_VERIFY(X) assert(X)
+#define PB_ASSOC_DBG_ONLY(X) X
+#else // #ifdef PB_ASSOC_SPLAY_TREE_DEBUG_
+#define PB_ASSOC_DBG_ASSERT(X)
+#define PB_ASSOC_DBG_VERIFY(X) {if((X)==0);}
+#define PB_ASSOC_DBG_ONLY(X) ;
+#endif // #ifdef PB_ASSOC_SPLAY_TREE_DEBUG_
+
+#define PB_ASSOC_CLASS_T_DEC \
+ template< \
+ typename Key, \
+ typename Data, \
+ class Cmp_Fn, \
+ class Allocator, \
+ class Node_Updator>
+
+#ifdef PB_ASSOC_DATA_TRUE_INDICATOR
+#define PB_ASSOC_CLASS_NAME \
+ splay_tree_data_
+#endif // #ifdef PB_ASSOC_DATA_TRUE_INDICATOR
+
+#ifdef PB_ASSOC_DATA_FALSE_INDICATOR
+#define PB_ASSOC_CLASS_NAME \
+ splay_tree_no_data_
+#endif // #ifdef PB_ASSOC_DATA_FALSE_INDICATOR
+
+#ifdef PB_ASSOC_DATA_TRUE_INDICATOR
+#define PB_ASSOC_BASE_CLASS_NAME \
+ bin_search_tree_data_
+#endif // #ifdef PB_ASSOC_DATA_TRUE_INDICATOR
+
+#ifdef PB_ASSOC_DATA_FALSE_INDICATOR
+#define PB_ASSOC_BASE_CLASS_NAME \
+ bin_search_tree_no_data_
+#endif // #ifdef PB_ASSOC_DATA_FALSE_INDICATOR
+
+#define PB_ASSOC_CLASS_C_DEC \
+ PB_ASSOC_CLASS_NAME< \
+ Key, \
+ Data, \
+ Cmp_Fn, \
+ Allocator, \
+ Node_Updator>
+
+#define PB_ASSOC_TYPES_TRAITS_C_DEC \
+ types_traits< \
+ Key, \
+ Data, \
+ Allocator>
+
+#define PB_ASSOC_NODE_C_DEC \
+ splay_tree_node_< \
+ typename PB_ASSOC_TYPES_TRAITS_C_DEC::value_type, \
+ Allocator>
+
+#define PB_ASSOC_BASE_C_DEC \
+ PB_ASSOC_BASE_CLASS_NAME< \
+ Key, \
+ Data, \
+ PB_ASSOC_NODE_C_DEC, \
+ Cmp_Fn, \
+ Allocator, \
+ Node_Updator>
+
+ template<typename Key,
+ typename Data,
+ class Cmp_Fn,
+ class Allocator,
+ class Node_Updator>
+ struct PB_ASSOC_CLASS_NAME : public PB_ASSOC_BASE_C_DEC
+ {
+
+ protected:
+
+ typedef typename Allocator::size_type size_type;
+
+ typedef
+ typename PB_ASSOC_TYPES_TRAITS_C_DEC::const_key_reference
+ const_key_reference;
+
+ typedef typename PB_ASSOC_TYPES_TRAITS_C_DEC::data_type data_type;
+
+ typedef
+ typename PB_ASSOC_TYPES_TRAITS_C_DEC::data_reference
+ data_reference;
+
+ typedef
+ typename PB_ASSOC_TYPES_TRAITS_C_DEC::const_data_reference
+ const_data_reference;
+
+ typedef typename PB_ASSOC_TYPES_TRAITS_C_DEC::value_type value_type;
+
+ typedef typename PB_ASSOC_TYPES_TRAITS_C_DEC::pointer pointer;
+
+ typedef
+ typename PB_ASSOC_TYPES_TRAITS_C_DEC::const_pointer
+ const_pointer;
+
+ typedef typename PB_ASSOC_TYPES_TRAITS_C_DEC::reference reference;
+
+ typedef
+ typename PB_ASSOC_TYPES_TRAITS_C_DEC::const_reference
+ const_reference;
+
+ typedef typename PB_ASSOC_BASE_C_DEC::node_pointer node_pointer;
+
+ typedef typename PB_ASSOC_BASE_C_DEC::find_iterator find_iterator;
+
+ typedef
+ typename PB_ASSOC_BASE_C_DEC::const_iterator
+ const_find_iterator;
+
+ typedef typename PB_ASSOC_BASE_C_DEC::iterator iterator;
+
+ typedef typename PB_ASSOC_BASE_C_DEC::const_iterator const_iterator;
+
+ typedef
+ typename PB_ASSOC_BASE_C_DEC::reverse_iterator
+ reverse_iterator;
+
+ typedef
+ typename PB_ASSOC_BASE_C_DEC::const_reverse_iterator
+ const_reverse_iterator;
+
+ protected:
+
+ PB_ASSOC_CLASS_NAME();
+
+ PB_ASSOC_CLASS_NAME(const Cmp_Fn& r_cmp_fn);
+
+ PB_ASSOC_CLASS_NAME(const Cmp_Fn& r_cmp_fn, const Node_Updator& r_node_updator);
+
+ PB_ASSOC_CLASS_NAME(const PB_ASSOC_CLASS_C_DEC& r_other);
+
+ void
+ swap(PB_ASSOC_CLASS_C_DEC& r_other);
+
+ template<class It>
+ void
+ copy_from_range(It first_it, It last_it);
+
+ void
+ initialize();
+
+ inline std::pair<find_iterator, bool>
+ insert(const_reference r_value);
+
+#ifdef PB_ASSOC_DATA_TRUE_INDICATOR
+ inline data_reference
+ subscript_imp(const_key_reference r_key);
+#endif // #ifdef PB_ASSOC_DATA_TRUE
+
+ inline find_iterator
+ lower_bound(const_key_reference r_key);
+
+ inline const_find_iterator
+ lower_bound(const_key_reference r_key) const;
+
+ inline find_iterator
+ upper_bound(const_key_reference r_key);
+
+ inline const_find_iterator
+ upper_bound(const_key_reference r_key) const;
+
+ inline find_iterator
+ find(const_key_reference r_key);
+
+ inline const_find_iterator
+ find(const_key_reference r_key) const;
+
+ inline size_type
+ erase(const_key_reference r_key);
+
+ inline const_iterator
+ erase(const_iterator it);
+
+#ifdef PB_ASSOC_DATA_TRUE_INDICATOR
+ inline iterator
+ erase(iterator it);
+#endif // #ifdef PB_ASSOC_DATA_TRUE_INDICATOR
+
+ inline const_reverse_iterator
+ erase(const_reverse_iterator it);
+
+#ifdef PB_ASSOC_DATA_TRUE_INDICATOR
+ inline reverse_iterator
+ erase(reverse_iterator it);
+#endif // #ifdef PB_ASSOC_DATA_TRUE_INDICATOR
+
+ template<class Pred>
+ inline size_type
+ erase_if(Pred pred);
+
+ inline node_pointer
+ leftmost(node_pointer p_nd);
+
+ void
+ join(PB_ASSOC_CLASS_C_DEC& r_other);
+
+ void
+ split(const_key_reference r_key, PB_ASSOC_CLASS_C_DEC& r_other);
+
+#ifdef PB_ASSOC_SPLAY_TREE_DEBUG_
+
+ virtual void
+ assert_valid() const;
+
+ void
+ assert_special_imp(const node_pointer p_nd) const;
+
+#endif // #ifdef PB_ASSOC_SPLAY_TREE_DEBUG_
+
+ private:
+
+ void
+ splay(node_pointer p_nd);
+
+ inline void
+ splay_zig_zag_left(node_pointer p_nd, node_pointer p_parent, node_pointer p_grandparent);
+
+ inline void
+ splay_zig_zag_right(node_pointer p_nd, node_pointer p_parent, node_pointer p_grandparent);
+
+ inline void
+ splay_zig_zig_left(node_pointer p_nd, node_pointer p_parent, node_pointer p_grandparent);
+
+ inline void
+ splay_zig_zig_right(node_pointer p_nd, node_pointer p_parent, node_pointer p_grandparent);
+
+ inline void
+ splay_zz_start(node_pointer p_nd, node_pointer p_parent, node_pointer p_grandparent);
+
+ inline void
+ splay_zz_end(node_pointer p_nd, node_pointer p_parent, node_pointer p_grandparent);
+
+ void
+ erase_node(node_pointer p_nd);
+
+ };
+
+#include <ext/pb_assoc/detail/splay_tree_/constructors_destructor_fn_imps.hpp>
+#include <ext/pb_assoc/detail/splay_tree_/info_fn_imps.hpp>
+#include <ext/pb_assoc/detail/splay_tree_/insert_fn_imps.hpp>
+#include <ext/pb_assoc/detail/splay_tree_/splay_fn_imps.hpp>
+#include <ext/pb_assoc/detail/splay_tree_/erase_fn_imps.hpp>
+#include <ext/pb_assoc/detail/splay_tree_/find_fn_imps.hpp>
+#include <ext/pb_assoc/detail/splay_tree_/debug_fn_imps.hpp>
+#include <ext/pb_assoc/detail/splay_tree_/split_join_fn_imps.hpp>
+
+#undef PB_ASSOC_CLASS_T_DEC
+
+#undef PB_ASSOC_CLASS_C_DEC
+
+#undef PB_ASSOC_CLASS_NAME
+
+#undef PB_ASSOC_TYPES_TRAITS_C_DEC
+
+#undef PB_ASSOC_BASE_CLASS_NAME
+
+#undef PB_ASSOC_NODE_C_DEC
+
+#undef PB_ASSOC_BASE_C_DEC
+
+#undef PB_ASSOC_DBG_ASSERT
+#undef PB_ASSOC_DBG_VERIFY
+#undef PB_ASSOC_DBG_ONLY
+
+ } // namespace detail
+
+} // namespace pb_assoc
+
diff --git a/libstdc++-v3/include/ext/pb_assoc/detail/splay_tree_/split_join_fn_imps.hpp b/libstdc++-v3/include/ext/pb_assoc/detail/splay_tree_/split_join_fn_imps.hpp
new file mode 100644
index 00000000000..e1dd0c2eff2
--- /dev/null
+++ b/libstdc++-v3/include/ext/pb_assoc/detail/splay_tree_/split_join_fn_imps.hpp
@@ -0,0 +1,125 @@
+// -*- C++ -*-
+
+// 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.
+
+// As a special exception, you may use this file as part of a free software
+// library without restriction. Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General 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 split_join_fn_imps.hpp
+ * Contains an implementation class for splay_tree_.
+ */
+
+PB_ASSOC_CLASS_T_DEC
+inline void
+PB_ASSOC_CLASS_C_DEC::
+join(PB_ASSOC_CLASS_C_DEC& r_other)
+{
+ PB_ASSOC_DBG_ONLY(PB_ASSOC_CLASS_C_DEC::assert_valid();)
+ PB_ASSOC_DBG_ONLY(r_other.PB_ASSOC_CLASS_C_DEC::assert_valid();)
+
+ if (PB_ASSOC_BASE_C_DEC::join_prep(r_other) == false)
+ {
+ PB_ASSOC_DBG_ONLY(PB_ASSOC_CLASS_C_DEC::assert_valid();)
+ PB_ASSOC_DBG_ONLY(r_other.PB_ASSOC_CLASS_C_DEC::assert_valid();)
+
+ return;
+ }
+
+ node_pointer p_target_r = r_other.leftmost(r_other.m_p_head);
+
+ PB_ASSOC_DBG_ASSERT(p_target_r != NULL);
+
+ r_other.splay(p_target_r);
+
+ PB_ASSOC_DBG_ASSERT(p_target_r == r_other.m_p_head->m_p_parent);
+ PB_ASSOC_DBG_ASSERT(p_target_r->m_p_left == NULL);
+
+ p_target_r->m_p_left = PB_ASSOC_BASE_C_DEC::m_p_head->m_p_parent;
+
+ PB_ASSOC_DBG_ASSERT(p_target_r->m_p_left != NULL);
+ p_target_r->m_p_left->m_p_parent = p_target_r;
+
+ PB_ASSOC_BASE_C_DEC::m_p_head->m_p_parent = p_target_r;
+ p_target_r->m_p_parent = PB_ASSOC_BASE_C_DEC::m_p_head;
+
+ apply_update(p_target_r, (Node_Updator* )this);
+
+ PB_ASSOC_BASE_C_DEC::join_finish(r_other);
+
+ PB_ASSOC_DBG_ONLY(PB_ASSOC_CLASS_C_DEC::assert_valid();)
+ PB_ASSOC_DBG_ONLY(r_other.PB_ASSOC_CLASS_C_DEC::assert_valid();)
+ }
+
+PB_ASSOC_CLASS_T_DEC
+void
+PB_ASSOC_CLASS_C_DEC::
+split(const_key_reference r_key, PB_ASSOC_CLASS_C_DEC& r_other)
+{
+ PB_ASSOC_DBG_ONLY(PB_ASSOC_CLASS_C_DEC::assert_valid());
+ PB_ASSOC_DBG_ONLY(r_other.PB_ASSOC_CLASS_C_DEC::assert_valid());
+
+ if (PB_ASSOC_BASE_C_DEC::split_prep(r_key, r_other) == false)
+ {
+ PB_ASSOC_DBG_ONLY(PB_ASSOC_CLASS_C_DEC::assert_valid());
+ PB_ASSOC_DBG_ONLY(r_other.PB_ASSOC_CLASS_C_DEC::assert_valid());
+
+ return;
+ }
+
+ node_pointer p_upper_bound = upper_bound(r_key).m_p_nd;
+ PB_ASSOC_DBG_ASSERT(p_upper_bound != NULL);
+
+ PB_ASSOC_DBG_ASSERT(p_upper_bound->m_p_parent ==
+ PB_ASSOC_BASE_C_DEC::m_p_head);
+
+ node_pointer p_new_root = p_upper_bound->m_p_left;
+ PB_ASSOC_DBG_ASSERT(p_new_root != NULL);
+
+ PB_ASSOC_BASE_C_DEC::m_p_head->m_p_parent = p_new_root;
+ p_new_root->m_p_parent = PB_ASSOC_BASE_C_DEC::m_p_head;
+
+ r_other.m_p_head->m_p_parent = p_upper_bound;
+ p_upper_bound->m_p_parent = r_other.m_p_head;
+ p_upper_bound->m_p_left = NULL;
+
+ apply_update(p_upper_bound, (Node_Updator* )this);
+
+ PB_ASSOC_BASE_C_DEC::split_finish(r_other);
+
+ PB_ASSOC_DBG_ONLY(PB_ASSOC_CLASS_C_DEC::assert_valid());
+ PB_ASSOC_DBG_ONLY(r_other.PB_ASSOC_CLASS_C_DEC::assert_valid());
+}
+
diff --git a/libstdc++-v3/include/ext/pb_assoc/detail/standard_policies.hpp b/libstdc++-v3/include/ext/pb_assoc/detail/standard_policies.hpp
new file mode 100644
index 00000000000..899dc74ab22
--- /dev/null
+++ b/libstdc++-v3/include/ext/pb_assoc/detail/standard_policies.hpp
@@ -0,0 +1,188 @@
+// -*- C++ -*-
+
+// 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.
+
+// As a special exception, you may use this file as part of a free software
+// library without restriction. Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General 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 standard_policies.hpp
+ * Contains standard policies for containers.
+ */
+
+#ifndef STANDARD_POLICIES_HPP
+#define STANDARD_POLICIES_HPP
+
+#include <memory>
+#include <ext/pb_assoc/hash_policy.hpp>
+#include <ext/pb_assoc/lu_policy.hpp>
+#include <ext/pb_assoc/tree_policy.hpp>
+#if defined(__GNUC__)
+#include <ext/hash_map>
+#elif defined(_MSC_VER)
+#include <hash_map>
+#else
+#error "Unable to determine the namespaces for your compiler. Please" \
+ "Contact pbassoc@gmail.com"
+#endif // #if defined(__GNUC__)
+
+namespace pb_assoc
+{
+
+ namespace detail
+ {
+
+#ifdef __GNUC__
+
+#define PB_ASSOC_HASH_NAMESPACE \
+ __gnu_cxx
+
+ template<typename Key>
+ struct def_hash_fn
+ {
+ typedef PB_ASSOC_HASH_NAMESPACE::hash<Key> type;
+ };
+
+ template<typename Key>
+ struct def_eq_fn
+ {
+ typedef PB_ASSOC_HASH_NAMESPACE::equal_to<Key> type;
+ };
+
+#elif defined(_MSC_VER)
+
+ template<typename Key>
+ struct hash_value_class_adapter
+ {
+ inline size_t
+ operator()(const Key& r_key) const
+ {
+ return (stdext::hash_value(r_key));
+ }
+ };
+
+ template<typename Key>
+ struct def_hash_fn
+ {
+ typedef hash_value_class_adapter<Key> type;
+ };
+
+ template<typename Key>
+ struct def_eq_fn
+ {
+ typedef std::equal_to<Key> type;
+ };
+
+#else // #elif defined(_MSC_VER)
+
+#error Sorry, cannot determine headers, namespaces, etc. for your compiler.
+#error If you encounter this error, pls write to pbassoc@gmail.com
+
+#endif // #elif defined(_MSC_VER)
+
+ enum
+ {
+ def_store_hash = false
+ };
+
+ struct def_comb_hash_fn
+ {
+ typedef pb_assoc::direct_mask_range_hashing<> type;
+ };
+
+ template<class Comb_Hash_Fn>
+ struct def_resize_policy
+ {
+ private:
+ typedef typename Comb_Hash_Fn::size_type size_type;
+
+ typedef
+ typename pb_assoc::detail::cond_type<
+ pb_assoc::detail::is_same_type<
+ pb_assoc::direct_mask_range_hashing<size_type>,
+ Comb_Hash_Fn>::value,
+ pb_assoc::hash_exponential_size_policy<
+ size_type>,
+ pb_assoc::hash_prime_size_policy>::type
+ size_policy_type;
+
+ public:
+ typedef
+ pb_assoc::hash_standard_resize_policy<
+ size_policy_type,
+ pb_assoc::hash_load_check_resize_trigger<
+ false,
+ size_type>,
+ false,
+ size_type>
+ type;
+ };
+
+ struct def_update_policy
+ {
+ typedef pb_assoc::move_to_front_lu_policy<> type;
+ };
+
+#ifdef __GNUC__
+#undef PB_ASSOC_HASH_NAMESPACE
+#endif // #ifdef __GNUC__
+
+ template<class Comb_Probe_Fn>
+ struct def_probe_fn
+ {
+ private:
+ typedef typename Comb_Probe_Fn::size_type size_type;
+
+ public:
+ typedef
+ typename pb_assoc::detail::cond_type<
+ pb_assoc::detail::is_same_type<
+ pb_assoc::direct_mask_range_hashing<size_t>,
+ Comb_Probe_Fn>::value,
+ pb_assoc::linear_probe_fn<
+ size_type>,
+ pb_assoc::quadratic_probe_fn<
+ size_type> >::type
+ type;
+ };
+
+ typedef pb_assoc::null_node_updator def_node_updator;
+
+ } // namespace detail
+
+} // namespace pb_assoc
+
+#endif // #ifndef STANDARD_POLICIES_HPP
+
diff --git a/libstdc++-v3/include/ext/pb_assoc/detail/standard_sizes.hpp b/libstdc++-v3/include/ext/pb_assoc/detail/standard_sizes.hpp
new file mode 100644
index 00000000000..6aa63465044
--- /dev/null
+++ b/libstdc++-v3/include/ext/pb_assoc/detail/standard_sizes.hpp
@@ -0,0 +1,65 @@
+// -*- C++ -*-
+
+// 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.
+
+// As a special exception, you may use this file as part of a free software
+// library without restriction. Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General 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 standard_sizes.hpp
+ * Contains standard sizes for containers.
+ */
+
+#ifndef STANDARD_SIZES_HPP
+#define STANDARD_SIZES_HPP
+
+namespace pb_assoc
+{
+
+ namespace detail
+ {
+
+ enum
+ {
+ def_init_size = 8,
+ def_grow_factor = 2
+ };
+
+ } // namespace detail
+
+} // namespace pb_assoc
+
+#endif // #ifndef STANDARD_SIZES_HPP
+
diff --git a/libstdc++-v3/include/ext/pb_assoc/detail/tree_assoc_cntnr/constructor_destructor_fn_imps.hpp b/libstdc++-v3/include/ext/pb_assoc/detail/tree_assoc_cntnr/constructor_destructor_fn_imps.hpp
new file mode 100644
index 00000000000..e5f794ddd8f
--- /dev/null
+++ b/libstdc++-v3/include/ext/pb_assoc/detail/tree_assoc_cntnr/constructor_destructor_fn_imps.hpp
@@ -0,0 +1,130 @@
+// -*- C++ -*-
+
+// 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.
+
+// As a special exception, you may use this file as part of a free software
+// library without restriction. Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General 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 constructor_destructor_fn_imps.hpp
+ * Contains implementation of rb trees
+ */
+
+PB_ASSOC_CLASS_T_DEC
+PB_ASSOC_CLASS_C_DEC::
+tree_assoc_cntnr()
+{
+ //Do nothing
+}
+
+PB_ASSOC_CLASS_T_DEC
+PB_ASSOC_CLASS_C_DEC::
+tree_assoc_cntnr(const Cmp_Fn& r_cmp_fn) :
+ PB_ASSOC_CLASS_C_DEC::my_base(r_cmp_fn)
+{
+ //Do nothing
+}
+
+PB_ASSOC_CLASS_T_DEC
+PB_ASSOC_CLASS_C_DEC::
+tree_assoc_cntnr(const Cmp_Fn& r_cmp_fn, const Node_Updator& r_node_updator) :
+ PB_ASSOC_CLASS_C_DEC::my_base(r_cmp_fn, r_node_updator)
+{
+ //Do nothing
+}
+
+PB_ASSOC_CLASS_T_DEC
+template<class It>
+PB_ASSOC_CLASS_C_DEC::
+tree_assoc_cntnr(It first_it, It last_it)
+{
+ my_base::copy_from_range(first_it, last_it);
+}
+
+PB_ASSOC_CLASS_T_DEC
+template<class It>
+PB_ASSOC_CLASS_C_DEC::
+tree_assoc_cntnr(It first_it, It last_it, const Cmp_Fn& r_cmp_fn) :
+ PB_ASSOC_CLASS_C_DEC::my_base(r_cmp_fn)
+{
+ my_base::copy_from_range(first_it, last_it);
+}
+
+PB_ASSOC_CLASS_T_DEC
+template<class It>
+PB_ASSOC_CLASS_C_DEC::
+tree_assoc_cntnr(It first_it, It last_it, const Cmp_Fn& r_cmp_fn, const Node_Updator& r_node_updator) :
+ PB_ASSOC_CLASS_C_DEC::my_base(r_cmp_fn, r_node_updator)
+{
+ my_base::copy_from_range(first_it, last_it);
+}
+
+PB_ASSOC_CLASS_T_DEC
+PB_ASSOC_CLASS_C_DEC::
+tree_assoc_cntnr(const PB_ASSOC_CLASS_C_DEC& r_other) :
+ my_base((const PB_ASSOC_BASE_C_DEC& )r_other)
+{
+ //Do nothing
+}
+
+PB_ASSOC_CLASS_T_DEC
+PB_ASSOC_CLASS_C_DEC::
+~tree_assoc_cntnr()
+{
+ //Do nothing
+}
+
+PB_ASSOC_CLASS_T_DEC
+PB_ASSOC_CLASS_C_DEC&
+PB_ASSOC_CLASS_C_DEC::
+operator=(const PB_ASSOC_CLASS_C_DEC& r_other)
+{
+ if (this !=& r_other)
+ {
+ PB_ASSOC_CLASS_C_DEC tmp(r_other);
+
+ swap(tmp);
+ }
+
+ return (*this);
+}
+
+PB_ASSOC_CLASS_T_DEC
+void
+PB_ASSOC_CLASS_C_DEC::
+swap(PB_ASSOC_CLASS_C_DEC& r_other)
+{
+ return (my_base::swap(r_other));
+}
diff --git a/libstdc++-v3/include/ext/pb_assoc/detail/tree_policy/null_node_updator_imp.hpp b/libstdc++-v3/include/ext/pb_assoc/detail/tree_policy/null_node_updator_imp.hpp
new file mode 100644
index 00000000000..c5662e9b0d8
--- /dev/null
+++ b/libstdc++-v3/include/ext/pb_assoc/detail/tree_policy/null_node_updator_imp.hpp
@@ -0,0 +1,49 @@
+// -*- C++ -*-
+
+// 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.
+
+// As a special exception, you may use this file as part of a free software
+// library without restriction. Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General 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 null_node_updator_imp.hpp
+ * Contains an implementation of null_node_updator.
+ */
+
+inline void
+null_node_updator::
+swap(null_node_updator& /*r_other*/)
+{ }
+
diff --git a/libstdc++-v3/include/ext/pb_assoc/detail/tree_policy/order_statistics_imp.hpp b/libstdc++-v3/include/ext/pb_assoc/detail/tree_policy/order_statistics_imp.hpp
new file mode 100644
index 00000000000..d4031583c9c
--- /dev/null
+++ b/libstdc++-v3/include/ext/pb_assoc/detail/tree_policy/order_statistics_imp.hpp
@@ -0,0 +1,436 @@
+// -*- C++ -*-
+
+// 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.
+
+// As a special exception, you may use this file as part of a free software
+// library without restriction. Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General 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 order_statistics_imp.hpp
+ * Contains forward declarations for order_statistics_key
+ */
+
+#ifndef ORDER_STATISTICS_IMP_HPP
+#define ORDER_STATISTICS_IMP_HPP
+
+#define PB_ASSOC_CLASS_T_DEC \
+ template<class Key, class Allocator>
+
+#define PB_ASSOC_CLASS_C_DEC \
+ order_statistics_key< \
+ Key, \
+ Allocator>
+
+PB_ASSOC_CLASS_T_DEC
+inline
+PB_ASSOC_CLASS_C_DEC::
+order_statistics_key(const_key_reference r_key) :
+ m_key(r_key),
+ m_rank(1)
+{ }
+
+PB_ASSOC_CLASS_T_DEC
+inline
+PB_ASSOC_CLASS_C_DEC::
+operator typename PB_ASSOC_CLASS_C_DEC::key_reference()
+{
+ return (m_key);
+}
+
+PB_ASSOC_CLASS_T_DEC
+inline
+PB_ASSOC_CLASS_C_DEC::
+operator typename PB_ASSOC_CLASS_C_DEC::key_type() const
+{
+ return (m_key);
+}
+
+#undef PB_ASSOC_CLASS_T_DEC
+
+#undef PB_ASSOC_CLASS_C_DEC
+
+#define PB_ASSOC_CLASS_T_DEC \
+ template<class Cmp_Fn, class Allocator>
+
+#define PB_ASSOC_CLASS_C_DEC \
+ order_statistics_key_cmp< \
+ Cmp_Fn, \
+ Allocator>
+
+PB_ASSOC_CLASS_T_DEC
+inline
+PB_ASSOC_CLASS_C_DEC::
+order_statistics_key_cmp()
+{ }
+
+PB_ASSOC_CLASS_T_DEC
+inline
+PB_ASSOC_CLASS_C_DEC::
+order_statistics_key_cmp(const Cmp_Fn& r_cmp_fn) :
+ Cmp_Fn(r_cmp_fn)
+{ }
+
+PB_ASSOC_CLASS_T_DEC
+inline bool
+PB_ASSOC_CLASS_C_DEC::
+operator()(const_key_reference r_lhs_key, const_key_reference r_rhs_key) const
+{
+ return Cmp_Fn::operator()((key_type)r_lhs_key, (key_type)r_rhs_key);
+}
+
+PB_ASSOC_CLASS_T_DEC
+inline typename PB_ASSOC_CLASS_C_DEC::cmp_fn&
+PB_ASSOC_CLASS_C_DEC::
+get_cmp_fn()
+{
+ return (*this);
+}
+
+PB_ASSOC_CLASS_T_DEC
+inline const typename PB_ASSOC_CLASS_C_DEC::cmp_fn&
+PB_ASSOC_CLASS_C_DEC::
+get_cmp_fn() const
+{
+ return (*this);
+}
+
+#undef PB_ASSOC_CLASS_T_DEC
+
+#undef PB_ASSOC_CLASS_C_DEC
+
+#define PB_ASSOC_CLASS_T_DEC \
+ template<class Key, class Allocator>
+
+#define PB_ASSOC_CLASS_C_DEC \
+ order_statistics_node_updator< \
+ Key, \
+ Allocator>
+
+PB_ASSOC_CLASS_T_DEC
+inline void
+PB_ASSOC_CLASS_C_DEC::
+operator()(const_key_pointer p_key, const_key_pointer p_l_child_key, const_key_pointer p_r_child_key)
+{
+ /*
+ * The left rank is 0 if there is no left child,
+ * or the rank of the left child, otherwise.
+ */
+ const size_type l_rank =(p_l_child_key == NULL)? 0 : p_l_child_key->m_rank;
+
+ /*
+ * The right rank is 0 if there is no right child,
+ * or the rank of the right child, otherwise.
+ */
+ const size_type r_rank =(p_r_child_key == NULL)? 0 : p_r_child_key->m_rank;
+
+ /*
+ * The rand of the entry is the sumb of the ranks of its
+ * children + 1 (for itself).
+ */
+ p_key->m_rank = 1 + l_rank + r_rank;
+}
+
+PB_ASSOC_CLASS_T_DEC
+inline void
+PB_ASSOC_CLASS_C_DEC::
+swap(PB_ASSOC_CLASS_C_DEC& /*r_other*/)
+{ }
+
+#undef PB_ASSOC_CLASS_T_DEC
+
+#undef PB_ASSOC_CLASS_C_DEC
+
+#define PB_ASSOC_CLASS_T_DEC \
+ template<class Cntnr>
+
+#define PB_ASSOC_CLASS_C_DEC \
+ find_by_order< \
+ Cntnr>
+
+PB_ASSOC_CLASS_T_DEC
+inline typename PB_ASSOC_CLASS_C_DEC::iterator
+PB_ASSOC_CLASS_C_DEC::
+operator()(Cntnr& r_c, size_type order) const
+{
+ return find(r_c, order);
+}
+
+PB_ASSOC_CLASS_T_DEC
+inline typename PB_ASSOC_CLASS_C_DEC::const_iterator
+PB_ASSOC_CLASS_C_DEC::
+operator()(const Cntnr& r_c, size_type order) const
+{
+ return find(r_c, order);
+}
+
+PB_ASSOC_CLASS_T_DEC
+inline typename PB_ASSOC_CLASS_C_DEC::const_iterator
+PB_ASSOC_CLASS_C_DEC::
+find(const Cntnr& r_c, size_type order)
+{
+ if (order > r_c.size())
+ return (r_c.end());
+
+ /*
+ * Start at the top of the tree.
+ */
+ typename Cntnr::const_node_iterator it = r_c.node_begin();
+
+ /*
+ * Loop up to a leaf.
+ */
+ while (it != r_c.node_end())
+ {
+ typename Cntnr::const_node_iterator l_it = it.l_child();
+
+ /*
+ * The order of the element, o, is the rank of the left
+ * child (for the entry itself).
+ */
+ const size_type o = (l_it == r_c.node_end())?
+ 0 :(*l_it)->m_rank;
+
+ /*
+ * If the current order, o, is the order requested,
+ * the key has been found.
+ */
+ if (order == o)
+ return (*it);
+ /*
+ * If the current order, o, is larger than the order requested,
+ * we should move to the left subtree.
+ */
+ else if (order < o)
+ it = l_it;
+ /*
+ * Otherwise adujst the requested order and move to the right subtree.
+ */
+ else
+ {
+ order -= o + 1;
+
+ it = it.r_child();
+ }
+ }
+
+ return (r_c.end());
+}
+
+PB_ASSOC_CLASS_T_DEC
+inline typename PB_ASSOC_CLASS_C_DEC::iterator
+PB_ASSOC_CLASS_C_DEC::
+find(Cntnr& r_c, size_type order)
+{
+ if (order > r_c.size())
+ return (r_c.end());
+
+ /*
+ * Start at the top of the tree.
+ */
+ typename Cntnr::node_iterator it = r_c.node_begin();
+
+ /*
+ * Loop up to a leaf.
+ */
+ while (it != r_c.node_end())
+ {
+ typename Cntnr::node_iterator l_it = it.l_child();
+
+ /*
+ * The order of the element, o, is the rank of the left
+ * child (for the entry itself).
+ */
+ const size_type o = (l_it == r_c.node_end())?
+ 0 :
+ r_c.extract_key(*(*l_it)).m_rank;
+
+ /*
+ * If the current order, o, is the order requested,
+ * the key has been found.
+ */
+ if (order == o)
+ return (*it);
+ /*
+ * If the current order, o, is larger than the order requested,
+ * we should move to the left subtree.
+ */
+ else if (order < o)
+ it = l_it;
+ /*
+ * Otherwise adujst the requested order and move to the right subtree.
+ */
+ else
+ {
+ order -= o + 1;
+
+ it = it.r_child();
+ }
+ }
+
+ return (r_c.end());
+}
+
+#undef PB_ASSOC_CLASS_T_DEC
+
+#undef PB_ASSOC_CLASS_C_DEC
+
+#define PB_ASSOC_CLASS_T_DEC \
+ template<class Cntnr>
+
+#define PB_ASSOC_CLASS_C_DEC \
+ order_by_key< \
+ Cntnr>
+
+PB_ASSOC_CLASS_T_DEC
+inline typename PB_ASSOC_CLASS_C_DEC::size_type
+PB_ASSOC_CLASS_C_DEC::
+operator()(const Cntnr& r_c, const underlying_key_type& r_key) const
+{
+ /*
+ * The logic here is similar to that in order_by_key.
+ */
+
+ typename Cntnr::const_node_iterator it = r_c.node_begin();
+
+ size_type ord = 0;
+
+ while (it != r_c.node_end())
+ {
+ typename Cntnr::const_node_iterator l_it = it.l_child();
+
+ if (r_c.get_cmp_fn().get_cmp_fn()(
+ r_key,
+ r_c.extract_key(*(*it)).m_key))
+ it = l_it;
+ else if (r_c.get_cmp_fn().get_cmp_fn()(
+ r_c.extract_key(*(*it)).m_key,
+ r_key))
+ {
+
+ ord += (l_it == r_c.node_end())?
+ 1 :
+ 1 + r_c.extract_key(*(*l_it)).m_rank;
+
+ it = it.r_child();
+ }
+ else
+ {
+ ord += (l_it == r_c.node_end())?
+ 0 :
+ r_c.extract_key(*(*l_it)).m_rank;
+
+ it = r_c.node_end();
+ }
+ }
+
+ return (ord);
+}
+
+#undef PB_ASSOC_CLASS_T_DEC
+
+#undef PB_ASSOC_CLASS_C_DEC
+
+#define PB_ASSOC_CLASS_T_DEC \
+ template<class Cntnr, class Allocator>
+
+#define PB_ASSOC_CLASS_C_DEC \
+ order_statistics_key_verifier< \
+ Cntnr, \
+ Allocator>
+
+template<class Cntnr, class Allocator = std::allocator<char> >
+class order_statistics_key_verifier
+{
+public:
+ typedef Cntnr map;
+
+ typedef Allocator allocator;
+
+ typedef typename allocator::size_type size_type;
+
+ typedef
+ typename allocator::template rebind<map>::other::const_reference
+ const_map_reference;
+
+public:
+ bool
+ operator()(const Cntnr& r_c) const;
+
+private:
+ typedef typename Cntnr::const_node_iterator const_node_iterator;
+
+ typedef typename Cntnr::const_iterator cntnr_const_it;
+
+ typedef std::pair<bool, size_type> stat;
+
+private:
+ static stat
+ verify_imp(const_node_iterator it, const_node_iterator end_it)
+ {
+ if (it == end_it)
+ return (std::make_pair(true, 0));
+
+ const stat l_ret =
+ verify_imp(it.l_child(), end_it);
+
+ const stat r_ret =
+ verify_imp(it.r_child(), end_it);
+
+ if (!l_ret.first || !r_ret.first)
+ return (std::make_pair(false, 0));
+
+ if ((*it)->m_rank != 1 + l_ret.second + r_ret.second)
+ return (std::make_pair(false, 0));
+
+ return (std::make_pair(true, (*it)->m_rank));
+ }
+};
+
+PB_ASSOC_CLASS_T_DEC
+bool
+PB_ASSOC_CLASS_C_DEC::
+operator()(const Cntnr& r_c) const
+{
+ const stat top_stat =
+ verify_imp(r_c.node_begin(), r_c.node_end());
+
+ return (top_stat.first);
+}
+
+#undef PB_ASSOC_CLASS_T_DEC
+
+#undef PB_ASSOC_CLASS_C_DEC
+
+#endif // #ifndef ORDER_STATISTICS_IMP_HPP
diff --git a/libstdc++-v3/include/ext/pb_assoc/detail/type_utils.hpp b/libstdc++-v3/include/ext/pb_assoc/detail/type_utils.hpp
new file mode 100644
index 00000000000..d288a371032
--- /dev/null
+++ b/libstdc++-v3/include/ext/pb_assoc/detail/type_utils.hpp
@@ -0,0 +1,449 @@
+// -*- C++ -*-
+
+// 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.
+
+// As a special exception, you may use this file as part of a free software
+// library without restriction. Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General 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 type_utils.hpp
+ * Contains utilities for handnling types. All of these classes are based on
+ * "Modern C++" by Andrei Alxandrescu.
+ */
+
+#ifndef TYPE_UTILS_HPP
+#define TYPE_UTILS_HPP
+
+#include <cstddef>
+#include <utility>
+
+namespace pb_assoc
+{
+
+ namespace detail
+ {
+
+ template<bool>
+ struct static_assert;
+
+ template<>
+ struct static_assert<true>
+ { };
+
+ template<int>
+ struct static_assert_dummy_class
+ {
+ enum
+ {
+ v = 1
+ };
+ };
+
+ template<class T, class U>
+ class is_same_type
+ {
+ public:
+ enum
+ {
+ value = false
+ };
+ };
+
+ template<class T>
+ class is_same_type<
+ T,
+ T>
+ {
+ public:
+ enum
+ {
+ value = true
+ };
+ };
+
+ template<int n>
+ struct int_to_type
+ {
+ enum
+ {
+ value = n
+ };
+ };
+
+ template<typename Type>
+ struct type_to_type
+ {
+ typedef Type type;
+ };
+
+ template<typename T>
+ class unconst
+ {
+ private:
+ template<class U>
+ struct unconst_imp
+ {
+ typedef U type;
+ };
+
+ template<class U>
+ struct unconst_imp<
+ const U>
+ {
+ typedef U type;
+ };
+ public:
+ typedef typename unconst_imp<T>::type type;
+ };
+
+ template<typename T>
+ class unreference
+ {
+ private:
+ template<class U>
+ struct unreference_imp
+ {
+ typedef U type;
+ };
+
+ template<class U>
+ struct unreference_imp<U&>
+ {
+ typedef U type;
+ };
+ public:
+ typedef typename unreference_imp<T>::type type;
+ };
+
+ /* is_const_type
+ * Idea by Andrei Alecsandrescu
+ * (Modern C++ Design: Generic Programming and Design Patterns Applied)
+ **/
+ template<typename T>
+ class is_const_type
+ {
+ private:
+ template<class U>
+ struct is_const_type_imp
+ {
+ enum
+ {
+ value = 0
+ };
+ };
+
+ template<class U>
+ struct is_const_type_imp<const U>
+ {
+ enum
+ {
+ value = 1
+ };
+ };
+
+ public:
+ enum
+ {
+ value = is_const_type_imp<T>::value
+ };
+ };
+
+ /* is_pointer_type
+ **/
+ template<typename T>
+ class is_pointer_type
+ {
+ private:
+ template<class U>
+ struct is_pointer_type_imp
+ {
+ enum
+ {
+ value = 0
+ };
+ };
+
+ template<class U>
+ struct is_pointer_type_imp
+ <U* >
+ {
+ enum
+ {
+ value = 1
+ };
+ };
+
+ public:
+ enum
+ {
+ value = is_pointer_type_imp<T>::value
+ };
+ };
+
+ /* is_pointer_type
+ **/
+ template<typename T>
+ class is_const_pointer_type
+ {
+ private:
+ template<class U>
+ struct is_const_pointer_type_imp
+ {
+ enum
+ {
+ value = 0
+ };
+ };
+
+ template<class U>
+ struct is_const_pointer_type_imp
+ <const U* >
+ {
+ enum
+ {
+ value = 1
+ };
+ };
+
+ public:
+ enum
+ {
+ value = is_const_pointer_type_imp<T>::value
+ };
+ };
+
+ template<typename T>
+ class is_reference_type
+ {
+ private:
+ template<class U>
+ struct is_reference_type_imp
+ {
+ enum
+ {
+ value = 0
+ };
+ };
+
+ template<class U>
+ struct is_reference_type_imp<U& >
+ {
+ enum
+ {
+ value = 1
+ };
+ };
+
+ public:
+ enum
+ {
+ value = is_reference_type_imp<T>::value
+ };
+ };
+
+ template<typename T>
+ class is_const_reference_type
+ {
+ private:
+ template<class U>
+ struct is_const_reference_type_imp
+ {
+ enum
+ {
+ value = 0
+ };
+ };
+
+ template<class U>
+ struct is_const_reference_type_imp<U& >
+ {
+ enum
+ {
+ value = 1
+ };
+ };
+
+ public:
+ enum
+ {
+ value = is_const_reference_type_imp<T>::value
+ };
+ };
+
+ template<typename T>
+ class is_member_pointer_type
+ {
+ private:
+ template<typename U>
+ struct is_member_pointer_type_imp
+ {
+ enum
+ {
+ value = 0
+ };
+ };
+
+ template<typename U, typename V>
+ struct is_member_pointer_type_imp<
+ U V::*>
+ {
+ enum
+ {
+ value = 1
+ };
+ };
+
+ public:
+ enum
+ {
+ value = is_member_pointer_type_imp<T>::value
+ };
+ };
+
+#define PB_ASSOC_IS_SAME_TYPE(TYPE) is_same_type<T, TYPE>::value
+
+ template<class T>
+ class is_simple_type
+ {
+ template<class U>
+ struct is_simple_type_imp
+ {
+ enum
+ {
+ value = 0
+ };
+ };
+
+ template<class U, size_t M>
+ struct is_simple_type_imp<
+ U[M]>
+ {
+ enum
+ {
+ value = is_simple_type<U>::value
+ };
+ };
+
+ template<class U>
+ struct is_simple_type_imp<
+ U[]>
+ {
+ enum
+ {
+ value = is_simple_type<U>::value
+ };
+ };
+
+ template<typename T0, typename T1>
+ struct is_simple_type_imp<
+ std::pair<
+ T0,
+ T1> >
+ {
+ enum
+ {
+ value = is_simple_type<T0>::value&&
+ is_simple_type<T1>::value
+ };
+ };
+
+ public:
+ enum
+ {
+ value =
+ PB_ASSOC_IS_SAME_TYPE(void) ||
+ PB_ASSOC_IS_SAME_TYPE(size_t) ||
+ PB_ASSOC_IS_SAME_TYPE(const void) ||
+ PB_ASSOC_IS_SAME_TYPE(unsigned char) ||
+ PB_ASSOC_IS_SAME_TYPE(unsigned short int) ||
+ PB_ASSOC_IS_SAME_TYPE(unsigned int) ||
+ PB_ASSOC_IS_SAME_TYPE(unsigned long int) ||
+ PB_ASSOC_IS_SAME_TYPE(signed char) ||
+ PB_ASSOC_IS_SAME_TYPE(signed short int) ||
+ PB_ASSOC_IS_SAME_TYPE(int) ||
+ PB_ASSOC_IS_SAME_TYPE(long int) ||
+ PB_ASSOC_IS_SAME_TYPE(bool) ||
+ PB_ASSOC_IS_SAME_TYPE(char) ||
+ PB_ASSOC_IS_SAME_TYPE(float) ||
+ PB_ASSOC_IS_SAME_TYPE(double) ||
+ PB_ASSOC_IS_SAME_TYPE(long double) ||
+ PB_ASSOC_IS_SAME_TYPE(const unsigned char) ||
+ PB_ASSOC_IS_SAME_TYPE(const unsigned short int) ||
+ PB_ASSOC_IS_SAME_TYPE(const unsigned int) ||
+ PB_ASSOC_IS_SAME_TYPE(const unsigned long int) ||
+ PB_ASSOC_IS_SAME_TYPE(const signed char) ||
+ PB_ASSOC_IS_SAME_TYPE(const signed short int) ||
+ PB_ASSOC_IS_SAME_TYPE(const int) ||
+ PB_ASSOC_IS_SAME_TYPE(const long int) ||
+ PB_ASSOC_IS_SAME_TYPE(const bool) ||
+ PB_ASSOC_IS_SAME_TYPE(const char) ||
+ PB_ASSOC_IS_SAME_TYPE(const float) ||
+ PB_ASSOC_IS_SAME_TYPE(const double) ||
+ PB_ASSOC_IS_SAME_TYPE(const long double) ||
+ is_pointer_type<T>::value ||
+ is_const_pointer_type<T>::value ||
+ is_member_pointer_type<T>::value ||
+ is_simple_type_imp<T>::value
+ };
+ };
+
+#undef PB_ASSOC_IS_SAME_TYPE
+
+ template<bool Cond, class A, class B>
+ struct cond_type;
+
+ template<class A, class B>
+ struct cond_type<
+ true,
+ A,
+ B>
+ {
+ typedef A type;
+ };
+
+ template<class A, class B>
+ struct cond_type<
+ false,
+ A,
+ B>
+ {
+ typedef B type;
+ };
+
+ } // namespace detail
+
+} // namespace pb_assoc
+
+#endif // #ifndef TYPE_UTILS_HPP
diff --git a/libstdc++-v3/include/ext/pb_assoc/detail/typelist.hpp b/libstdc++-v3/include/ext/pb_assoc/detail/typelist.hpp
new file mode 100644
index 00000000000..213e960f3da
--- /dev/null
+++ b/libstdc++-v3/include/ext/pb_assoc/detail/typelist.hpp
@@ -0,0 +1,220 @@
+// -*- C++ -*-
+
+// 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.
+
+// As a special exception, you may use this file as part of a free software
+// library without restriction. Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General 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 typelist.hpp
+ * Contains typelist_chain definitions.
+ * Typelists are an idea by Andrei Alexandrescu.
+ */
+
+#ifndef TYPELIST_HPP
+#define TYPELIST_HPP
+
+#ifdef _MSC_VER
+#pragma warning(disable: 4503)
+#endif // #ifdef _MSC_VER
+
+#include <ext/pb_assoc/detail/type_utils.hpp>
+
+namespace pb_assoc
+{
+
+ namespace detail
+ {
+
+ struct null_type
+ { };
+
+ template<typename Hd, typename Tl>
+ struct typelist_chain
+ {
+ typedef Hd head;
+
+ typedef Tl tail;
+ };
+
+ template<class Root>
+ struct typelist
+ {
+ typedef Root root;
+ };
+
+#define PB_ASSOC_TYPELIST_CHAIN1(X0) pb_assoc::detail::typelist_chain<X0, pb_assoc::detail::null_type>
+#define PB_ASSOC_TYPELIST_CHAIN2(X0, X1) pb_assoc::detail::typelist_chain<X0, PB_ASSOC_TYPELIST_CHAIN1(X1) >
+#define PB_ASSOC_TYPELIST_CHAIN3(X0, X1, X2) pb_assoc::detail::typelist_chain<X0, PB_ASSOC_TYPELIST_CHAIN2(X1, X2) >
+#define PB_ASSOC_TYPELIST_CHAIN4(X0, X1, X2, X3) pb_assoc::detail::typelist_chain<X0, PB_ASSOC_TYPELIST_CHAIN3(X1, X2, X3) >
+#define PB_ASSOC_TYPELIST_CHAIN5(X0, X1, X2, X3, X4) pb_assoc::detail::typelist_chain<X0, PB_ASSOC_TYPELIST_CHAIN4(X1, X2, X3, X4) >
+#define PB_ASSOC_TYPELIST_CHAIN6(X0, X1, X2, X3, X4, X5) pb_assoc::detail::typelist_chain<X0, PB_ASSOC_TYPELIST_CHAIN5(X1, X2, X3, X4, X5) >
+#define PB_ASSOC_TYPELIST_CHAIN7(X0, X1, X2, X3, X4, X5, X6) pb_assoc::detail::typelist_chain<X0, PB_ASSOC_TYPELIST_CHAIN6(X1, X2, X3, X4, X5, X6) >
+#define PB_ASSOC_TYPELIST_CHAIN8(X0, X1, X2, X3, X4, X5, X6, X7) pb_assoc::detail::typelist_chain<X0, PB_ASSOC_TYPELIST_CHAIN7(X1, X2, X3, X4, X5, X6, X7) >
+#define PB_ASSOC_TYPELIST_CHAIN9(X0, X1, X2, X3, X4, X5, X6, X7, X8) pb_assoc::detail::typelist_chain<X0, PB_ASSOC_TYPELIST_CHAIN8(X1, X2, X3, X4, X5, X6, X7, X8) >
+#define PB_ASSOC_TYPELIST_CHAIN10(X0, X1, X2, X3, X4, X5, X6, X7, X8, X9) pb_assoc::detail::typelist_chain<X0, PB_ASSOC_TYPELIST_CHAIN9(X1, X2, X3, X4, X5, X6, X7, X8, X9) >
+#define PB_ASSOC_TYPELIST_CHAIN11(X0, X1, X2, X3, X4, X5, X6, X7, X8, X9, X10) pb_assoc::detail::typelist_chain<X0, PB_ASSOC_TYPELIST_CHAIN10(X1, X2, X3, X4, X5, X6, X7, X8, X9, X10) >
+#define PB_ASSOC_TYPELIST_CHAIN12(X0, X1, X2, X3, X4, X5, X6, X7, X8, X9, X10, X11) pb_assoc::detail::typelist_chain<X0, PB_ASSOC_TYPELIST_CHAIN11(X1, X2, X3, X4, X5, X6, X7, X8, X9, X10, X11) >
+#define PB_ASSOC_TYPELIST_CHAIN13(X0, X1, X2, X3, X4, X5, X6, X7, X8, X9, X10, X11, X12) pb_assoc::detail::typelist_chain<X0, PB_ASSOC_TYPELIST_CHAIN12(X1, X2, X3, X4, X5, X6, X7, X8, X9, X10, X11, X12) >
+#define PB_ASSOC_TYPELIST_CHAIN14(X0, X1, X2, X3, X4, X5, X6, X7, X8, X9, X10, X11, X12, X13) pb_assoc::detail::typelist_chain<X0, PB_ASSOC_TYPELIST_CHAIN13(X1, X2, X3, X4, X5, X6, X7, X8, X9, X10, X11, X12, X13) >
+#define PB_ASSOC_TYPELIST_CHAIN15(X0, X1, X2, X3, X4, X5, X6, X7, X8, X9, X10, X11, X12, X13, X14) pb_assoc::detail::typelist_chain<X0, PB_ASSOC_TYPELIST_CHAIN14(X1, X2, X3, X4, X5, X6, X7, X8, X9, X10, X11, X12, X13, X14) >
+
+#include <ext/pb_assoc/detail/typelist/typelist_apply.hpp>
+
+ template<class Fn, class Typelist>
+ void
+ typelist_apply(Fn& r_fn, Typelist /*tl*/)
+ {
+ detail::apply_<
+ Fn,
+ typename Typelist::root>
+ a;
+
+ a(r_fn);
+ }
+
+#include <ext/pb_assoc/detail/typelist/typelist_append.hpp>
+
+ template<class Typelist0, class Typelist1>
+ struct typelist_append
+ {
+ private:
+ typedef
+ typename detail::typelist_append_<
+ typename Typelist0::root,
+ typename Typelist1::root>::type
+ res_hd;
+
+ public:
+ typedef typelist< res_hd> type;
+ };
+
+#include <ext/pb_assoc/detail/typelist/typelist_typelist_append.hpp>
+
+ template<class Typelist_Typelist>
+ struct typelist_typelist_append
+ {
+ private:
+ typedef
+ typename detail::typelist_typelist_append_<
+ typename Typelist_Typelist::root>::type
+ res_hd;
+
+ public:
+ typedef typelist< res_hd> type;
+ };
+
+#include <ext/pb_assoc/detail/typelist/typelist_contains.hpp>
+
+ template<class Typelist, class T>
+ struct typelist_contains
+ {
+ enum
+ {
+ value =
+ detail::typelist_contains_<
+ typename Typelist::root,
+ T>::value
+ };
+ };
+
+#include <ext/pb_assoc/detail/typelist/typelist_filter.hpp>
+
+ template<class Typelist, template<typename T>
+ class Pred>
+ struct typelist_filter
+ {
+ private:
+ typedef
+ typename detail::typelist_chain_filter_<
+ typename Typelist::root,
+ Pred>::type
+ root_type;
+
+ public:
+ typedef typelist< root_type> type;
+ };
+
+#include <ext/pb_assoc/detail/typelist/typelist_at_index.hpp>
+
+ template<class Typelist, int i>
+ struct typelist_at_index
+ {
+ typedef
+ typename detail::typelist_chain_at_index_<
+ typename Typelist::root,
+ i>::type
+ type;
+ };
+
+#include <ext/pb_assoc/detail/typelist/typelist_transform.hpp>
+
+ template<class Typelist, template<class T>
+ class Transform>
+ struct typelist_transform
+ {
+ private:
+ typedef
+ typename detail::typelist_chain_transform_<
+ typename Typelist::root,
+ Transform>::type
+ root_type;
+
+ public:
+ typedef typelist< root_type> type;
+ };
+
+#undef PB_ASSOC_TYPELIST_CHAIN1
+#undef PB_ASSOC_TYPELIST_CHAIN2
+#undef PB_ASSOC_TYPELIST_CHAIN3
+#undef PB_ASSOC_TYPELIST_CHAIN4
+#undef PB_ASSOC_TYPELIST_CHAIN5
+#undef PB_ASSOC_TYPELIST_CHAIN6
+#undef PB_ASSOC_TYPELIST_CHAIN7
+#undef PB_ASSOC_TYPELIST_CHAIN8
+#undef PB_ASSOC_TYPELIST_CHAIN9
+#undef PB_ASSOC_TYPELIST_CHAIN10
+#undef PB_ASSOC_TYPELIST_CHAIN11
+#undef PB_ASSOC_TYPELIST_CHAIN12
+#undef PB_ASSOC_TYPELIST_CHAIN13
+#undef PB_ASSOC_TYPELIST_CHAIN14
+#undef PB_ASSOC_TYPELIST_CHAIN15
+
+ } // namespace detail
+
+} // namespace pb_assoc
+
+#endif // #ifndef TYPELIST_HPP
+
diff --git a/libstdc++-v3/include/ext/pb_assoc/detail/typelist/typelist_append.hpp b/libstdc++-v3/include/ext/pb_assoc/detail/typelist/typelist_append.hpp
new file mode 100644
index 00000000000..9adc8230753
--- /dev/null
+++ b/libstdc++-v3/include/ext/pb_assoc/detail/typelist/typelist_append.hpp
@@ -0,0 +1,84 @@
+// -*- C++ -*-
+
+// 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.
+
+// As a special exception, you may use this file as part of a free software
+// library without restriction. Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General 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 typelist_append.hpp
+ * Contains typelist_chain utilities.
+ * Typelists are an idea by Andrei Alexandrescu.
+ */
+
+#ifndef TYPELIST_APPEND_HPP
+#define TYPELIST_APPEND_HPP
+
+#ifdef _MSC_VER
+#pragma warning(disable: 4503)
+#endif // #ifdef _MSC_VER
+
+#include <ext/pb_assoc/detail/type_utils.hpp>
+
+namespace detail
+{
+
+ template<class Typelist_Chain0, class Typelist_Chain1>
+ struct typelist_append_;
+
+ template<typename Hd, typename Tl, class Typelist_Chain1>
+ struct typelist_append_<
+ typelist_chain<Hd, Tl>,
+ Typelist_Chain1>
+ {
+ typedef
+ typelist_chain<
+ Hd,
+ typename typelist_append_<Tl, Typelist_Chain1>::type>
+ type;
+ };
+
+ template<class Typelist_Chain1>
+ struct typelist_append_<
+ null_type,
+ Typelist_Chain1>
+ {
+ typedef Typelist_Chain1 type;
+ };
+
+} // namespace detail
+
+#endif // #ifndef TYPELIST_APPEND_HPP
+
diff --git a/libstdc++-v3/include/ext/pb_assoc/detail/typelist/typelist_apply.hpp b/libstdc++-v3/include/ext/pb_assoc/detail/typelist/typelist_apply.hpp
new file mode 100644
index 00000000000..6d6bbf94782
--- /dev/null
+++ b/libstdc++-v3/include/ext/pb_assoc/detail/typelist/typelist_apply.hpp
@@ -0,0 +1,90 @@
+// -*- C++ -*-
+
+// 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.
+
+// As a special exception, you may use this file as part of a free software
+// library without restriction. Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General 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 typelist_apply.hpp
+ * Contains typelist utilities.
+ * Typelists are an idea by Andrei Alexandrescu.
+ */
+
+#ifndef TYPELIST_APPLY_HPP
+#define TYPELIST_APPLY_HPP
+
+#ifdef _MSC_VER
+#pragma warning(disable: 4503)
+#endif // #ifdef _MSC_VER
+
+#include <ext/pb_assoc/detail/type_utils.hpp>
+
+namespace detail
+{
+
+ template<class Fn, class Typelist_Chain>
+ struct apply_;
+
+ template<class Fn, class Hd, class Tl>
+ struct apply_<
+ Fn,
+ typelist_chain<Hd, Tl> >
+ {
+ void
+ operator()(Fn& r_fn)
+ {
+ r_fn(Hd());
+
+ apply_<Fn, Tl> next;
+
+ next(r_fn);
+ }
+ };
+
+ template<class Fn>
+ struct apply_<
+ Fn,
+ null_type>
+ {
+ void
+ operator()(Fn& /*r_fn*/)
+ { }
+ };
+
+} // namespace detail
+
+#endif // #ifndef TYPELIST_APPLY_HPP
+
diff --git a/libstdc++-v3/include/ext/pb_assoc/detail/typelist/typelist_at_index.hpp b/libstdc++-v3/include/ext/pb_assoc/detail/typelist/typelist_at_index.hpp
new file mode 100644
index 00000000000..bb7f41e0526
--- /dev/null
+++ b/libstdc++-v3/include/ext/pb_assoc/detail/typelist/typelist_at_index.hpp
@@ -0,0 +1,80 @@
+// -*- C++ -*-
+
+// 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.
+
+// As a special exception, you may use this file as part of a free software
+// library without restriction. Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General 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 typelist_at_index.hpp
+ * Contains typelist utilities.
+ * Typelists are an idea by Andrei Alexandrescu.
+ */
+
+#ifndef TYPELIST_AT_INDEX_HPP
+#define TYPELIST_AT_INDEX_HPP
+
+#ifdef _MSC_VER
+#pragma warning(disable: 4503)
+#endif // #ifdef _MSC_VER
+
+#include <ext/pb_assoc/detail/type_utils.hpp>
+
+namespace detail
+{
+
+ template<class Typelist_Chain, int i>
+ struct typelist_chain_at_index_;
+
+ template<class Hd, class Tl>
+ struct typelist_chain_at_index_<
+ typelist_chain<Hd, Tl>,
+ 0>
+ {
+ typedef Hd type;
+ };
+
+ template<class Hd, class Tl, int i>
+ struct typelist_chain_at_index_<
+ typelist_chain<Hd, Tl>,
+ i>
+ {
+ typedef typename typelist_chain_at_index_< Tl, i - 1>::type type;
+ };
+
+} // namespace detail
+
+#endif // #ifndef TYPELIST_AT_INDEX_HPP
+
diff --git a/libstdc++-v3/include/ext/pb_assoc/detail/typelist/typelist_contains.hpp b/libstdc++-v3/include/ext/pb_assoc/detail/typelist/typelist_contains.hpp
new file mode 100644
index 00000000000..a67448ec640
--- /dev/null
+++ b/libstdc++-v3/include/ext/pb_assoc/detail/typelist/typelist_contains.hpp
@@ -0,0 +1,99 @@
+// -*- C++ -*-
+
+// 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.
+
+// As a special exception, you may use this file as part of a free software
+// library without restriction. Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General 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 typelist_contains.hpp
+ * Contains typelist utilities.
+ * Typelists are an idea by Andrei Alexandrescu.
+ */
+
+#ifndef TYPELIST_CONTAINS_HPP
+#define TYPELIST_CONTAINS_HPP
+
+#ifdef _MSC_VER
+#pragma warning(disable: 4503)
+#endif // #ifdef _MSC_VER
+
+#include <ext/pb_assoc/detail/type_utils.hpp>
+
+namespace detail
+{
+
+ template<class Typelist_Chain, class T>
+ struct typelist_contains_;
+
+ template<class T>
+ struct typelist_contains_<
+ null_type,
+ T>
+ {
+ enum
+ {
+ value = false
+ };
+ };
+
+ template<class Hd, class Tl, class T>
+ struct typelist_contains_<
+ typelist_chain<Hd, Tl>,
+ T>
+ {
+ enum
+ {
+ value =
+ typelist_contains_<
+ Tl, T>::value
+ };
+ };
+
+ template<class Tl, class T>
+ struct typelist_contains_<
+ typelist_chain<T, Tl>,
+ T>
+ {
+ enum
+ {
+ value = true
+ };
+ };
+
+} // namespace detail
+
+#endif // #ifndef TYPELIST_CONTAINS_HPP
+
diff --git a/libstdc++-v3/include/ext/pb_assoc/detail/typelist/typelist_filter.hpp b/libstdc++-v3/include/ext/pb_assoc/detail/typelist/typelist_filter.hpp
new file mode 100644
index 00000000000..ea8f45d2ee4
--- /dev/null
+++ b/libstdc++-v3/include/ext/pb_assoc/detail/typelist/typelist_filter.hpp
@@ -0,0 +1,97 @@
+// -*- C++ -*-
+
+// 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.
+
+// As a special exception, you may use this file as part of a free software
+// library without restriction. Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General 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 typelist_filter.hpp
+ * Contains typelist utilities.
+ * Typelists are an idea by Andrei Alexandrescu.
+ */
+
+#ifndef TYPELIST_FILTER_HPP
+#define TYPELIST_FILTER_HPP
+
+#ifdef _MSC_VER
+#pragma warning(disable: 4503)
+#endif // #ifdef _MSC_VER
+
+#include <ext/pb_assoc/detail/type_utils.hpp>
+
+namespace detail
+{
+
+ template<class Typelist_Chain, template<typename T>
+ class Pred>
+ struct typelist_chain_filter_;
+
+ template<template<typename T>
+ class Pred>
+ struct typelist_chain_filter_<
+ null_type,
+ Pred>
+ {
+ typedef null_type type;
+ };
+
+ template<class Hd, class Tl, template<typename T>
+ class Pred>
+ struct typelist_chain_filter_<
+ typelist_chain<Hd, Tl>,
+ Pred>
+ {
+ typedef typename typelist_chain_filter_< Tl, Pred>::type rest;
+
+ enum
+ {
+ include_hd = Pred<Hd>::value
+ };
+
+ typedef
+ typename cond_type<
+ include_hd,
+ typelist_chain<
+ Hd,
+ rest>,
+ rest>::type
+ type;
+ };
+
+} // namespace detail
+
+#endif // #ifndef TYPELIST_FILTER_HPP
+
diff --git a/libstdc++-v3/include/ext/pb_assoc/detail/typelist/typelist_transform.hpp b/libstdc++-v3/include/ext/pb_assoc/detail/typelist/typelist_transform.hpp
new file mode 100644
index 00000000000..409e69723c7
--- /dev/null
+++ b/libstdc++-v3/include/ext/pb_assoc/detail/typelist/typelist_transform.hpp
@@ -0,0 +1,87 @@
+// -*- C++ -*-
+
+// 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.
+
+// As a special exception, you may use this file as part of a free software
+// library without restriction. Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General 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 typelist_transform.hpp
+ * Contains typelist utilities.
+ * Typelists are an idea by Andrei Alexandrescu.
+ */
+
+#ifndef TYPELIST_TRANSFORM_HPP
+#define TYPELIST_TRANSFORM_HPP
+
+#ifdef _MSC_VER
+#pragma warning(disable: 4503)
+#endif // #ifdef _MSC_VER
+
+#include <ext/pb_assoc/detail/type_utils.hpp>
+
+namespace detail
+{
+
+ template<class Typelist_Chain, template<typename T>
+ class Transform>
+ struct typelist_chain_transform_;
+
+ template<template<typename T>
+ class Transform>
+ struct typelist_chain_transform_<
+ null_type,
+ Transform>
+ {
+ typedef null_type type;
+ };
+
+ template<class Hd, class Tl, template<typename T>
+ class Transform>
+ struct typelist_chain_transform_<
+ typelist_chain<Hd, Tl>,
+ Transform>
+ {
+ typedef typename typelist_chain_transform_< Tl, Transform>::type rest;
+
+ typedef typename Transform<Hd>::type my_type;
+
+ typedef typelist_chain< my_type, rest> type;
+ };
+
+} // namespace detail
+
+#endif // #ifndef TYPELIST_TRANSFORM_HPP
+
diff --git a/libstdc++-v3/include/ext/pb_assoc/detail/typelist/typelist_typelist_append.hpp b/libstdc++-v3/include/ext/pb_assoc/detail/typelist/typelist_typelist_append.hpp
new file mode 100644
index 00000000000..bcc1ca249ef
--- /dev/null
+++ b/libstdc++-v3/include/ext/pb_assoc/detail/typelist/typelist_typelist_append.hpp
@@ -0,0 +1,89 @@
+// -*- C++ -*-
+
+// 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.
+
+// As a special exception, you may use this file as part of a free software
+// library without restriction. Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General 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 typelist_typelist_append.hpp
+ * Contains typelist_chain utilities.
+ * Typelists are an idea by Andrei Alexandrescu.
+ */
+
+#ifndef TYPELIST_TYPELIST_APPEND_HPP
+#define TYPELIST_TYPELIST_APPEND_HPP
+
+#ifdef _MSC_VER
+#pragma warning(disable: 4503)
+#endif // #ifdef _MSC_VER
+
+#include <ext/pb_assoc/detail/type_utils.hpp>
+
+namespace detail
+{
+
+ template<class Typelist_Typelist_Chain>
+ struct typelist_typelist_append_;
+
+ template<typename Hd>
+ struct typelist_typelist_append_<
+ typelist_chain<Hd, null_type> >
+ {
+ typedef typelist_chain< Hd, null_type> type;
+ };
+
+ template<class Hd, class Tl>
+ struct typelist_typelist_append_<
+ typelist_chain<
+ Hd,
+ Tl> >
+ {
+ private:
+ typedef typename typelist_typelist_append_< Tl>::type rest;
+
+ public:
+ typedef
+ typename typelist_append<
+ Hd,
+ typelist<
+ rest> >::type::root
+ type;
+ };
+
+} // namespace detail
+
+#endif // #ifndef TYPELIST_TYPELIST_APPEND_HPP
+
diff --git a/libstdc++-v3/include/ext/pb_assoc/detail/types_traits.hpp b/libstdc++-v3/include/ext/pb_assoc/detail/types_traits.hpp
new file mode 100644
index 00000000000..a76a5379457
--- /dev/null
+++ b/libstdc++-v3/include/ext/pb_assoc/detail/types_traits.hpp
@@ -0,0 +1,295 @@
+// -*- C++ -*-
+
+// 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.
+
+// As a special exception, you may use this file as part of a free software
+// library without restriction. Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General 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 types_traits.hpp
+ * Contains a traits class of types used by containers.
+ */
+
+#ifndef TYPES_TRAITS_HPP
+#define TYPES_TRAITS_HPP
+
+#include <ext/pb_assoc/data_type.hpp>
+#include <ext/pb_assoc/detail/type_utils.hpp>
+#include <utility>
+
+namespace pb_assoc
+{
+
+ namespace detail
+ {
+
+ template<typename Data, class Allocator>
+ struct basic_data_types_traits
+ {
+
+ public:
+
+ typedef
+ typename Allocator::template rebind<
+ Data>::other::value_type
+ data_type;
+
+ typedef
+ typename Allocator::template rebind<
+ Data>::other::pointer
+ data_pointer;
+
+ typedef
+ typename Allocator::template rebind<
+ Data>::other::const_pointer
+ const_data_pointer;
+
+ typedef
+ typename Allocator::template rebind<
+ Data>::other::reference
+ data_reference;
+
+ typedef
+ typename Allocator::template rebind<
+ Data>::other::const_reference
+ const_data_reference;
+
+ };
+
+ template<typename Data, class Allocator>
+ struct data_types_traits : public basic_data_types_traits<
+ Data,
+ Allocator>
+ {
+
+ public:
+
+ typedef Data given_data_type;
+
+ };
+
+#define PB_ASSOC_CLASS_T_DEC \
+ template<class Allocator>
+
+#define PB_ASSOC_CLASS_C_DEC \
+ data_types_traits< \
+ null_data_type, \
+ Allocator>
+
+ template<class Allocator>
+ struct data_types_traits<
+ null_data_type,
+ Allocator> : public basic_data_types_traits<
+ null_data_type,
+ Allocator>
+ {
+
+ public:
+
+ typedef null_data_type given_data_type;
+
+ };
+
+#undef PB_ASSOC_CLASS_T_DEC
+
+#undef PB_ASSOC_CLASS_C_DEC
+
+ template<class Cntnr, class Allocator>
+ struct data_types_traits<
+ compound_data_type<
+ Cntnr>,
+ Allocator> : public basic_data_types_traits<
+ Cntnr,
+ Allocator>
+ {
+
+ public:
+
+ typedef compound_data_type< Cntnr> given_data_type;
+
+ };
+
+#define PB_ASSOC_CLASS_T_DEC \
+ template<typename Key, typename Data>
+
+#define PB_ASSOC_CLASS_C_DEC \
+ exception_throw_types_traits< \
+ Key, \
+ Data>
+
+ template<typename Key, typename Data>
+ struct exception_throw_types_traits
+ {
+
+ public:
+
+ typedef int_to_type<false> no_throw_copies_false_indicator;
+
+ typedef int_to_type<true> no_throw_copies_true_indicator;
+
+ private:
+ enum
+ {
+ key_no_throw = is_simple_type<Key>::value,
+ data_no_throw = is_same_type<Data, null_data_type>::value ||
+ is_simple_type<Data>::value,
+ no_throw_copies = key_no_throw&& data_no_throw
+ };
+
+ typedef int_to_type<no_throw_copies> no_throw_copies_t;
+
+ public:
+ static no_throw_copies_t s_no_throw_copies_indicator;
+ };
+
+ PB_ASSOC_CLASS_T_DEC
+ typename PB_ASSOC_CLASS_C_DEC::no_throw_copies_t
+ PB_ASSOC_CLASS_C_DEC::s_no_throw_copies_indicator;
+
+#undef PB_ASSOC_CLASS_T_DEC
+
+#undef PB_ASSOC_CLASS_C_DEC
+
+ template<typename Key, typename Data, class Allocator>
+ struct value_types_traits
+ {
+
+ public:
+
+ typedef
+ typename Allocator::template rebind<
+ std::pair<const Key, Data> >::other
+ value_type_allocator;
+
+ typedef typename value_type_allocator::value_type value_type;
+
+ typedef typename value_type_allocator::pointer pointer;
+
+ typedef typename value_type_allocator::const_pointer const_pointer;
+
+ typedef typename value_type_allocator::reference reference;
+
+ typedef typename value_type_allocator::const_reference const_reference;
+
+ };
+
+ template<typename Key, class Allocator>
+ struct value_types_traits<
+ Key,
+ null_data_type,
+ Allocator>
+ {
+
+ public:
+
+ typedef
+ typename Allocator::template rebind<
+ Key>::other
+ value_type_allocator;
+
+ typedef typename value_type_allocator::value_type value_type;
+
+ typedef typename value_type_allocator::const_pointer pointer;
+
+ typedef typename value_type_allocator::const_pointer const_pointer;
+
+ typedef typename value_type_allocator::const_reference reference;
+
+ typedef typename value_type_allocator::const_reference const_reference;
+
+ };
+
+ template<typename Key, class Cntnr, class Allocator>
+ struct value_types_traits<
+ Key,
+ compound_data_type<
+ Cntnr>,
+ Allocator>
+ {
+ private:
+
+ typedef
+ typename Allocator::template rebind<
+ std::pair<const Key, Cntnr> >::other
+ value_type_allocator;
+
+ public:
+
+ typedef typename value_type_allocator::value_type value_type;
+
+ typedef typename value_type_allocator::pointer pointer;
+
+ typedef typename value_type_allocator::const_pointer const_pointer;
+
+ typedef typename value_type_allocator::reference reference;
+
+ typedef typename value_type_allocator::const_reference const_reference;
+
+ };
+
+ template<typename Key, typename Data, class Allocator>
+ struct types_traits : public data_types_traits<
+ Data,
+ Allocator>,
+public value_types_traits<
+ Key,
+ Data,
+ Allocator>,
+public exception_throw_types_traits<
+ Key,
+ Data>
+ {
+
+ public:
+
+ typedef typename Allocator::template rebind<Key>::other key_allocator;
+
+ typedef typename key_allocator::value_type key_type;
+
+ typedef typename key_allocator::pointer key_pointer;
+
+ typedef typename key_allocator::const_pointer const_key_pointer;
+
+ typedef typename key_allocator::reference key_reference;
+
+ typedef typename key_allocator::const_reference const_key_reference;
+
+ };
+
+ } // namespace detail
+
+} // namespace pb_assoc
+
+#endif // #ifndef TYPES_TRAITS_HPP
diff --git a/libstdc++-v3/include/ext/pb_assoc/detail/unordered_iterator/const_find_iterator.hpp b/libstdc++-v3/include/ext/pb_assoc/detail/unordered_iterator/const_find_iterator.hpp
new file mode 100644
index 00000000000..aa48f199bc8
--- /dev/null
+++ b/libstdc++-v3/include/ext/pb_assoc/detail/unordered_iterator/const_find_iterator.hpp
@@ -0,0 +1,138 @@
+// -*- C++ -*-
+
+// 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.
+
+// As a special exception, you may use this file as part of a free software
+// library without restriction. Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General 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 const_find_iterator.hpp
+ * Contains an iterator class returned by the tables' const find and insert
+ * methods.
+ */
+
+class find_iterator_;
+
+class const_find_iterator_
+{
+
+public:
+
+ typedef trivial_iterator_tag iterator_category;
+
+ typedef trivial_iterator_difference_type difference_type;
+
+ typedef mapped_value_type value_type;
+
+ typedef mapped_pointer pointer;
+
+ typedef const_mapped_pointer const_pointer;
+
+ typedef mapped_reference reference;
+
+ typedef const_mapped_reference const_reference;
+
+public:
+
+ inline
+ const_find_iterator_(const_pointer p_value) : m_p_value(p_value)
+ { }
+
+ inline
+ const_find_iterator_()
+
+ : m_p_value(NULL)
+ { }
+
+ inline
+ const_find_iterator_(const const_find_iterator_& r_other)
+
+ : m_p_value(r_other.m_p_value)
+ { }
+
+ inline
+ const_find_iterator_(const find_iterator_& r_other)
+
+ : m_p_value(r_other.m_p_value)
+ { }
+
+ inline const_pointer
+ operator->() const
+ {
+ PB_ASSOC_DBG_ASSERT(m_p_value != NULL);
+
+ return (m_p_value);
+ }
+
+ inline const_reference
+ operator*() const
+ {
+ PB_ASSOC_DBG_ASSERT(m_p_value != NULL);
+
+ return (*m_p_value);
+ }
+
+ inline bool
+ operator==(const find_iterator_& r_other) const
+ {
+ return (m_p_value == r_other.m_p_value);
+ }
+
+ inline bool
+ operator==(const const_find_iterator_& r_other) const
+ {
+ return (m_p_value == r_other.m_p_value);
+ }
+
+ inline bool
+ operator!=(const find_iterator_& r_other) const
+ {
+ return (m_p_value != r_other.m_p_value);
+ }
+
+ inline bool
+ operator!=(const const_find_iterator_& r_other) const
+ {
+ return (m_p_value != r_other.m_p_value);
+ }
+
+protected:
+ const_pointer m_p_value;
+
+ friend class find_iterator_;
+
+ friend class PB_ASSOC_CLASS_C_DEC;
+};
+
diff --git a/libstdc++-v3/include/ext/pb_assoc/detail/unordered_iterator/const_iterator.hpp b/libstdc++-v3/include/ext/pb_assoc/detail/unordered_iterator/const_iterator.hpp
new file mode 100644
index 00000000000..b137a39e8af
--- /dev/null
+++ b/libstdc++-v3/include/ext/pb_assoc/detail/unordered_iterator/const_iterator.hpp
@@ -0,0 +1,122 @@
+// -*- C++ -*-
+
+// 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.
+
+// As a special exception, you may use this file as part of a free software
+// library without restriction. Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General 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 const_iterator.hpp
+ * Contains an iterator class used for const ranging over the elements of the
+ * table.
+ */
+
+class const_iterator_ :
+ public const_find_iterator_
+
+{
+
+public:
+
+ typedef std::forward_iterator_tag iterator_category;
+
+ typedef typename Allocator::difference_type difference_type;
+
+ typedef mapped_value_type value_type;
+
+ typedef mapped_pointer pointer;
+
+ typedef const_mapped_pointer const_pointer;
+
+ typedef mapped_reference reference;
+
+ typedef const_mapped_reference const_reference;
+
+public:
+
+ inline
+ const_iterator_()
+
+ : m_p_tbl(NULL)
+ { }
+
+ inline const_iterator_&
+ operator++()
+ {
+ m_p_tbl->inc_it_state(my_base::m_p_value, m_pos);
+
+ return (*this);
+ }
+
+ inline const_iterator_
+ operator++(int)
+ {
+ const_iterator_ ret =* this;
+
+ m_p_tbl->inc_it_state(my_base::m_p_value, m_pos);
+
+ return (ret);
+ }
+
+protected:
+
+ typedef const_find_iterator_ my_base;
+
+protected:
+
+ /**
+ * Constructor used by the table to initiate the generalized
+ * pointer and position (e.g., this is called from within a find()
+ * of a table.
+ **/
+ inline
+ const_iterator_(const_mapped_pointer p_value, PB_ASSOC_GEN_POS pos, const PB_ASSOC_CLASS_C_DEC* p_tbl) : const_find_iterator_(p_value),
+ m_p_tbl(p_tbl),
+ m_pos(pos)
+ { }
+
+protected:
+
+ /**
+ * Pointer to the table object which created the iterator (used for
+ * incrementing its position.
+ **/
+ const PB_ASSOC_CLASS_C_DEC* m_p_tbl;
+
+ PB_ASSOC_GEN_POS m_pos;
+
+ friend class PB_ASSOC_CLASS_C_DEC;
+};
+
diff --git a/libstdc++-v3/include/ext/pb_assoc/detail/unordered_iterator/find_iterator.hpp b/libstdc++-v3/include/ext/pb_assoc/detail/unordered_iterator/find_iterator.hpp
new file mode 100644
index 00000000000..0c65a504edf
--- /dev/null
+++ b/libstdc++-v3/include/ext/pb_assoc/detail/unordered_iterator/find_iterator.hpp
@@ -0,0 +1,147 @@
+// -*- C++ -*-
+
+// 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.
+
+// As a special exception, you may use this file as part of a free software
+// library without restriction. Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General 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 find_iterator.hpp
+ * Contains an iterator class returned by the tables' find and insert
+ * methods.
+ */
+
+class find_iterator_
+{
+
+public:
+
+ typedef trivial_iterator_tag iterator_category;
+
+ typedef trivial_iterator_difference_type difference_type;
+
+ typedef mapped_value_type value_type;
+
+ typedef mapped_pointer pointer;
+
+ typedef const_mapped_pointer const_pointer;
+
+ typedef mapped_reference reference;
+
+ typedef const_mapped_reference const_reference;
+
+public:
+
+ inline
+ find_iterator_()
+
+ : m_p_value(NULL)
+ { }
+
+ inline
+ find_iterator_(const find_iterator_& r_other)
+
+ : m_p_value(r_other.m_p_value)
+ { }
+
+ inline pointer
+ operator->()
+ {
+ PB_ASSOC_DBG_ASSERT(m_p_value != NULL);
+
+ return (m_p_value);
+ }
+
+ inline const_pointer
+ operator->() const
+ {
+ PB_ASSOC_DBG_ASSERT(m_p_value != NULL);
+
+ return (m_p_value);
+ }
+
+ inline reference
+ operator*()
+ {
+ PB_ASSOC_DBG_ASSERT(m_p_value != NULL);
+
+ return (*m_p_value);
+ }
+
+ inline const_reference
+ operator*() const
+ {
+ PB_ASSOC_DBG_ASSERT(m_p_value != NULL);
+
+ return (*m_p_value);
+ }
+
+ inline bool
+ operator==(const find_iterator_& r_other) const
+ {
+ return (m_p_value == r_other.m_p_value);
+ }
+
+ inline bool
+ operator==(const const_find_iterator_& r_other) const
+ {
+ return (m_p_value == r_other.m_p_value);
+ }
+
+ inline bool
+ operator!=(const find_iterator_& r_other) const
+ {
+ return (m_p_value != r_other.m_p_value);
+ }
+
+ inline bool
+ operator!=(const const_find_iterator_& r_other) const
+ {
+ return (m_p_value != r_other.m_p_value);
+ }
+
+ inline
+ find_iterator_(pointer p_value) : m_p_value(p_value)
+ { }
+
+protected:
+ friend class const_find_iterator_;
+
+ friend class PB_ASSOC_CLASS_C_DEC;
+
+protected:
+ pointer m_p_value;
+};
+
diff --git a/libstdc++-v3/include/ext/pb_assoc/detail/unordered_iterator/iterator.hpp b/libstdc++-v3/include/ext/pb_assoc/detail/unordered_iterator/iterator.hpp
new file mode 100644
index 00000000000..e42790411e7
--- /dev/null
+++ b/libstdc++-v3/include/ext/pb_assoc/detail/unordered_iterator/iterator.hpp
@@ -0,0 +1,139 @@
+// -*- C++ -*-
+
+// 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.
+
+// As a special exception, you may use this file as part of a free software
+// library without restriction. Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General 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 iterator.hpp
+ * Contains an iterator_ class used for ranging over the elements of the
+ * table.
+ */
+
+class iterator_ :
+ public const_iterator_
+
+{
+
+public:
+
+ typedef std::forward_iterator_tag iterator_category;
+
+ typedef typename Allocator::difference_type difference_type;
+
+ typedef mapped_value_type value_type;
+
+ typedef mapped_pointer pointer;
+
+ typedef const_mapped_pointer const_pointer;
+
+ typedef mapped_reference reference;
+
+ typedef const_mapped_reference const_reference;
+
+public:
+
+ inline
+ iterator_()
+
+ : const_iterator_(NULL, PB_ASSOC_GEN_POS(), NULL)
+ { }
+
+ inline
+ operator find_iterator_()
+ {
+ return (find_iterator_(
+ const_cast<pointer>(const_iterator_::m_p_value)));
+ }
+
+ inline
+ operator const find_iterator_() const
+ {
+ return (find_iterator_(
+ const_cast<pointer>(const_iterator_::m_p_value)));
+ }
+
+ inline pointer
+ operator->()
+ {
+ PB_ASSOC_DBG_ASSERT(my_base::m_p_value != NULL);
+
+ return (const_cast<pointer>(my_base::m_p_value));
+ }
+
+ inline reference
+ operator*()
+ {
+ PB_ASSOC_DBG_ASSERT(my_base::m_p_value != NULL);
+
+ return (*(operator->()));
+ }
+
+ inline iterator_&
+ operator++()
+ {
+ my_base::m_p_tbl->inc_it_state(my_base::m_p_value, my_base::m_pos);
+
+ return (*this);
+ }
+
+ inline iterator_
+ operator++(int)
+ {
+ iterator_ ret =* this;
+
+ my_base::m_p_tbl->inc_it_state(my_base::m_p_value, my_base::m_pos);
+
+ return (ret);
+ }
+
+protected:
+ typedef const_iterator_ my_base;
+
+protected:
+
+ /**
+ * Constructor used by the table to initiate the generalized
+ * pointer and position (e.g., this is called from within a find()
+ * of a table.
+ **/
+ inline
+ iterator_(pointer p_value, PB_ASSOC_GEN_POS pos, PB_ASSOC_CLASS_C_DEC* p_tbl) : const_iterator_(p_value, pos, p_tbl)
+ { }
+
+ friend class PB_ASSOC_CLASS_C_DEC;
+};
+
diff --git a/libstdc++-v3/include/ext/pb_assoc/detail/value_type_adapter/constructor_destructor_and_related.hpp b/libstdc++-v3/include/ext/pb_assoc/detail/value_type_adapter/constructor_destructor_and_related.hpp
new file mode 100644
index 00000000000..4ca05081893
--- /dev/null
+++ b/libstdc++-v3/include/ext/pb_assoc/detail/value_type_adapter/constructor_destructor_and_related.hpp
@@ -0,0 +1,183 @@
+// -*- C++ -*-
+
+// 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.
+
+// As a special exception, you may use this file as part of a free software
+// library without restriction. Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General 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 constructor_destructor_and_related.hpp
+ * Contains an adapter of mapping levels.
+ */
+
+PB_ASSOC_CLASS_T_DEC
+inline
+PB_ASSOC_CLASS_C_DEC::
+value_type_adapter()
+{ }
+
+PB_ASSOC_CLASS_T_DEC
+template<typename T0>
+inline
+PB_ASSOC_CLASS_C_DEC::
+value_type_adapter(T0 t0) :
+ my_base(t0)
+{ }
+
+PB_ASSOC_CLASS_T_DEC
+template<typename T0, typename T1>
+inline
+PB_ASSOC_CLASS_C_DEC::
+value_type_adapter(T0 t0, T1 t1) :
+ my_base(t0, t1)
+{ }
+
+PB_ASSOC_CLASS_T_DEC
+template<typename T0, typename T1, typename T2>
+inline
+PB_ASSOC_CLASS_C_DEC::
+value_type_adapter(T0 t0, T1 t1, T2 t2) :
+ my_base(t0, t1, t2)
+{ }
+
+PB_ASSOC_CLASS_T_DEC
+template<typename T0, typename T1, typename T2, typename T3>
+inline
+PB_ASSOC_CLASS_C_DEC::
+value_type_adapter(T0 t0, T1 t1, T2 t2, T3 t3) :
+ my_base(t0, t1, t2, t3)
+{ }
+
+PB_ASSOC_CLASS_T_DEC
+template<typename T0,
+ typename T1,
+ typename T2,
+ typename T3,
+ typename T4>
+inline
+PB_ASSOC_CLASS_C_DEC::
+value_type_adapter(T0 t0, T1 t1, T2 t2, T3 t3, T4 t4) :
+ my_base(t0, t1, t2, t3, t4)
+{ }
+
+PB_ASSOC_CLASS_T_DEC
+template<typename T0,
+ typename T1,
+ typename T2,
+ typename T3,
+ typename T4,
+ typename T5>
+inline
+PB_ASSOC_CLASS_C_DEC::
+value_type_adapter(T0 t0, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5) :
+ my_base(t0,
+ t1,
+ t2,
+ t3,
+ t4,
+ t5)
+{ }
+
+PB_ASSOC_CLASS_T_DEC
+template<typename T0,
+ typename T1,
+ typename T2,
+ typename T3,
+ typename T4,
+ typename T5,
+ typename T6>
+inline
+PB_ASSOC_CLASS_C_DEC::
+value_type_adapter(T0 t0, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6) :
+ my_base(t0,
+ t1,
+ t2,
+ t3,
+ t4,
+ t5,
+ t6)
+{ }
+
+PB_ASSOC_CLASS_T_DEC
+template<typename T0,
+ typename T1,
+ typename T2,
+ typename T3,
+ typename T4,
+ typename T5,
+ typename T6,
+ typename T7>
+inline
+PB_ASSOC_CLASS_C_DEC::
+value_type_adapter(T0 t0, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7) :
+ my_base(t0,
+ t1,
+ t2,
+ t3,
+ t4,
+ t5,
+ t6,
+ t7)
+{ }
+
+PB_ASSOC_CLASS_T_DEC
+template<typename T0,
+ typename T1,
+ typename T2,
+ typename T3,
+ typename T4,
+ typename T5,
+ typename T6,
+ typename T7,
+ typename T8>
+inline
+PB_ASSOC_CLASS_C_DEC::
+value_type_adapter(T0 t0, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8) :
+ my_base(t0,
+ t1,
+ t2,
+ t3,
+ t4,
+ t5,
+ t6,
+ t7,
+ t8)
+{ }
+
+PB_ASSOC_CLASS_T_DEC
+PB_ASSOC_CLASS_C_DEC::
+~value_type_adapter()
+{ }
+
diff --git a/libstdc++-v3/include/ext/pb_assoc/detail/value_type_adapter/erase_fn_imps.hpp b/libstdc++-v3/include/ext/pb_assoc/detail/value_type_adapter/erase_fn_imps.hpp
new file mode 100644
index 00000000000..ffe4997f176
--- /dev/null
+++ b/libstdc++-v3/include/ext/pb_assoc/detail/value_type_adapter/erase_fn_imps.hpp
@@ -0,0 +1,43 @@
+// -*- C++ -*-
+
+// 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.
+
+// As a special exception, you may use this file as part of a free software
+// library without restriction. Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General 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 erase_fn_imps.hpp
+ * Contains an adapter of mapping levels.
+ */
diff --git a/libstdc++-v3/include/ext/pb_assoc/detail/value_type_adapter/erase_if_pred.hpp b/libstdc++-v3/include/ext/pb_assoc/detail/value_type_adapter/erase_if_pred.hpp
new file mode 100644
index 00000000000..b23b543f114
--- /dev/null
+++ b/libstdc++-v3/include/ext/pb_assoc/detail/value_type_adapter/erase_if_pred.hpp
@@ -0,0 +1,72 @@
+// -*- C++ -*-
+
+// 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.
+
+// As a special exception, you may use this file as part of a free software
+// library without restriction. Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General 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 erase_if_pred.hpp
+ * Contains a bridge erase_if predicate
+ */
+
+template<class Pred>
+class erase_if_pred
+{
+public:
+ // Tmp Ami all erase-ifs should take a reference to a predicate?
+ erase_if_pred(Pred& r_pred, typename my_base::iterator base_it) : m_r_pred(r_pred),
+ m_base_it(base_it)
+ { }
+
+ inline bool
+ operator()(typename my_base_data_type::iterator::reference r_val)
+ {
+ it_value_type_traits_t::make_valid(m_value_type_holder, m_base_it->first, r_val);
+
+ typename it_value_type_traits_t::pointer p_exp_val =
+ it_value_type_traits_t::recast(m_value_type_holder);
+
+ return (m_r_pred(*p_exp_val));
+ }
+
+private:
+ Pred& m_r_pred;
+
+ typename my_base::iterator m_base_it;
+
+ typename it_value_type_traits_t::value_type_holder m_value_type_holder;
+};
+
diff --git a/libstdc++-v3/include/ext/pb_assoc/detail/value_type_adapter/find_fn_imps.hpp b/libstdc++-v3/include/ext/pb_assoc/detail/value_type_adapter/find_fn_imps.hpp
new file mode 100644
index 00000000000..4279981b39b
--- /dev/null
+++ b/libstdc++-v3/include/ext/pb_assoc/detail/value_type_adapter/find_fn_imps.hpp
@@ -0,0 +1,43 @@
+// -*- C++ -*-
+
+// 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.
+
+// As a special exception, you may use this file as part of a free software
+// library without restriction. Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General 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 find_fn_imps.hpp
+ * Contains an adapter of mapping levels.
+ */
diff --git a/libstdc++-v3/include/ext/pb_assoc/detail/value_type_adapter/info_fn_imps.hpp b/libstdc++-v3/include/ext/pb_assoc/detail/value_type_adapter/info_fn_imps.hpp
new file mode 100644
index 00000000000..43ba91ecf6e
--- /dev/null
+++ b/libstdc++-v3/include/ext/pb_assoc/detail/value_type_adapter/info_fn_imps.hpp
@@ -0,0 +1,68 @@
+// -*- C++ -*-
+
+// 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.
+
+// As a special exception, you may use this file as part of a free software
+// library without restriction. Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General 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 info_fn_imps.hpp
+ * Contains an adapter of mapping levels.
+ */
+
+PB_ASSOC_CLASS_T_DEC
+inline typename PB_ASSOC_CLASS_C_DEC::size_type
+PB_ASSOC_CLASS_C_DEC::
+size() const
+{
+ return (std::distance(begin(), end()));
+}
+
+PB_ASSOC_CLASS_T_DEC
+inline typename PB_ASSOC_CLASS_C_DEC::size_type
+PB_ASSOC_CLASS_C_DEC::
+max_size() const
+{
+ return (my_base::max_size());
+}
+
+PB_ASSOC_CLASS_T_DEC
+inline bool
+PB_ASSOC_CLASS_C_DEC::
+empty() const
+{
+ return (size() == 0);
+}
+
diff --git a/libstdc++-v3/include/ext/pb_assoc/detail/value_type_adapter/insert_fn_imps.hpp b/libstdc++-v3/include/ext/pb_assoc/detail/value_type_adapter/insert_fn_imps.hpp
new file mode 100644
index 00000000000..058671ddb94
--- /dev/null
+++ b/libstdc++-v3/include/ext/pb_assoc/detail/value_type_adapter/insert_fn_imps.hpp
@@ -0,0 +1,44 @@
+// -*- C++ -*-
+
+// 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.
+
+// As a special exception, you may use this file as part of a free software
+// library without restriction. Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General 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 insert_fn_imps.hpp
+ * Contains an adapter of mapping levels.
+ */
+
diff --git a/libstdc++-v3/include/ext/pb_assoc/detail/value_type_adapter/invalidation_guarantee_selector.hpp b/libstdc++-v3/include/ext/pb_assoc/detail/value_type_adapter/invalidation_guarantee_selector.hpp
new file mode 100644
index 00000000000..7e7b3b32ad5
--- /dev/null
+++ b/libstdc++-v3/include/ext/pb_assoc/detail/value_type_adapter/invalidation_guarantee_selector.hpp
@@ -0,0 +1,128 @@
+// -*- C++ -*-
+
+// 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.
+
+// As a special exception, you may use this file as part of a free software
+// library without restriction. Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General 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 invalidation_guarantee_selector.hpp
+ * Contains an adapter of mapping levels.
+ */
+
+namespace pb_assoc
+{
+
+ namespace detail
+ {
+
+ template<class IG0, class IG1>
+ struct ig_sel;
+
+ template<>
+ struct ig_sel<
+ basic_invalidation_guarantee,
+ basic_invalidation_guarantee>
+ {
+ typedef basic_invalidation_guarantee type;
+ };
+
+ template<>
+ struct ig_sel<
+ basic_invalidation_guarantee,
+ find_invalidation_guarantee>
+ {
+ typedef basic_invalidation_guarantee type;
+ };
+
+ template<>
+ struct ig_sel<
+ basic_invalidation_guarantee,
+ range_invalidation_guarantee>
+ {
+ typedef basic_invalidation_guarantee type;
+ };
+
+ template<>
+ struct ig_sel<
+ find_invalidation_guarantee,
+ basic_invalidation_guarantee>
+ {
+ typedef basic_invalidation_guarantee type;
+ };
+
+ template<>
+ struct ig_sel<
+ find_invalidation_guarantee,
+ find_invalidation_guarantee>
+ {
+ typedef find_invalidation_guarantee type;
+ };
+
+ template<>
+ struct ig_sel<
+ find_invalidation_guarantee,
+ range_invalidation_guarantee>
+ {
+ typedef find_invalidation_guarantee type;
+ };
+
+ template<>
+ struct ig_sel<
+ range_invalidation_guarantee,
+ basic_invalidation_guarantee>
+ {
+ typedef basic_invalidation_guarantee type;
+ };
+
+ template<>
+ struct ig_sel<
+ range_invalidation_guarantee,
+ find_invalidation_guarantee>
+ {
+ typedef find_invalidation_guarantee type;
+ };
+
+ template<>
+ struct ig_sel<
+ range_invalidation_guarantee,
+ range_invalidation_guarantee>
+ {
+ typedef range_invalidation_guarantee type;
+ };
+
+ } // namespace detail
+
+} // namespace pb_assoc
diff --git a/libstdc++-v3/include/ext/pb_assoc/detail/value_type_adapter/it_value_type_traits.hpp b/libstdc++-v3/include/ext/pb_assoc/detail/value_type_adapter/it_value_type_traits.hpp
new file mode 100644
index 00000000000..4ca59bb13ad
--- /dev/null
+++ b/libstdc++-v3/include/ext/pb_assoc/detail/value_type_adapter/it_value_type_traits.hpp
@@ -0,0 +1,224 @@
+// -*- C++ -*-
+
+// 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.
+
+// As a special exception, you may use this file as part of a free software
+// library without restriction. Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General 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 it_value_type_traits.hpp
+ * Contains an adapter of mapping levels.
+ */
+
+template<class Base, bool Lowest>
+struct base_it_key_type
+{
+ typedef typename Base::it_key_type type;
+};
+
+template<class Base>
+struct base_it_key_type<
+ Base,
+ true>
+{
+ typedef typename Base::const_key_reference type;
+};
+
+template<typename Base_Key_,
+ typename Key_,
+ typename Data_,
+ typename Value_,
+ class Allocator_ >
+struct it_value_type_traits_
+{
+ typedef ref_pair< Base_Key_, Key_> key_ref_pair;
+
+ typedef
+ typename Allocator_::template rebind<
+ key_ref_pair>::other::const_reference
+ key_ref_pair_val;
+
+ typedef key_ref_pair_val key_type;
+
+ typedef ref_pair< key_ref_pair_val, Data_> value_type;
+
+ typedef
+ typename Allocator_::template rebind<
+ value_type>::other::reference
+ reference;
+
+ typedef
+ typename Allocator_::template rebind<
+ value_type>::other::const_reference
+ const_reference;
+
+ typedef
+ typename Allocator_::template rebind<
+ value_type>::other::pointer
+ pointer;
+
+ typedef
+ typename Allocator_::template rebind<
+ value_type>::other::const_pointer
+ const_pointer;
+
+ typedef
+ typename Allocator_::template rebind<
+ int* >::other::value_type
+ buf_t;
+
+ struct value_type_holder
+ {
+ buf_t m_a_key_buf[sizeof(key_ref_pair) / sizeof(buf_t) + 1];
+
+ buf_t m_a_value_buf[sizeof(value_type) / sizeof(buf_t) + 1];
+ };
+
+ typedef
+ typename Allocator_::template rebind<
+ value_type_holder>::other::reference
+ value_type_hoder_valerence;
+
+ inline static pointer
+ recast(value_type_hoder_valerence r_holder)
+ {
+ return reinterpret_cast<pointer>(r_holder.m_a_value_buf);
+ }
+
+ inline static void
+ make_valid(value_type_hoder_valerence r_holder, Base_Key_ r_bk, Value_ r_val)
+ {
+ typedef
+ typename Allocator_::template rebind<
+ void* >::other::value_type
+ void_pointer;
+
+ void_pointer p_target = r_holder.m_a_key_buf;
+
+ new (p_target) key_ref_pair(r_bk, r_val.first);
+
+ typedef
+ typename Allocator_::template rebind<
+ key_ref_pair>::other::pointer
+ key_ref_pair_pointer;
+
+ key_ref_pair_pointer p_key =
+ reinterpret_cast<key_ref_pair_pointer>(r_holder.m_a_key_buf);
+
+ p_target = r_holder.m_a_value_buf;
+
+ new (p_target) value_type(*p_key, r_val.second);
+ }
+};
+
+template<typename Base_Key_,
+ typename Key_,
+ typename Value_,
+ class Allocator_>
+struct it_value_type_traits_<
+ Base_Key_,
+ Key_,
+ null_data_type,
+ Value_,
+ Allocator_>
+{
+ typedef ref_pair< Base_Key_, Key_> key_ref_pair;
+
+ typedef
+ typename Allocator_::template rebind<
+ key_ref_pair>::other::const_reference
+ key_ref_pair_val;
+
+ typedef key_ref_pair_val key_type;
+
+ typedef key_ref_pair value_type;
+
+ typedef
+ typename Allocator_::template rebind<
+ value_type>::other::const_reference
+ reference;
+
+ typedef
+ typename Allocator_::template rebind<
+ value_type>::other::const_reference
+ const_reference;
+
+ typedef
+ typename Allocator_::template rebind<
+ value_type>::other::const_pointer
+ pointer;
+
+ typedef
+ typename Allocator_::template rebind<
+ value_type>::other::const_pointer
+ const_pointer;
+
+ typedef
+ typename Allocator_::template rebind<
+ int* >::other::value_type
+ buf_t;
+
+ struct value_type_holder
+ {
+ buf_t m_a_key_buf[sizeof(key_ref_pair) / sizeof(buf_t) + 1];
+
+ buf_t m_a_value_buf[sizeof(value_type) / sizeof(buf_t) + 1];
+ };
+
+ typedef
+ typename Allocator_::template rebind<
+ value_type_holder>::other::reference
+ value_type_hoder_valerence;
+
+ inline static pointer
+ recast(value_type_hoder_valerence r_holder)
+ {
+ return reinterpret_cast<pointer>(r_holder.m_a_value_buf);
+ }
+
+ inline static void
+ make_valid(value_type_hoder_valerence r_holder, Base_Key_ r_bk, Value_ r_val)
+ {
+ typedef
+ typename Allocator_::template rebind<
+ void* >::other::value_type
+ void_pointer;
+
+ void_pointer p_target = r_holder.m_a_value_buf;
+
+ new (p_target) key_ref_pair(r_bk, r_val.first);
+ }
+};
+
diff --git a/libstdc++-v3/include/ext/pb_assoc/detail/value_type_adapter/iterator.hpp b/libstdc++-v3/include/ext/pb_assoc/detail/value_type_adapter/iterator.hpp
new file mode 100644
index 00000000000..e3ed301c4d9
--- /dev/null
+++ b/libstdc++-v3/include/ext/pb_assoc/detail/value_type_adapter/iterator.hpp
@@ -0,0 +1,196 @@
+// -*- C++ -*-
+
+// 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.
+
+// As a special exception, you may use this file as part of a free software
+// library without restriction. Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General 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 it_.hpp
+ * Contains an it_ for an adapter of mapping levels.
+ */
+
+#define PB_ASSOC_IT_C_DEC \
+ it_< \
+ It0, \
+ It1, \
+ Has_Data, \
+ Const>
+
+#define PB_ASSOC_OIT_T_DEC \
+ template<class OIt0, class OIt1, bool OHas_Data, bool OConst>
+
+#define PB_ASSOC_OIT_C_DEC \
+ it_< \
+ OIt0, \
+ OIt1, \
+ OHas_Data, \
+ OConst>
+
+template<class It0, class It1, bool Has_Data, bool Const>
+class it_
+{
+public:
+
+ typedef typename it_value_type_traits_t::value_type value_type;
+
+ typedef typename it_value_type_traits_t::reference reference;
+
+ typedef
+ typename it_value_type_traits_t::const_reference
+ const_reference;
+
+ typedef typename it_value_type_traits_t::pointer pointer;
+
+ typedef typename it_value_type_traits_t::const_pointer const_pointer;
+
+public:
+ inline
+ it_(It0 it0 = It0(),
+ It0 end_it0 = It0(),
+ It1 it1 = It1()) : m_it0(it0),
+ m_end_it0(end_it0),
+ m_it1(it1)
+ { }
+
+ inline
+ it_(const PB_ASSOC_IT_C_DEC& r_other) : m_it0(r_other.m_it0),
+ m_end_it0(r_other.m_end_it0),
+ m_it1(r_other.m_it1)
+ { }
+
+ PB_ASSOC_OIT_T_DEC
+ inline
+ it_(const PB_ASSOC_OIT_C_DEC& r_other) : m_it0(r_other.m_it0),
+ m_end_it0(r_other.m_end_it0),
+ m_it1(r_other.m_it1)
+ { }
+
+ inline bool
+ operator==(const PB_ASSOC_IT_C_DEC& r_other) const
+ {
+ if (m_it0 != r_other.m_it0)
+ return (false);
+
+ if (m_it0 == m_end_it0)
+ return (true);
+
+ return (m_it1 == r_other.m_it1);
+ }
+
+ inline bool
+ operator!=(const PB_ASSOC_IT_C_DEC& r_other) const
+ {
+ return (!operator==(r_other));
+ }
+
+ inline PB_ASSOC_IT_C_DEC&
+ operator++()
+ {
+ ++m_it1;
+
+ if (m_it1 == m_it0->second.end())
+ do
+ {
+ ++m_it0;
+ }
+ while (m_it0 != m_end_it0&& m_it0->second.empty());
+
+ if (m_it0 != m_end_it0&& !m_it0->second.empty())
+ m_it1 = m_it0->second.begin();
+
+ return (*this);
+ }
+
+ inline PB_ASSOC_IT_C_DEC
+ operator++(int)
+ {
+ PB_ASSOC_IT_C_DEC ret =* this;
+
+ operator++();
+
+ return (ret);
+ }
+
+ inline const_pointer
+ operator->() const
+ {
+ it_value_type_traits_t::make_valid(m_value_type_holder, m_it0->first, * m_it1);
+
+ return (it_value_type_traits_t::recast(m_value_type_holder));
+ }
+
+ inline pointer
+ operator->()
+ {
+ // Tmp Ami PB_ASSOC_STATIC_ASSERT(non_const, !Const);
+
+ it_value_type_traits_t::make_valid(m_value_type_holder, m_it0->first, * m_it1);
+
+ return (it_value_type_traits_t::recast(m_value_type_holder));
+ }
+
+ inline const_reference
+ operator*() const
+ {
+ return (*operator->());
+ }
+
+ inline reference
+ operator*()
+ {
+ PB_ASSOC_STATIC_ASSERT(non_const, !Const);
+
+ return (*operator->());
+ }
+
+public:
+ mutable It0 m_it0;
+ It0 m_end_it0;
+
+ mutable It1 m_it1;
+
+ int_to_type<Has_Data> m_has_data;
+
+private:
+ mutable typename it_value_type_traits_t::value_type_holder m_value_type_holder;
+};
+
+#undef PB_ASSOC_IT_C_DEC
+
+#undef PB_ASSOC_OIT_T_DEC
+
+#undef PB_ASSOC_OIT_C_DEC
+
diff --git a/libstdc++-v3/include/ext/pb_assoc/detail/value_type_adapter/iterator_fn_imps.hpp b/libstdc++-v3/include/ext/pb_assoc/detail/value_type_adapter/iterator_fn_imps.hpp
new file mode 100644
index 00000000000..739cb07760b
--- /dev/null
+++ b/libstdc++-v3/include/ext/pb_assoc/detail/value_type_adapter/iterator_fn_imps.hpp
@@ -0,0 +1,44 @@
+// -*- C++ -*-
+
+// 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.
+
+// As a special exception, you may use this file as part of a free software
+// library without restriction. Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General 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 iterator_fn_imps.hpp
+ * Contains an adapter of mapping levels.
+ */
+
diff --git a/libstdc++-v3/include/ext/pb_assoc/detail/value_type_adapter/ref_pair.hpp b/libstdc++-v3/include/ext/pb_assoc/detail/value_type_adapter/ref_pair.hpp
new file mode 100644
index 00000000000..063fb7a2b60
--- /dev/null
+++ b/libstdc++-v3/include/ext/pb_assoc/detail/value_type_adapter/ref_pair.hpp
@@ -0,0 +1,73 @@
+// -*- C++ -*-
+
+// 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.
+
+// As a special exception, you may use this file as part of a free software
+// library without restriction. Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General 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 ref_pair.hpp
+ * Contains an adapter of mapping levels.
+ */
+
+namespace pb_assoc
+{
+
+ namespace detail
+ {
+
+ template<typename T0, typename T1>
+ struct ref_pair
+ {
+ public:
+ typedef T0 first_type;
+
+ typedef T1 second_type;
+
+ public:
+ inline
+ ref_pair(T0 t0, T1 t1) : first(t0),
+ second(t1)
+ { }
+
+ public:
+ T0 first;
+
+ T1 second;
+ };
+
+ } // namespace detail
+
+} // namespace pb_assoc
diff --git a/libstdc++-v3/include/ext/pb_assoc/detail/value_type_adapter/value_type_adapter.hpp b/libstdc++-v3/include/ext/pb_assoc/detail/value_type_adapter/value_type_adapter.hpp
new file mode 100644
index 00000000000..5bbceea9e64
--- /dev/null
+++ b/libstdc++-v3/include/ext/pb_assoc/detail/value_type_adapter/value_type_adapter.hpp
@@ -0,0 +1,600 @@
+// -*- C++ -*-
+
+// 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.
+
+// As a special exception, you may use this file as part of a free software
+// library without restriction. Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General 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 value_type_adapter.hpp
+ * Contains an adapter of mapping levels.
+ */
+
+#ifndef VALUE_TYPE_ADAPTER_HPP
+#define VALUE_TYPE_ADAPTER_HPP
+
+#include <ext/pb_assoc/detail/value_type_adapter/ref_pair.hpp>
+#include <ext/pb_assoc/detail/assoc_cntnr_base.hpp>
+#include <ext/pb_assoc/detail/value_type_adapter/invalidation_guarantee_selector.hpp>
+#include <ext/pb_assoc/detail/type_utils.hpp>
+#include <utility>
+#include <algorithm>
+
+namespace pb_assoc
+{
+
+ namespace detail
+ {
+
+#define PB_ASSOC_STATIC_ASSERT(UNIQUE, E) \
+ typedef \
+ pb_assoc::detail::static_assert_dummy_class< \
+ sizeof(pb_assoc::detail::static_assert<(bool)(E)>)> \
+ UNIQUE##static_assert_type
+
+#define PB_ASSOC_CLASS_T_DEC \
+ template< \
+ typename Key, \
+ typename Data, \
+ class DS_Tag, \
+ class Policy_Tl, \
+ class Allocator, \
+ int Mapping_Level>
+
+#define PB_ASSOC_CLASS_C_DEC \
+ value_type_adapter< \
+ Key, \
+ Data, \
+ DS_Tag, \
+ Policy_Tl, \
+ Allocator, \
+ Mapping_Level>
+
+#define PB_ASSOC_BASE_C_DEC \
+ cond_type< \
+ Mapping_Level != 1, \
+ value_type_adapter< \
+ Key, \
+ Data, \
+ DS_Tag, \
+ Policy_Tl, \
+ Allocator, \
+ Mapping_Level - 1>, \
+ typename assoc_cntnr_base< \
+ Key, \
+ Data, \
+ DS_Tag, \
+ Policy_Tl, \
+ Allocator>::type>::type
+
+ template<typename Key,
+ typename Data,
+ class DS_Tag,
+ class Policy_Tl,
+ class Allocator,
+ int Mapping_Level>
+ struct value_type_adapter : public PB_ASSOC_BASE_C_DEC
+ {
+
+ private:
+ typedef typename PB_ASSOC_BASE_C_DEC my_base;
+
+ typedef typename my_base::data_type my_base_data_type;
+
+ enum
+ {
+ same_alloc_type =
+ is_same_type<
+ typename my_base::allocator::template rebind<
+ char>::other,
+ typename my_base_data_type::allocator::template rebind<
+ char>::other>::value
+ };
+
+ PB_ASSOC_STATIC_ASSERT(wrong_level, Mapping_Level > 0);
+
+ PB_ASSOC_STATIC_ASSERT(must_be_same_alloc, same_alloc_type);
+
+#include <ext/pb_assoc/detail/value_type_adapter/value_type_traits.hpp>
+#include <ext/pb_assoc/detail/value_type_adapter/it_value_type_traits.hpp>
+
+ typedef
+ it_value_type_traits_<
+ typename base_it_key_type<
+ my_base,
+ Mapping_Level == 1>::type,
+ typename my_base_data_type::const_key_reference,
+ typename cond_type<
+ is_same_type<
+ typename my_base_data_type::data_type,
+ null_data_type>::value,
+ null_data_type,
+ typename my_base_data_type::data_reference>::type,
+ typename my_base_data_type::reference,
+ typename my_base::allocator>
+ it_value_type_traits_t;
+
+#include <ext/pb_assoc/detail/value_type_adapter/iterator.hpp>
+
+ typedef
+ value_type_traits_<
+ typename my_base::key_type,
+ typename my_base_data_type::key_type,
+ typename my_base_data_type::data_type,
+ typename my_base::allocator>
+ value_type_traits_t;
+
+ enum
+ {
+ has_data =
+ !is_same_type<
+ typename my_base_data_type::data_type,
+ null_data_type>::value
+ };
+
+ public:
+
+ typedef typename Allocator::size_type size_type;
+
+ typedef typename Allocator::difference_type difference_type;
+
+ typedef typename my_base::allocator allocator;
+
+ typedef typename it_value_type_traits_t::key_type it_key_type;
+
+ typedef
+ std::pair<
+ typename my_base::key_type,
+ typename my_base_data_type::key_type>
+ key_type;
+
+ typedef
+ typename allocator::template rebind<
+ key_type>::other::reference
+ key_reference;
+
+ typedef
+ typename allocator::template rebind<
+ key_type>::other::const_reference
+ const_key_reference;
+
+ typedef
+ typename allocator::template rebind<
+ key_type>::other::pointer
+ key_pointer;
+
+ typedef
+ typename allocator::template rebind<
+ key_type>::other::const_pointer
+ const_key_pointer;
+
+ typedef typename my_base_data_type::data_type data_type;
+
+ typedef
+ typename allocator::template rebind<
+ data_type>::other::reference
+ data_reference;
+
+ typedef
+ typename allocator::template rebind<
+ data_type>::other::const_reference
+ const_data_reference;
+
+ typedef
+ typename allocator::template rebind<
+ data_type>::other::pointer
+ data_pointer;
+
+ typedef
+ typename allocator::template rebind<
+ data_type>::other::const_pointer
+ const_data_pointer;
+
+ typedef typename value_type_traits_t::value_type value_type;
+
+ typedef typename value_type_traits_t::reference reference;
+
+ typedef typename value_type_traits_t::const_reference const_reference;
+
+ typedef typename value_type_traits_t::pointer pointer;
+
+ typedef typename value_type_traits_t::const_pointer const_pointer;
+
+ typedef
+ it_<
+ typename my_base::const_find_iterator,
+ typename my_base_data_type::const_find_iterator,
+ has_data,
+ true>
+ const_find_iterator;
+
+ typedef
+ it_<
+ typename my_base::find_iterator,
+ typename my_base_data_type::find_iterator,
+ has_data,
+ false>
+ find_iterator;
+
+ typedef
+ it_<
+ typename my_base::const_iterator,
+ typename my_base_data_type::const_iterator,
+ has_data,
+ true>
+ const_iterator;
+
+ typedef
+ it_<
+ typename my_base::iterator,
+ typename my_base_data_type::iterator,
+ has_data,
+ false>
+ iterator;
+
+ enum
+ {
+ mapping_level = mapping_level_imp<
+ typename my_base::given_data_type>::value -1
+ };
+
+ // Tmp Ami rebind
+
+ typedef compound_ds_tag ds_category;
+
+ typedef
+ typename cond_type<
+ mapping_level == 1,
+ typename cond_type<
+ has_data,
+ data_enabled_ms_tag,
+ basic_ms_tag>::type,
+ compound_data_enabled_ms_tag>::type
+ ms_category;
+
+ typedef
+ typename cond_type<
+ Mapping_Level == 1,
+ DS_Tag,
+ compound_ds_tag>::type
+ effective_base_ds_tag;
+
+ typedef ds_traits< my_base_data_type> base_data_ds_traits;
+
+ enum
+ {
+ erase_can_throw =
+ base_data_ds_traits::erase_can_throw
+ };
+
+ enum
+ {
+ order_preserving =
+ order_preserving_imp<
+ my_base,
+ effective_base_ds_tag>::value&&
+ base_data_ds_traits::order_preserving
+ };
+
+ enum
+ {
+ erase_iterators =
+ base_data_ds_traits::erase_iterators
+ };
+
+ typedef
+ typename ig_sel<
+ typename invalidation_guarantee_imp<
+ my_base,
+ effective_base_ds_tag>::type,
+ typename ds_traits<
+ my_base_data_type>::invalidation_guarantee>::type
+ invalidation_guarantee;
+
+ enum
+ {
+ reverse_iteration =
+ reverse_iteration_imp<
+ my_base,
+ effective_base_ds_tag>::value&&
+ base_data_ds_traits::reverse_iteration
+ };
+
+ enum
+ {
+ split_join = false
+ };
+
+ protected:
+ typedef typename my_base_data_type::data_pointer erase_imp_ret_t;
+
+ private:
+ inline const_key_reference
+ extract_key_imp(const_reference r_val, int_to_type<true>)
+ {
+ return (r_val.first);
+ }
+
+ inline const_key_reference
+ extract_key_imp(const_reference r_val, int_to_type<false>)
+ {
+ return (r_val);
+ }
+
+ inline it_key_type
+ extract_key_imp(typename iterator::const_reference r_val, int_to_type<true>)
+ {
+ return (r_val.first);
+ }
+
+ inline it_key_type
+ extract_key_imp(typename iterator::const_reference r_val, int_to_type<false>)
+ {
+ return (r_val);
+ }
+
+ public:
+
+ inline size_type
+ size() const
+ {
+ return (std::distance(begin(), end()));
+ }
+
+ inline size_type
+ max_size() const
+ {
+ return (my_base::max_size());
+ }
+
+ inline bool
+ empty() const
+ {
+ return (size() == 0);
+ }
+
+ inline static const_key_reference
+ extract_key(const_reference r_val)
+ {
+ return (extract_key_imp(
+ r_val,
+ int_to_type<has_data>()));
+ }
+
+ inline it_key_type
+ extract_key(typename iterator::const_reference r_val)
+ {
+ return (extract_key_imp(
+ r_val,
+ int_to_type<has_data>()));
+ }
+
+ inline std::pair<
+ find_iterator,
+ bool>
+ insert(const_reference r_val)
+ {
+ typedef std::pair< typename my_base::find_iterator, bool> base_ins_ret;
+
+ // Tmp Ami
+ }
+
+ inline data_reference
+ operator[](const_key_reference r_key)
+ {
+ return (subscript_imp(r_key));
+ }
+
+ inline const_find_iterator
+ find(const_key_reference r_key) const
+ {
+ typename my_base::const_find_iterator it = my_base::find(r_key.first);
+
+ if (it == my_base::end())
+ return (end());
+
+ typename my_base_data_type::const_find_iterator sec_it =
+ it->second.find(r_key.second);
+
+ if (sec_it == it->second.end())
+ return (end());
+
+ return (const_find_iterator(it, sec_it));
+ }
+
+ inline find_iterator
+ find(const_key_reference r_key)
+ {
+ typename my_base::find_iterator it = my_base::find(r_key.first);
+
+ if (it == my_base::end())
+ return (end());
+
+ typename my_base_data_type::find_iterator sec_it =
+ it->second.find(r_key.second);
+
+ if (sec_it == it->second.end())
+ return (end());
+
+ return (find_iterator(it, my_base::end(), sec_it));
+ }
+
+ inline const_data_reference
+ operator[](const_key_reference r_key) const
+ {
+ return (my_base::operator[](r_key.first).operator[](r_key.second));
+ }
+
+ inline size_type
+ erase(const_key_reference r_key)
+ {
+ typename my_base::find_iterator it =
+ my_base::find(r_key.first);
+
+ if (it == my_base::end())
+ return (0);
+
+ if (it->second.find(r_key.second) == it->second.end())
+ return (0);
+
+ it->second.erase(r_key.second);
+
+ return (1);
+ }
+
+#include <ext/pb_assoc/detail/value_type_adapter/erase_if_pred.hpp>
+
+ template<class Pred>
+ inline size_type
+ erase_if(Pred prd)
+ {
+ typename my_base::iterator it = my_base::begin();
+
+ typename my_base::iterator end_it = my_base::end();
+
+ size_type ersd = 0;
+
+ // Tmp Ami check erase can throw
+
+ while (it != end_it)
+ {
+ if (it->second.empty() == false)
+ {
+ erase_if_pred<Pred> p(prd, it);
+
+ ersd += it->second.erase_if(p);
+ }
+
+ ++it;
+ }
+
+ return (ersd);
+ }
+
+ void
+ clear()
+ {
+ typename my_base::iterator it = my_base::begin();
+
+ typename my_base::iterator end_it = my_base::end();
+
+ while (it != end_it)
+ it->second.clear();
+ }
+
+ inline const_iterator
+ begin() const
+ {
+ typename my_base::const_iterator it = my_base::begin();
+
+ while (it != my_base::end()&& it->second.size() == 0)
+ ++it;
+
+ if (it == my_base::end())
+ return (end());
+
+ return (const_iterator(it, my_base::end(), it->second.begin()));
+ }
+
+ inline iterator
+ begin()
+ {
+ typename my_base::iterator it = my_base::begin();
+
+ while (it != my_base::end()&& it->second.size() == 0)
+ ++it;
+
+ if (it == my_base::end())
+ return (end());
+
+ return (iterator(it, my_base::end(), it->second.begin()));
+ }
+
+ inline const_iterator
+ end() const
+ {
+ return (const_iterator(my_base::end(), my_base::end()));
+ }
+
+ inline iterator
+ end()
+ {
+ return (iterator(my_base::end(), my_base::end()));
+ }
+
+ protected:
+
+ virtual
+ ~value_type_adapter()
+ { }
+
+#define PB_ASSOC_CLASS_NAME value_type_adapter
+
+#define PB_ASSOC_DIRECT_BASE_C_DEC PB_ASSOC_BASE_C_DEC
+
+#define PB_ASSOC_DIRECT_BASE_CAST_C_DEC \
+ typename PB_ASSOC_DIRECT_BASE_C_DEC
+
+#include <ext/pb_assoc/detail/constructors_destructor_fn_imps.hpp>
+
+#undef PB_ASSOC_CLASS_NAME
+
+#undef PB_ASSOC_DIRECT_BASE_C_DEC
+
+#undef PB_ASSOC_DIRECT_BASE_CAST_C_DEC
+
+ data_reference
+ subscript_imp(const_key_reference r_key)
+ {
+ return (my_base::subscript_imp(r_key.first)[r_key.second]);
+ }
+
+ private:
+ value_type_adapter&
+ operator=(const value_type_adapter& r_other);
+ };
+
+#undef PB_ASSOC_CLASS_T_DEC
+
+#undef PB_ASSOC_CLASS_C_DEC
+
+#undef PB_ASSOC_BASE_C_DEC
+
+ } // namespace detail
+
+} // namespace pb_assoc
+
+#endif // #ifndef VALUE_TYPE_ADAPTER_HPP
+
diff --git a/libstdc++-v3/include/ext/pb_assoc/detail/value_type_adapter/value_type_traits.hpp b/libstdc++-v3/include/ext/pb_assoc/detail/value_type_adapter/value_type_traits.hpp
new file mode 100644
index 00000000000..75fdc42916e
--- /dev/null
+++ b/libstdc++-v3/include/ext/pb_assoc/detail/value_type_adapter/value_type_traits.hpp
@@ -0,0 +1,102 @@
+// -*- C++ -*-
+
+// 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.
+
+// As a special exception, you may use this file as part of a free software
+// library without restriction. Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General 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 value_type_traits.hpp
+ * Contains an adapter of mapping levels.
+ */
+
+template<typename Base_Key_,
+ typename Key_,
+ typename Data_,
+ class Allocator_ >
+struct value_type_traits_
+{
+ typedef std::pair< std::pair< Base_Key_, Key_>, Data_> value_type;
+
+ typedef
+ typename Allocator_::template rebind<
+ value_type>::other::reference
+ reference;
+
+ typedef
+ typename Allocator_::template rebind<
+ value_type>::other::const_reference
+ const_reference;
+
+ typedef
+ typename Allocator_::template rebind<
+ value_type>::other::pointer
+ pointer;
+
+ typedef
+ typename Allocator_::template rebind<
+ value_type>::other::const_pointer
+ const_pointer;
+};
+
+template<typename Base_Key_, typename Key_, class Allocator_>
+struct value_type_traits_<
+ Base_Key_,
+ Key_,
+ null_data_type,
+ Allocator_>
+{
+ typedef std::pair< Base_Key_, Key_> value_type;
+
+ typedef
+ typename Allocator_::template rebind<
+ value_type>::other::const_reference
+ reference;
+
+ typedef
+ typename Allocator_::template rebind<
+ value_type>::other::const_reference
+ const_reference;
+
+ typedef
+ typename Allocator_::template rebind<
+ value_type>::other::const_pointer
+ pointer;
+
+ typedef
+ typename Allocator_::template rebind<
+ value_type>::other::const_pointer
+ const_pointer;
+};
diff --git a/libstdc++-v3/include/ext/pb_assoc/ds_trait.hpp b/libstdc++-v3/include/ext/pb_assoc/ds_trait.hpp
new file mode 100644
index 00000000000..403b2e558c6
--- /dev/null
+++ b/libstdc++-v3/include/ext/pb_assoc/ds_trait.hpp
@@ -0,0 +1,125 @@
+// -*- C++ -*-
+
+// 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.
+
+// As a special exception, you may use this file as part of a free software
+// library without restriction. Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General 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 ds_trait.hpp
+ * Contains data-structure traits.
+ */
+
+#ifndef DS_TRAIT_HPP
+#define DS_TRAIT_HPP
+
+#include <ext/pb_assoc/detail/type_utils.hpp>
+
+namespace pb_assoc
+{
+ struct basic_invalidation_guarantee
+ { };
+
+ struct find_invalidation_guarantee : public basic_invalidation_guarantee
+ { };
+
+ struct range_invalidation_guarantee : public find_invalidation_guarantee
+ { };
+
+ struct basic_ds_tag
+ { };
+
+ struct basic_hash_ds_tag : public basic_ds_tag
+ { };
+
+ struct cc_hash_ds_tag : public basic_hash_ds_tag
+ { };
+
+ struct gp_hash_ds_tag : public basic_hash_ds_tag
+ { };
+
+ struct basic_tree_ds_tag : public basic_ds_tag
+ { };
+
+ struct rb_tree_ds_tag : public basic_tree_ds_tag
+ { };
+
+ struct splay_tree_ds_tag : public basic_tree_ds_tag
+ { };
+
+ struct ov_tree_ds_tag : public basic_tree_ds_tag
+ { };
+
+ struct lu_ds_tag : public basic_ds_tag
+ { };
+
+ struct compound_ds_tag : public basic_ds_tag
+ { };
+
+#include <ext/pb_assoc/detail/ds_trait_imp.hpp>
+
+#define PB_ASSOC_BASE_C_DEC \
+ detail::data_structure_traits<Cntnr, typename Cntnr::ds_category>
+
+ template<typename Cntnr>
+ struct ds_traits
+ : private detail::data_structure_traits<Cntnr, typename Cntnr::ds_category>
+ {
+ public:
+ enum
+ {
+ erase_can_throw = PB_ASSOC_BASE_C_DEC::erase_can_throw,
+ order_preserving = PB_ASSOC_BASE_C_DEC::order_preserving,
+ erase_iterators = PB_ASSOC_BASE_C_DEC::erase_iterators,
+ reverse_iteration = PB_ASSOC_BASE_C_DEC::reverse_iteration,
+ split_join = PB_ASSOC_BASE_C_DEC::split_join
+ };
+
+ typedef typename PB_ASSOC_BASE_C_DEC::invalidation_guarantee
+ invalidation_guarantee;
+
+ /*
+ enum
+ {
+ split_join_can_throw = PB_ASSOC_BASE_C_DEC::split_join_can_throw
+ };
+ */
+ };
+
+#undef PB_ASSOC_BASE_C_DEC
+
+} // namespace pb_assoc
+
+#endif // #ifndef DS_TRAIT_HPP
diff --git a/libstdc++-v3/include/ext/pb_assoc/exception.hpp b/libstdc++-v3/include/ext/pb_assoc/exception.hpp
new file mode 100644
index 00000000000..ef7daf89ada
--- /dev/null
+++ b/libstdc++-v3/include/ext/pb_assoc/exception.hpp
@@ -0,0 +1,69 @@
+// -*- C++ -*-
+
+// 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.
+
+// As a special exception, you may use this file as part of a free software
+// library without restriction. Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General 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 pb_assoc_ex.hpp
+ * Contains exception classes for pb_assoc.
+ */
+
+#ifndef EXCEPTION_HPP
+#define EXCEPTION_HPP
+
+#include <stdexcept>
+
+namespace pb_assoc
+{
+ struct pb_assoc_ex : public std::logic_error
+ {
+ pb_assoc_ex() : std::logic_error("pb_assoc exception") { }
+ };
+
+ struct cannot_insert : public pb_assoc_ex
+ { };
+
+ // An join cannot be performed for logical reasons (i.e., the ranges of
+ // the two container objects being joined overlaps.)
+ struct cannot_join : public cannot_insert
+ { };
+
+ struct cannot_resize : public cannot_insert
+ { };
+} // namespace pb_assoc
+
+#endif // #ifndef EXCEPTION_HPP
diff --git a/libstdc++-v3/include/ext/pb_assoc/hash_policy.hpp b/libstdc++-v3/include/ext/pb_assoc/hash_policy.hpp
new file mode 100644
index 00000000000..43bd16e4452
--- /dev/null
+++ b/libstdc++-v3/include/ext/pb_assoc/hash_policy.hpp
@@ -0,0 +1,717 @@
+// -*- C++ -*-
+
+// 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.
+
+// As a special exception, you may use this file as part of a free software
+// library without restriction. Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General 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 hash_policy.hpp
+ * Contains hash-related policies.
+ */
+
+#ifndef HASH_POLICY_HPP
+#define HASH_POLICY_HPP
+
+#include <algorithm>
+#include <vector>
+#include <cmath>
+#include <ext/pb_assoc/exception.hpp>
+#include <ext/pb_assoc/detail/hash_fn/mask_based_range_hashing.hpp>
+#include <ext/pb_assoc/detail/hash_fn/mod_based_range_hashing.hpp>
+#include <ext/pb_assoc/detail/resize_policy/size_base.hpp>
+
+namespace pb_assoc
+{
+ struct null_hash_fn
+ { };
+
+ struct null_probe_fn
+ { };
+
+#define PB_ASSOC_CLASS_T_DEC \
+ template<typename Const_Key_Ref, typename Size_Type>
+
+#define PB_ASSOC_CLASS_C_DEC \
+ linear_probe_fn< \
+ Const_Key_Ref, \
+ Size_Type>
+
+ template<typename Const_Key_Ref, typename Size_Type = size_t>
+ class linear_probe_fn
+ {
+ public:
+ typedef Size_Type size_type;
+
+ void
+ swap(PB_ASSOC_CLASS_C_DEC& r_other);
+
+ protected:
+ inline size_type
+ operator()(Const_Key_Ref r_key, size_type i) const;
+ };
+
+#include <ext/pb_assoc/detail/hash_fn/linear_probe_fn_imp.hpp>
+
+#undef PB_ASSOC_CLASS_T_DEC
+#undef PB_ASSOC_CLASS_C_DEC
+
+#define PB_ASSOC_CLASS_T_DEC \
+ template<class Const_Key_Ref, typename Size_Type>
+
+#define PB_ASSOC_CLASS_C_DEC \
+ quadratic_probe_fn<Const_Key_Ref, Size_Type>
+
+ template<typename Const_Key_Ref, typename Size_Type = size_t>
+ class quadratic_probe_fn
+ {
+ public:
+ typedef Size_Type size_type;
+
+ void
+ swap(PB_ASSOC_CLASS_C_DEC& r_other);
+
+ protected:
+ inline size_type
+ operator()(Const_Key_Ref r_key, size_type i) const;
+ };
+
+#include <ext/pb_assoc/detail/hash_fn/quadratic_probe_fn_imp.hpp>
+
+#undef PB_ASSOC_CLASS_T_DEC
+#undef PB_ASSOC_CLASS_C_DEC
+
+#define PB_ASSOC_CLASS_T_DEC \
+ template<typename Size_Type>
+
+#define PB_ASSOC_CLASS_C_DEC \
+ direct_mask_range_hashing<Size_Type>
+
+ template<typename Size_Type = size_t>
+ class direct_mask_range_hashing
+ : public pb_assoc::detail::mask_based_range_hashing<Size_Type>
+ {
+ public:
+ typedef Size_Type size_type;
+
+ void
+ swap(PB_ASSOC_CLASS_C_DEC& r_other);
+
+ protected:
+ void
+ notify_resized(size_type size);
+
+ inline size_type
+ operator()(size_type hash) const;
+
+ private:
+ typedef pb_assoc::detail::mask_based_range_hashing<Size_Type>
+ my_mask_based_base;
+ };
+
+#define PB_ASSOC_MASK_BASED_C_DEC \
+ pb_assoc::detail::mask_based_range_hashing< \
+ Size_Type>
+
+#include <ext/pb_assoc/detail/hash_fn/direct_mask_range_hashing_imp.hpp>
+
+#undef PB_ASSOC_CLASS_T_DEC
+#undef PB_ASSOC_CLASS_C_DEC
+
+#undef PB_ASSOC_MASK_BASED_C_DEC
+
+#define PB_ASSOC_CLASS_T_DEC \
+ template<typename Size_Type>
+
+#define PB_ASSOC_CLASS_C_DEC \
+ direct_mod_range_hashing<Size_Type>
+
+#define PB_ASSOC_MOD_BASED_C_DEC \
+ pb_assoc::detail::mod_based_range_hashing<Size_Type>
+
+ template<typename Size_Type = size_t>
+ class direct_mod_range_hashing : public PB_ASSOC_MOD_BASED_C_DEC
+ {
+ public:
+ typedef Size_Type size_type;
+
+ void
+ swap(PB_ASSOC_CLASS_C_DEC& r_other);
+
+ protected:
+ /*
+ * description = "Notifies the policy object that the container's
+ * __size has changed to size.">
+ **/
+ void
+ notify_resized(size_type size);
+
+ inline size_type
+ operator()(size_type hash) const;
+
+ private:
+ typedef PB_ASSOC_MOD_BASED_C_DEC my_mod_based_base;
+ };
+
+#include <ext/pb_assoc/detail/hash_fn/direct_mod_range_hashing_imp.hpp>
+
+#undef PB_ASSOC_CLASS_T_DEC
+#undef PB_ASSOC_CLASS_C_DEC
+
+#undef PB_ASSOC_MOD_BASED_C_DEC
+
+#ifdef PB_ASSOC_HT_LOAD_CHECK_RESIZE_TRIGGER_DEBUG
+#define PB_ASSOC_DBG_ASSERT(X) assert(X)
+#define PB_ASSOC_DBG_VERIFY(X) assert(X)
+#define PB_ASSOC_DBG_ONLY(X) X
+#else // #ifdef PB_ASSOC_HT_LOAD_CHECK_RESIZE_TRIGGER_DEBUG
+#define PB_ASSOC_DBG_ASSERT(X)
+#define PB_ASSOC_DBG_VERIFY(X) {if((X)==0);}
+#define PB_ASSOC_DBG_ONLY(X) ;
+#endif // #ifdef PB_ASSOC_HT_LOAD_CHECK_RESIZE_TRIGGER_DEBUG
+
+#define PB_ASSOC_CLASS_T_DEC \
+ template<bool External_Load_Access, typename Size_Type>
+
+#define PB_ASSOC_CLASS_C_DEC \
+ hash_load_check_resize_trigger<External_Load_Access, Size_Type>
+
+#define PB_ASSOC_SIZE_BASE_C_DEC \
+ pb_assoc::detail::size_base<Size_Type, External_Load_Access>
+
+ template<bool External_Load_Access = false, typename Size_Type = size_t>
+ class hash_load_check_resize_trigger : private PB_ASSOC_SIZE_BASE_C_DEC
+ {
+ public:
+ typedef Size_Type size_type;
+
+ enum
+ {
+ external_load_access = External_Load_Access
+ };
+
+ hash_load_check_resize_trigger(float load_min = 0.125,
+ float load_max = 0.5);
+
+ void
+ swap(PB_ASSOC_CLASS_C_DEC& r_other);
+
+ virtual
+ ~hash_load_check_resize_trigger();
+
+ inline std::pair<float, float>
+ get_loads() const;
+
+ void
+ set_loads(std::pair<float, float> load_pair);
+
+ protected:
+ inline void
+ notify_insert_search_start();
+
+ inline void
+ notify_insert_search_collision();
+
+ inline void
+ notify_insert_search_end();
+
+ inline void
+ notify_find_search_start();
+
+ inline void
+ notify_find_search_collision();
+
+ inline void
+ notify_find_search_end();
+
+ inline void
+ notify_erase_search_start();
+
+ inline void
+ notify_erase_search_collision();
+
+ inline void
+ notify_erase_search_end();
+
+ inline void
+ notify_inserted(size_type num_entries);
+
+ inline void
+ notify_erased(size_type num_entries);
+
+ void
+ notify_cleared();
+
+ void
+ notify_resized(size_type new_size);
+
+ void
+ notify_externally_resized(size_type new_size);
+
+ inline bool
+ is_resize_needed() const;
+
+ inline bool
+ is_grow_needed(size_type size, size_type num_entries) const;
+
+ inline bool
+ is_shrink_needed(size_type size, size_type num_entries) const;
+
+ typedef PB_ASSOC_SIZE_BASE_C_DEC my_size_base;
+
+ private:
+ inline std::pair<float, float>
+ get_loads_imp(pb_assoc::detail::int_to_type<true>) const;
+
+ void
+ set_loads_imp(std::pair<float, float>,
+ pb_assoc::detail::int_to_type<true>);
+
+ virtual void
+ do_resize(size_type new_size);
+
+#ifdef PB_ASSOC_HT_LOAD_CHECK_RESIZE_TRIGGER_DEBUG
+ void
+ assert_valid() const;
+#endif // #ifdef PB_ASSOC_HT_LOAD_CHECK_RESIZE_TRIGGER_DEBUG
+
+ float m_load_min, m_load_max;
+
+ size_type m_next_shrink_size;
+
+ size_type m_next_grow_size;
+
+ bool m_resize_needed;
+
+ static pb_assoc::detail::int_to_type<External_Load_Access>
+ s_external_load_access_ind;
+ };
+
+#include <ext/pb_assoc/detail/resize_policy/hash_load_check_resize_trigger_imp.hpp>
+
+#undef PB_ASSOC_CLASS_T_DEC
+#undef PB_ASSOC_CLASS_C_DEC
+
+#undef PB_ASSOC_SIZE_BASE_C_DEC
+
+#undef PB_ASSOC_DBG_ASSERT
+#undef PB_ASSOC_DBG_VERIFY
+#undef PB_ASSOC_DBG_ONLY
+
+#ifdef PB_ASSOC_HT_MAX_COLLISION_CHECK_RESIZE_TRIGGER_POLICY_DEBUG
+#define PB_ASSOC_DBG_ASSERT(X) assert(X)
+#define PB_ASSOC_DBG_VERIFY(X) assert(X)
+#define PB_ASSOC_DBG_ONLY(X) X
+#else // #ifdef PB_ASSOC_HT_MAX_COLLISION_CHECK_RESIZE_TRIGGER_POLICY_DEBUG
+#define PB_ASSOC_DBG_ASSERT(X)
+#define PB_ASSOC_DBG_VERIFY(X) {if((X)==0);}
+#define PB_ASSOC_DBG_ONLY(X) ;
+#endif // #ifdef PB_ASSOC_HT_MAX_COLLISION_CHECK_RESIZE_TRIGGER_POLICY_DEBUG
+
+#define PB_ASSOC_CLASS_T_DEC \
+ template<bool External_Load_Access, typename Size_Type>
+
+#define PB_ASSOC_CLASS_C_DEC \
+ cc_hash_max_collision_check_resize_trigger< \
+ External_Load_Access, \
+ Size_Type>
+
+ template<bool External_Load_Access = false, typename Size_Type = size_t>
+ class cc_hash_max_collision_check_resize_trigger
+ {
+ public:
+ typedef Size_Type size_type;
+
+ enum
+ {
+ external_load_access = External_Load_Access
+ };
+
+ cc_hash_max_collision_check_resize_trigger(float load = 0.5);
+
+ void
+ swap(PB_ASSOC_CLASS_C_DEC& r_other);
+
+ inline float
+ get_load() const;
+
+ protected:
+ inline void
+ notify_insert_search_start();
+
+ inline void
+ notify_insert_search_collision();
+
+ inline void
+ notify_insert_search_end();
+
+ inline void
+ notify_find_search_start();
+
+ inline void
+ notify_find_search_collision();
+
+ inline void
+ notify_find_search_end();
+
+ inline void
+ notify_erase_search_start();
+
+ inline void
+ notify_erase_search_collision();
+
+ inline void
+ notify_erase_search_end();
+
+ inline void
+ notify_inserted(size_type num_entries);
+
+ inline void
+ notify_erased(size_type num_entries);
+
+ void
+ notify_cleared();
+
+ void
+ notify_resized(size_type new_size);
+
+ void
+ notify_externally_resized(size_type new_size);
+
+ inline bool
+ is_resize_needed() const;
+
+ inline bool
+ is_grow_needed(size_type size, size_type num_entries) const;
+
+ inline bool
+ is_shrink_needed(size_type size, size_type num_entries) const;
+
+ private:
+ template<typename Key>
+ class max_col_checker
+ {
+ public:
+ max_col_checker(size_type size, size_type* p_max_col)
+ : m_p_max_col(p_max_col), m_a_col(size, 0)
+ { }
+
+ void
+ operator()(const std::pair<const Key, size_type>& r_key_pos_pair)
+ { ++m_a_col[r_key_pos_pair.second]; }
+
+ private:
+ std::vector<size_type> m_a_col;
+
+ size_type* const m_p_max_col;
+ };
+
+ private:
+ inline float
+ get_load_imp(pb_assoc::detail::int_to_type<true>) const;
+
+ float m_load;
+
+ size_type m_size;
+
+ size_type m_num_col;
+
+ size_type m_max_col;
+
+ bool m_resize_needed;
+
+ static pb_assoc::detail::int_to_type<External_Load_Access>
+ s_external_load_access_ind;
+ };
+
+#include <ext/pb_assoc/detail/resize_policy/cc_hash_max_collision_resize_trigger_imp.hpp>
+
+#undef PB_ASSOC_CLASS_T_DEC
+#undef PB_ASSOC_CLASS_C_DEC
+
+#undef PB_ASSOC_DBG_ASSERT
+#undef PB_ASSOC_DBG_VERIFY
+#undef PB_ASSOC_DBG_ONLY
+
+#define PB_ASSOC_CLASS_T_DEC \
+ template<typename Size_Type>
+
+#define PB_ASSOC_CLASS_C_DEC \
+ hash_exponential_size_policy< \
+ Size_Type>
+
+ template<typename Size_Type = size_t>
+ class hash_exponential_size_policy
+ {
+ public:
+ typedef Size_Type size_type;
+
+ hash_exponential_size_policy(size_type start_size = 8,
+ size_type grow_factor = 2);
+
+ void
+ swap(PB_ASSOC_CLASS_C_DEC& r_other);
+
+ protected:
+ size_type
+ get_init_size(size_type suggested_size) const;
+
+ size_type
+ get_nearest_larger_size(size_type cur_size) const;
+
+ size_type
+ get_nearest_smaller_size(size_type cur_size) const;
+
+#ifdef PB_ASSOC_HT_EXPONENTIAL_SIZE_POLICY_DEBUG
+ void
+ assert_is_one_of_my_sizes(size_type size) const;
+#endif // #ifdef PB_ASSOC_HT_EXPONENTIAL_SIZE_POLICY_DEBUG
+
+ private:
+ size_type m_start_size;
+ size_type m_grow_factor;
+ };
+
+#include <ext/pb_assoc/detail/resize_policy/hash_exponential_size_policy_imp.hpp>
+
+#undef PB_ASSOC_CLASS_T_DEC
+#undef PB_ASSOC_CLASS_C_DEC
+
+#undef PB_ASSOC_DBG_ASSERT
+#undef PB_ASSOC_DBG_VERIFY
+#undef PB_ASSOC_DBG_ONLY
+
+#define PB_ASSOC_CLASS_T_DEC
+
+#define PB_ASSOC_CLASS_C_DEC \
+ hash_prime_size_policy
+
+#ifdef PB_ASSOC_HT_PRIME_SIZE_POLICY_DEBUG
+#define PB_ASSOC_DBG_ASSERT(X) assert(X)
+#define PB_ASSOC_DBG_VERIFY(X) assert(X)
+#define PB_ASSOC_DBG_ONLY(X) X
+#else // #ifdef PB_ASSOC_HT_PRIME_SIZE_POLICY_DEBUG
+#define PB_ASSOC_DBG_ASSERT(X)
+#define PB_ASSOC_DBG_VERIFY(X) {if((X)==0);}
+#define PB_ASSOC_DBG_ONLY(X) ;
+#endif // #ifdef PB_ASSOC_HT_PRIME_SIZE_POLICY_DEBUG
+
+ struct hash_prime_size_policy
+ {
+ typedef size_t size_type;
+
+ inline void
+ swap(PB_ASSOC_CLASS_C_DEC& r_other);
+
+ protected:
+ inline size_type
+ get_init_size(size_type suggested_size) const;
+
+ inline size_type
+ get_nearest_larger_size(size_type cur_size) const;
+
+ inline size_type
+ get_nearest_smaller_size(size_type cur_size) const;
+
+ inline size_type
+ get_nearest_larger_size_imp(size_type size) const;
+
+#ifdef PB_ASSOC_HT_PRIME_SIZE_POLICY_DEBUG
+ void
+ assert_is_one_of_my_sizes(size_type size) const;
+#endif // #ifdef PB_ASSOC_HT_PRIME_SIZE_POLICY_DEBUG
+ };
+
+#include <ext/pb_assoc/detail/resize_policy/hash_prime_size_policy_imp.hpp>
+
+#undef PB_ASSOC_CLASS_T_DEC
+#undef PB_ASSOC_CLASS_C_DEC
+
+#undef PB_ASSOC_DBG_ASSERT
+#undef PB_ASSOC_DBG_VERIFY
+#undef PB_ASSOC_DBG_ONLY
+
+#define PB_ASSOC_CLASS_T_DEC \
+ template< \
+ class Size_Policy, \
+ class Trigger_Policy, \
+ bool External_Size_Access, \
+ typename Size_Type>
+
+#define PB_ASSOC_CLASS_C_DEC \
+ hash_standard_resize_policy< \
+ Size_Policy, \
+ Trigger_Policy, \
+ External_Size_Access, \
+ Size_Type>
+
+ template<class Size_Policy = pb_assoc::hash_exponential_size_policy<>,
+ class Trigger_Policy = pb_assoc::hash_load_check_resize_trigger<>,
+ bool External_Size_Access = false,
+ typename Size_Type = size_t>
+ class hash_standard_resize_policy : public Size_Policy, public Trigger_Policy
+ {
+ public:
+ typedef Size_Type size_type;
+ typedef Trigger_Policy trigger_policy;
+ typedef Size_Policy size_policy;
+
+ enum
+ {
+ external_size_access = External_Size_Access
+ };
+
+ hash_standard_resize_policy(size_type suggested_size = 8);
+
+ hash_standard_resize_policy(const Size_Policy&,
+ size_type suggested_size = 8);
+
+ hash_standard_resize_policy(const Size_Policy&, const Trigger_Policy&,
+ size_type suggested_size = 8);
+
+ virtual
+ ~hash_standard_resize_policy();
+
+ inline void
+ swap(PB_ASSOC_CLASS_C_DEC& r_other);
+
+ Size_Policy&
+ get_size_policy();
+
+ const Size_Policy&
+ get_size_policy() const;
+
+ Trigger_Policy&
+ get_trigger_policy();
+
+ const Trigger_Policy&
+ get_trigger_policy() const;
+
+ inline size_type
+ get_actual_size() const;
+
+ void
+ resize(size_type suggested_new_size);
+
+ protected:
+
+ inline void
+ notify_insert_search_start();
+
+ inline void
+ notify_insert_search_collision();
+
+ inline void
+ notify_insert_search_end();
+
+ inline void
+ notify_find_search_start();
+
+ inline void
+ notify_find_search_collision();
+
+ inline void
+ notify_find_search_end();
+
+ inline void
+ notify_erase_search_start();
+
+ inline void
+ notify_erase_search_collision();
+
+ inline void
+ notify_erase_search_end();
+
+ inline void
+ notify_inserted(size_type num_e);
+
+ inline void
+ notify_erased(size_type num_e);
+
+ void
+ notify_cleared();
+
+ void
+ notify_resized(size_type new_size);
+
+ size_type
+ get_init_size() const;
+
+ inline bool
+ is_resize_needed() const;
+
+ size_type
+ get_new_size(size_type size, size_type num_used_e) const;
+
+ private:
+ typedef Trigger_Policy my_trigger_policy_base;
+
+ typedef Size_Policy my_size_policy_base;
+
+ typedef
+ pb_assoc::detail::int_to_type<false>
+ external_resize_false_indicator;
+
+ typedef
+ pb_assoc::detail::int_to_type<true>
+ external_resize_true_indicator;
+
+ inline size_type
+ get_actual_size(external_resize_true_indicator) const;
+
+ void
+ resize(size_type new_size, external_resize_true_indicator);
+
+ virtual void
+ do_resize(size_type new_size);
+
+ static pb_assoc::detail::int_to_type<External_Size_Access>
+ s_external_size_access_indicator;
+
+ size_type m_size;
+ };
+
+#include <ext/pb_assoc/detail/resize_policy/hash_standard_resize_policy_imp.hpp>
+
+#undef PB_ASSOC_CLASS_T_DEC
+#undef PB_ASSOC_CLASS_C_DEC
+
+#undef PB_ASSOC_DBG_ASSERT
+#undef PB_ASSOC_DBG_VERIFY
+#undef PB_ASSOC_DBG_ONLY
+
+} // namespace pb_assoc
+
+#endif // #ifndef HASH_POLICY_HPP
diff --git a/libstdc++-v3/include/ext/pb_assoc/lu_policy.hpp b/libstdc++-v3/include/ext/pb_assoc/lu_policy.hpp
new file mode 100644
index 00000000000..2c56bd98d0d
--- /dev/null
+++ b/libstdc++-v3/include/ext/pb_assoc/lu_policy.hpp
@@ -0,0 +1,181 @@
+// -*- C++ -*-
+
+// 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.
+
+// As a special exception, you may use this file as part of a free software
+// library without restriction. Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General 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 lu_policy.hpp
+ * Contains policies for list update containers.
+ */
+
+#ifndef LU_POLICY_HPP
+#define LU_POLICY_HPP
+
+namespace pb_assoc
+{
+ struct move_to_front_lu_metadata
+ { };
+
+#define PB_ASSOC_CLASS_T_DEC \
+ template<typename Metadata_Reference>
+
+#define PB_ASSOC_CLASS_C_DEC \
+ move_to_front_lu_policy<Metadata_Reference>
+
+ template<typename Metadata_Reference =
+ std::allocator<move_to_front_lu_metadata>::reference>
+ class move_to_front_lu_policy
+ {
+ public:
+ void
+ swap(PB_ASSOC_CLASS_C_DEC& r_other);
+
+ protected:
+ typedef move_to_front_lu_metadata metadata_type;
+
+ typedef Metadata_Reference metadata_reference;
+
+ metadata_type
+ operator()() const;
+
+ inline bool
+ operator()(metadata_reference r_data) const;
+ };
+
+#include <ext/pb_assoc/detail/lu_policy/mtf_lu_policy_imp.hpp>
+
+#undef PB_ASSOC_CLASS_T_DEC
+
+#undef PB_ASSOC_CLASS_C_DEC
+
+ template<typename Size_Type>
+ class counter_lu_policy_base;
+
+ template<typename Size_Type = size_t>
+ class counter_lu_metadata
+ {
+ public:
+ typedef Size_Type size_type;
+
+ private:
+ counter_lu_metadata(size_type init_count) : m_count(init_count)
+ { }
+
+ mutable size_type m_count;
+
+ friend class counter_lu_policy_base<Size_Type>;
+ };
+
+ template<typename Size_Type>
+ class counter_lu_policy_base;
+
+#define PB_ASSOC_CLASS_T_DEC \
+ template<typename Size_Type>
+
+#define PB_ASSOC_CLASS_C_DEC \
+ counter_lu_policy_base<Size_Type>
+
+ template<typename Size_Type>
+ class counter_lu_policy_base
+ {
+ protected:
+ typedef Size_Type size_type;
+
+ counter_lu_metadata<Size_Type>
+ operator()(size_type max_size) const;
+
+ template<typename Metadata_Reference>
+ bool
+ operator()(Metadata_Reference r_data, size_type m_max_count) const;
+ };
+
+#include <ext/pb_assoc/detail/lu_policy/counter_lu_metadata_imp.hpp>
+
+#undef PB_ASSOC_CLASS_T_DEC
+
+#undef PB_ASSOC_CLASS_C_DEC
+
+#define PB_ASSOC_CLASS_T_DEC \
+ template<typename Size_Type, typename Metadata_Reference>
+
+#define PB_ASSOC_CLASS_C_DEC \
+ counter_lu_policy<Size_Type, Metadata_Reference>
+
+ template<typename Size_Type = size_t,
+ typename Metadata_Reference =
+ typename std::allocator<counter_lu_metadata<Size_Type> >::reference>
+ class counter_lu_policy : private counter_lu_policy_base<Size_Type>
+ {
+ public:
+ typedef Size_Type size_type;
+
+ counter_lu_policy(size_type max_count = 5);
+
+ void
+ swap(PB_ASSOC_CLASS_C_DEC& r_other);
+
+ inline
+ size_type
+ get_max_count() const;
+
+ protected:
+
+ typedef counter_lu_metadata< Size_Type> metadata_type;
+
+ typedef Metadata_Reference metadata_reference;
+
+ metadata_type
+ operator()() const;
+
+ bool
+ operator()(metadata_reference r_data) const;
+
+ private:
+ typedef counter_lu_policy_base< Size_Type> my_base;
+
+ size_type m_max_count;
+ };
+
+#include <ext/pb_assoc/detail/lu_policy/counter_lu_policy_imp.hpp>
+
+#undef PB_ASSOC_CLASS_T_DEC
+
+#undef PB_ASSOC_CLASS_C_DEC
+
+} // namespace pb_assoc
+
+#endif // #ifndef LU_POLICY_HPP
diff --git a/libstdc++-v3/include/ext/pb_assoc/ms_trait.hpp b/libstdc++-v3/include/ext/pb_assoc/ms_trait.hpp
new file mode 100644
index 00000000000..dd73452ed60
--- /dev/null
+++ b/libstdc++-v3/include/ext/pb_assoc/ms_trait.hpp
@@ -0,0 +1,82 @@
+// -*- C++ -*-
+
+// 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.
+
+// As a special exception, you may use this file as part of a free software
+// library without restriction. Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General 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 ms_trait.hpp
+ * Contains mapping-semantic traits.
+ */
+
+#ifndef MS_TRAIT_HPP
+#define MS_TRAIT_HPP
+
+#include <ext/pb_assoc/data_type.hpp>
+#include <ext/pb_assoc/detail/mapping_level_imp.hpp>
+
+namespace pb_assoc
+{
+ struct basic_ms_tag
+ { };
+
+ struct data_enabled_ms_tag : public basic_ms_tag
+ { };
+
+ struct compound_data_enabled_ms_tag : public data_enabled_ms_tag
+ { };
+
+#include <ext/pb_assoc/detail/ms_trait_imp.hpp>
+
+#define PB_ASSOC_BASE_C_DEC \
+ detail::mapping_semantics_traits<Cntnr, typename Cntnr::ms_category>
+
+ template<typename Cntnr>
+ struct ms_traits : private PB_ASSOC_BASE_C_DEC
+ {
+ enum
+ {
+ has_data = PB_ASSOC_BASE_C_DEC::has_data,
+ has_compound_data = PB_ASSOC_BASE_C_DEC::has_compound_data,
+ mapping_level = PB_ASSOC_BASE_C_DEC::mapping_level
+ };
+ };
+
+#undef PB_ASSOC_BASE_C_DEC
+
+} // namespace pb_assoc
+
+#endif // #ifndef MS_TRAIT_HPP
diff --git a/libstdc++-v3/include/ext/pb_assoc/tree_policy.hpp b/libstdc++-v3/include/ext/pb_assoc/tree_policy.hpp
new file mode 100644
index 00000000000..67a37a1fc3b
--- /dev/null
+++ b/libstdc++-v3/include/ext/pb_assoc/tree_policy.hpp
@@ -0,0 +1,215 @@
+// -*- C++ -*-
+
+// 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.
+
+// As a special exception, you may use this file as part of a free software
+// library without restriction. Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General 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 tree_policy.hpp
+ * Contains tree-related policies.
+ */
+
+#ifndef TREE_POLICY_HPP
+#define TREE_POLICY_HPP
+
+#include <functional>
+#include <ext/pb_assoc/ms_trait.hpp>
+
+namespace pb_assoc
+{
+ struct null_node_updator
+ {
+ inline void
+ swap(null_node_updator& r_other);
+ };
+
+#include <ext/pb_assoc/detail/tree_policy/null_node_updator_imp.hpp>
+
+ template<typename Key, typename Allocator = std::allocator<char> >
+ class order_statistics_key
+ {
+ public:
+ typedef Allocator allocator;
+ typedef Key key_type;
+ typedef typename allocator::template rebind<Key>::other::const_reference
+ const_key_reference;
+ typedef typename allocator::template rebind<Key>::other::reference
+ key_reference;
+ typedef typename allocator::size_type size_type;
+
+ inline explicit
+ order_statistics_key(const_key_reference r_key = Key());
+
+ inline
+ operator key_reference();
+
+ inline
+ operator key_type() const;
+
+ private:
+ // The logical key of the entry.
+ key_type m_key;
+
+ // The number of entries in the subtree rooted at the node of
+ // this element.
+ mutable size_type m_rank;
+
+ template<typename Cntnr>
+ friend class order_by_key;
+
+ template<typename Some_Cmp_Fn, typename Some_Allocator>
+ friend class order_statistics_key_cmp;
+
+ template<typename Some_Key, typename Some_Allocator>
+ friend class order_statistics_node_updator;
+
+ template<typename Cntnr>
+ friend class find_by_order;
+
+ template<typename Cntnr, typename Some_Allocator>
+ friend class order_statistics_key_verifier;
+ };
+
+ template<typename Cmp_Fn, typename Allocator = std::allocator<char> >
+ class order_statistics_key_cmp
+ : public std::binary_function<
+ order_statistics_key<typename Cmp_Fn::first_argument_type, Allocator>,
+ order_statistics_key<typename Cmp_Fn::second_argument_type, Allocator>, bool>,
+ private Cmp_Fn
+ {
+ public:
+ typedef Allocator allocator;
+ typedef Cmp_Fn cmp_fn;
+
+ typedef
+ order_statistics_key<typename Cmp_Fn::first_argument_type, Allocator>
+ key_type;
+
+ typedef
+ typename allocator::template rebind<key_type>::other::const_reference
+ const_key_reference;
+
+ inline
+ order_statistics_key_cmp();
+
+ inline
+ order_statistics_key_cmp(const Cmp_Fn& r_cmp_fn);
+
+ inline bool
+ operator()(const_key_reference, const_key_reference) const;
+
+ inline cmp_fn&
+ get_cmp_fn();
+
+ inline const cmp_fn&
+ get_cmp_fn() const;
+ };
+
+#define PB_ASSOC_CLASS_C_DEC \
+ order_statistics_node_updator<Key, Allocator>
+
+ template<typename Key, typename Allocator = std::allocator<char> >
+ class order_statistics_node_updator
+ {
+ public:
+ typedef Allocator allocator;
+ typedef order_statistics_key< Key, Allocator> key_type;
+
+ typedef
+ typename Allocator::template rebind<key_type>::other::const_pointer
+ const_key_pointer;
+
+ inline void
+ swap(PB_ASSOC_CLASS_C_DEC& r_other);
+
+ inline void
+ operator()(const_key_pointer, const_key_pointer, const_key_pointer);
+
+ private:
+ typedef typename Allocator::size_type size_type;
+ };
+
+#undef PB_ASSOC_CLASS_C_DEC
+
+ template<class Cntnr>
+ class find_by_order
+ {
+ public:
+ typedef Cntnr cntnr;
+ typedef typename cntnr::iterator iterator;
+ typedef typename cntnr::const_iterator const_iterator;
+ typedef typename cntnr::size_type size_type;
+
+ inline iterator
+ operator()(Cntnr& r_c, size_type order) const;
+
+ inline const_iterator
+ operator()(const Cntnr& r_c, size_type order) const;
+
+ private:
+ typedef typename Cntnr::node_iterator node_iterator;
+ typedef typename Cntnr::const_iterator cntnr_const_it;
+ typedef typename Cntnr::iterator cntnr_it;
+
+ inline static iterator
+ find(Cntnr& r_c, size_type order);
+
+ inline static const_iterator
+ find(const Cntnr& r_c, size_type order);
+ };
+
+ template<class Cntnr>
+ class order_by_key
+ {
+ public:
+ typedef Cntnr cntnr;
+ typedef typename Cntnr::key_type order_statistics_key_type;
+ typedef typename order_statistics_key_type::key_type
+ underlying_key_type;
+ typedef typename cntnr::size_type size_type;
+
+ inline size_type
+ operator()(const Cntnr& r_c, const underlying_key_type& r_key) const;
+
+ private:
+ typedef typename cntnr::const_iterator cntnr_const_it;
+ typedef typename cntnr::iterator cntnr_it;
+ };
+
+#include <ext/pb_assoc/detail/tree_policy/order_statistics_imp.hpp>
+} // namespace pb_assoc
+
+#endif // #ifndef TREE_POLICY_HPP
diff --git a/libstdc++-v3/include/ext/pb_assoc/trivial_iterator_def.hpp b/libstdc++-v3/include/ext/pb_assoc/trivial_iterator_def.hpp
new file mode 100644
index 00000000000..aa7c0bb1b34
--- /dev/null
+++ b/libstdc++-v3/include/ext/pb_assoc/trivial_iterator_def.hpp
@@ -0,0 +1,58 @@
+// -*- C++ -*-
+
+// 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.
+
+// As a special exception, you may use this file as part of a free software
+// library without restriction. Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General 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 trivial_iterator_def.hpp
+ * Contains definitions for "trivial"-type iterators.
+ */
+
+#ifndef TRIVIAL_ITERATOR_DEF_HPP
+#define TRIVIAL_ITERATOR_DEF_HPP
+
+namespace pb_assoc
+{
+ struct trivial_iterator_tag
+ { };
+
+ // Prohibit moving trivial iterators.
+ typedef void trivial_iterator_difference_type;
+
+} // namespace pb_assoc
+
+#endif // #ifndef TRIVIAL_ITERATOR_DEF_HPP
diff --git a/libstdc++-v3/include/ext/typelist.h b/libstdc++-v3/include/ext/typelist.h
new file mode 100644
index 00000000000..e070ce251a6
--- /dev/null
+++ b/libstdc++-v3/include/ext/typelist.h
@@ -0,0 +1,368 @@
+// -*- C++ -*-
+
+// 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.
+
+// As a special exception, you may use this file as part of a free software
+// library without restriction. Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General 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 typelist.h
+ * Contains typelist_chain definitions.
+ * Typelists are an idea by Andrei Alexandrescu.
+ */
+
+#ifndef TYPELIST_HPP
+#define TYPELIST_HPP
+
+namespace __gnu_cxx
+{
+ // XXX namespace typelist
+ // struct typelist -> struct node
+
+ struct null_type { };
+
+ template<typename Root>
+ struct typelist
+ {
+ typedef Root root;
+ };
+
+ // Forward declarations of functors.
+ template<typename Hd, typename Typelist>
+ struct chain
+ {
+ typedef Hd head;
+ typedef Typelist tail;
+ };
+
+ template<typename Typelist0, typename Typelist1>
+ struct append;
+
+ template<typename Typelist_Typelist>
+ struct typelist_append;
+
+ template<typename Typelist, typename T>
+ struct contains;
+
+ template<typename Typelist, template<typename T> class Pred>
+ struct filter;
+
+ template<typename Typelist, int i>
+ struct at_index;
+
+ template<typename Fn, typename Typelist>
+ struct apply;
+
+ template<typename Typelist, template<typename T> class Transform>
+ struct transform;
+}
+
+
+namespace __gnu_cxx
+{
+namespace detail
+{
+ // #include <ext/detail/type_utils.h>
+ template<typename Type>
+ struct type_to_type
+ {
+ typedef Type type;
+ };
+
+ template<bool Cond, typename A, typename B>
+ struct cond_type;
+
+ template<typename A, typename B>
+ struct cond_type<true, A, B>
+ {
+ typedef A type;
+ };
+
+ template<typename A, typename B>
+ struct cond_type<false, A, B>
+ {
+ typedef B type;
+ };
+
+ // #include <ext/detail/apply.h>
+ template<typename Fn, typename Typelist_Chain>
+ struct apply_;
+
+ template<typename Fn, typename Hd, typename Tl>
+ struct apply_<Fn, chain<Hd, Tl> >
+ {
+ void
+ operator() (Fn& f)
+ {
+ f.operator()(type_to_type<Hd>());
+ apply_<Fn, Tl> next;
+ next(f);
+ }
+ };
+
+ template<typename Fn>
+ struct apply_<Fn, null_type>
+ {
+ void
+ operator()(Fn&) { }
+ };
+
+ // #include <ext/detail/append.h>
+ template<typename Typelist_Chain0, typename Typelist_Chain1>
+ struct append_;
+
+ template<typename Hd, typename Tl, typename Typelist_Chain>
+ struct append_<chain<Hd, Tl>, Typelist_Chain>
+ {
+ typedef append_<Tl, Typelist_Chain> append_type;
+ typedef chain<Hd, typename append_type::type> type;
+ };
+
+ template<typename Typelist_Chain>
+ struct append_<null_type, Typelist_Chain>
+ {
+ typedef Typelist_Chain type;
+ };
+
+ // #include <ext/detail/contains.h>
+ template<typename Typelist_Chain, typename T>
+ struct contains_;
+
+ template<typename T>
+ struct contains_<null_type, T>
+ {
+ enum
+ {
+ value = false
+ };
+ };
+
+ template<typename Hd, typename Tl, typename T>
+ struct contains_<chain<Hd, Tl>, T>
+ {
+ enum
+ {
+ value = contains_<Tl, T>::value
+ };
+ };
+
+ template<typename Tl, typename T>
+ struct contains_<chain<T, Tl>, T>
+ {
+ enum
+ {
+ value = true
+ };
+ };
+
+ // #include <ext/detail/filter.h>
+ template<typename Typelist_Chain, template<typename T> class Pred>
+ struct chain_filter_;
+
+ template<template<typename T> class Pred>
+ struct chain_filter_<null_type, Pred>
+ {
+ typedef null_type type;
+ };
+
+ template<typename Hd, typename Tl, template<typename T> class Pred>
+ struct chain_filter_<chain<Hd, Tl>, Pred>
+ {
+ enum
+ {
+ include_hd = Pred<Hd>::value
+ };
+
+ typedef typename chain_filter_<Tl, Pred>::type rest_type;
+ typedef chain<Hd, rest_type> chain_type;
+ typedef typename cond_type<include_hd, chain_type, rest_type>::type type;
+ };
+
+ // #include <ext/detail/at_index.h>
+ template<typename Typelist_Chain, int i>
+ struct chain_at_index_;
+
+ template<typename Hd, typename Tl>
+ struct chain_at_index_<chain<Hd, Tl>, 0>
+ {
+ typedef Hd type;
+ };
+
+ template<typename Hd, typename Tl, int i>
+ struct chain_at_index_<chain<Hd, Tl>, i>
+ {
+ typedef typename chain_at_index_<Tl, i - 1>::type type;
+ };
+
+ // #include <ext/detail/transform.h>
+ template<class Typelist_Chain, template<typename T> class Transform>
+ struct chain_transform_;
+
+ template<template<typename T> class Transform>
+ struct chain_transform_<null_type, Transform>
+ {
+ typedef null_type type;
+ };
+
+ template<class Hd, class Tl, template<typename T> class Transform>
+ struct chain_transform_<chain<Hd, Tl>, Transform>
+ {
+ typedef typename chain_transform_<Tl, Transform>::type rest_type;
+ typedef typename Transform<Hd>::type transform_type;
+ typedef chain<transform_type, rest_type> type;
+ };
+
+ // #include <ext/detail/typelist_append.h>
+ template<typename Typelist_Typelist_Chain>
+ struct typelist_append_;
+
+ template<typename Hd>
+ struct typelist_append_<chain<Hd, null_type> >
+ {
+ typedef chain<Hd, null_type> type;
+ };
+
+ template<typename Hd, typename Tl>
+ struct typelist_append_<chain< Hd, Tl> >
+ {
+ private:
+ typedef typename typelist_append_<Tl>::type rest;
+
+ public:
+ typedef typename append<Hd, typelist<rest> >::type::root type;
+ };
+} // namespace detail
+}
+
+
+namespace __gnu_cxx
+{
+ template<typename Fn, typename Typelist>
+ struct apply
+ {
+ void
+ operator()(Fn& f)
+ {
+ typedef typename Typelist::root root_type;
+ detail::apply_<Fn, root_type> a;
+ a(f);
+ }
+ };
+
+ template<typename Typelist0, typename Typelist1>
+ struct append
+ {
+ private:
+ typedef typename Typelist0::root root0_type;
+ typedef typename Typelist1::root root1_type;
+ typedef detail::append_<root0_type, root1_type> append_type;
+
+ public:
+ typedef typelist<typename append_type::type> type;
+ };
+
+ template<typename Typelist_Typelist>
+ struct typelist_append
+ {
+ private:
+ typedef typename Typelist_Typelist::root root_type;
+ typedef detail::typelist_append_<root_type> append_type;
+
+ public:
+ typedef typelist<typename append_type::type> type;
+ };
+
+ template<typename Typelist, typename T>
+ struct contains
+ {
+ typedef typename Typelist::root root_type;
+
+ enum
+ {
+ value = detail::contains_<root_type, T>::value
+ };
+ };
+
+ template<typename Typelist, template<typename T> class Pred>
+ struct filter
+ {
+ private:
+ typedef typename Typelist::root root_type;
+ typedef detail::chain_filter_<root_type, Pred> filter_type;
+
+ public:
+ typedef typelist<typename filter_type::type> type;
+ };
+
+ template<typename Typelist, int i>
+ struct at_index
+ {
+ typedef typename Typelist::root root_type;
+ typedef detail::chain_at_index_<root_type, i> index_type;
+
+ typedef typename index_type::type type;
+ };
+
+ template<typename Typelist, template<typename T> class Transform>
+ struct transform
+ {
+ private:
+ typedef typename Typelist::root root_type;
+ typedef detail::chain_transform_<root_type, Transform> transform_type;
+
+ public:
+ typedef typelist<typename transform_type::type> type;
+ };
+} // namespace __gnu_cxx
+
+
+#define _GLIBCXX_TYPELIST_CHAIN1(X0) __gnu_cxx::chain<X0, __gnu_cxx::null_type>
+#define _GLIBCXX_TYPELIST_CHAIN2(X0, X1) __gnu_cxx::chain<X0, _GLIBCXX_TYPELIST_CHAIN1(X1) >
+#define _GLIBCXX_TYPELIST_CHAIN3(X0, X1, X2) __gnu_cxx::chain<X0, _GLIBCXX_TYPELIST_CHAIN2(X1, X2) >
+#define _GLIBCXX_TYPELIST_CHAIN4(X0, X1, X2, X3) __gnu_cxx::chain<X0, _GLIBCXX_TYPELIST_CHAIN3(X1, X2, X3) >
+#define _GLIBCXX_TYPELIST_CHAIN5(X0, X1, X2, X3, X4) __gnu_cxx::chain<X0, _GLIBCXX_TYPELIST_CHAIN4(X1, X2, X3, X4) >
+#define _GLIBCXX_TYPELIST_CHAIN6(X0, X1, X2, X3, X4, X5) __gnu_cxx::chain<X0, _GLIBCXX_TYPELIST_CHAIN5(X1, X2, X3, X4, X5) >
+#define _GLIBCXX_TYPELIST_CHAIN7(X0, X1, X2, X3, X4, X5, X6) __gnu_cxx::chain<X0, _GLIBCXX_TYPELIST_CHAIN6(X1, X2, X3, X4, X5, X6) >
+#define _GLIBCXX_TYPELIST_CHAIN8(X0, X1, X2, X3, X4, X5, X6, X7) __gnu_cxx::chain<X0, _GLIBCXX_TYPELIST_CHAIN7(X1, X2, X3, X4, X5, X6, X7) >
+#define _GLIBCXX_TYPELIST_CHAIN9(X0, X1, X2, X3, X4, X5, X6, X7, X8) __gnu_cxx::chain<X0, _GLIBCXX_TYPELIST_CHAIN8(X1, X2, X3, X4, X5, X6, X7, X8) >
+#define _GLIBCXX_TYPELIST_CHAIN10(X0, X1, X2, X3, X4, X5, X6, X7, X8, X9) __gnu_cxx::chain<X0, _GLIBCXX_TYPELIST_CHAIN9(X1, X2, X3, X4, X5, X6, X7, X8, X9) >
+#define _GLIBCXX_TYPELIST_CHAIN11(X0, X1, X2, X3, X4, X5, X6, X7, X8, X9, X10) __gnu_cxx::chain<X0, _GLIBCXX_TYPELIST_CHAIN10(X1, X2, X3, X4, X5, X6, X7, X8, X9, X10) >
+#define _GLIBCXX_TYPELIST_CHAIN12(X0, X1, X2, X3, X4, X5, X6, X7, X8, X9, X10, X11) __gnu_cxx::chain<X0, _GLIBCXX_TYPELIST_CHAIN11(X1, X2, X3, X4, X5, X6, X7, X8, X9, X10, X11) >
+#define _GLIBCXX_TYPELIST_CHAIN13(X0, X1, X2, X3, X4, X5, X6, X7, X8, X9, X10, X11, X12) __gnu_cxx::chain<X0, _GLIBCXX_TYPELIST_CHAIN12(X1, X2, X3, X4, X5, X6, X7, X8, X9, X10, X11, X12) >
+#define _GLIBCXX_TYPELIST_CHAIN14(X0, X1, X2, X3, X4, X5, X6, X7, X8, X9, X10, X11, X12, X13) __gnu_cxx::chain<X0, _GLIBCXX_TYPELIST_CHAIN13(X1, X2, X3, X4, X5, X6, X7, X8, X9, X10, X11, X12, X13) >
+#define _GLIBCXX_TYPELIST_CHAIN15(X0, X1, X2, X3, X4, X5, X6, X7, X8, X9, X10, X11, X12, X13, X14) __gnu_cxx::chain<X0, _GLIBCXX_TYPELIST_CHAIN14(X1, X2, X3, X4, X5, X6, X7, X8, X9, X10, X11, X12, X13, X14) >
+
+#endif
+
diff --git a/libstdc++-v3/testsuite/Makefile.am b/libstdc++-v3/testsuite/Makefile.am
index facf63a900f..4924afaf406 100644
--- a/libstdc++-v3/testsuite/Makefile.am
+++ b/libstdc++-v3/testsuite/Makefile.am
@@ -119,4 +119,5 @@ check-performance: testsuite_files_performance ${performance_script}
# 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*
+ testsuite_* site.exp abi_check baseline_symbols *TEST* *.dat \
+ *.o *.cc
diff --git a/libstdc++-v3/testsuite/Makefile.in b/libstdc++-v3/testsuite/Makefile.in
index 6edbf028cfa..91e1874ebab 100644
--- a/libstdc++-v3/testsuite/Makefile.in
+++ b/libstdc++-v3/testsuite/Makefile.in
@@ -266,7 +266,8 @@ performance_script = ${glibcxx_srcdir}/scripts/check_performance
# 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*
+ testsuite_* site.exp abi_check baseline_symbols *TEST* *.dat \
+ *.o *.cc
all: all-am
diff --git a/libstdc++-v3/testsuite/ext/pb_assoc/example/basic_map.cc b/libstdc++-v3/testsuite/ext/pb_assoc/example/basic_map.cc
new file mode 100644
index 00000000000..50e66fde627
--- /dev/null
+++ b/libstdc++-v3/testsuite/ext/pb_assoc/example/basic_map.cc
@@ -0,0 +1,122 @@
+// -*- C++ -*-
+
+// 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.
+
+// As a special exception, you may use this file as part of a free software
+// library without restriction. Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General 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 basic_multimap_example.cpp
+ * A basic example showing how to use maps.
+ */
+
+// For various associative containers.
+#include <ext/pb_assoc/assoc_cntnr.hpp>
+// For cout, endl.
+#include <iostream>
+// For assert.
+#include <cassert>
+
+template<class Cntnr>
+void
+some_op_sequence(Cntnr c)
+{
+ assert(c.empty());
+ assert(c.size() == 0);
+
+ c.insert(std::make_pair(1, 'a'));
+
+ c[2] = 'b';
+
+ assert(!c.empty());
+ assert(c.size() == 2);
+
+ std::cout << "Key 1 is mapped to " << c[1] << std::endl;
+ std::cout << "Key 2 is mapped to " << c[2] << std::endl;
+
+ std::cout << std::endl << "All value types in the container:" << std::endl;
+ for (typename Cntnr::const_iterator it = c.begin(); it != c.end();
+ ++it)
+ std::cout << it->first << " -> " << it->second << std::endl;
+
+ std::cout << std::endl;
+
+ c.clear();
+
+ assert(c.empty());
+ assert(c.size() == 0);
+}
+
+int
+main()
+{
+ /*
+ * Perform operations on a collision-chaining hash set.
+ */
+ some_op_sequence(pb_assoc::cc_hash_assoc_cntnr<int, char>());
+
+ /*
+ * Perform operations on a general-probing hash set.
+ */
+ some_op_sequence(pb_assoc::gp_hash_assoc_cntnr<int, char>());
+
+ /*
+ * Perform operations on a red-black tree set.
+ */
+ some_op_sequence(pb_assoc::tree_assoc_cntnr<int, char>());
+
+ /*
+ * Perform operations on a splay tree set.
+ */
+ some_op_sequence(pb_assoc::tree_assoc_cntnr<
+ int,
+ char,
+ std::less<int>,
+ pb_assoc::splay_tree_ds_tag>());
+
+ /*
+ * Perform operations on a splay tree set.
+ */
+ some_op_sequence(pb_assoc::tree_assoc_cntnr<
+ int,
+ char,
+ std::less<int>,
+ pb_assoc::ov_tree_ds_tag>());
+
+ /*
+ * Perform operations on a list-update set.
+ */
+ some_op_sequence(pb_assoc::lu_assoc_cntnr<int, char>());
+}
diff --git a/libstdc++-v3/testsuite/ext/pb_assoc/example/basic_multimap.cc b/libstdc++-v3/testsuite/ext/pb_assoc/example/basic_multimap.cc
new file mode 100644
index 00000000000..fa1c8f12b28
--- /dev/null
+++ b/libstdc++-v3/testsuite/ext/pb_assoc/example/basic_multimap.cc
@@ -0,0 +1,110 @@
+// -*- C++ -*-
+
+// 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.
+
+// As a special exception, you may use this file as part of a free software
+// library without restriction. Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General 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 basic_multimap_example.cpp
+ * A basic example showing how to use multimaps.
+ */
+
+// For cout, endl
+#include <iostream>
+// For various associative containers.
+#include <ext/pb_assoc/assoc_cntnr.hpp>
+// For compound_data_type and null_data_type.
+#include <ext/pb_assoc/data_type.hpp>
+// For assert
+#include <cassert>
+
+template<class Cntnr>
+void
+some_op_sequence(Cntnr c)
+{
+ assert(c.empty());
+ assert(c.size() == 0);
+
+ c[1].insert('a');
+
+ c[2].insert('b');
+ c[2].insert('c');
+
+ assert(!c.empty());
+ assert(c.size() == 2);
+
+ std::cout << "Key 1 is mapped to " <<
+ static_cast<unsigned long>(c[1].size()) << " entries." << std::endl;
+
+ std::cout << "Key 2 is mapped to " <<
+ static_cast<unsigned long>(c[2].size()) << " entries." << std::endl;
+
+ std::cout << std::endl << "All values in the container:" << std::endl;
+
+ for (typename Cntnr::const_iterator it = c.begin(); it != c.end();
+ ++it)
+ {
+ std::cout << it->first << "->{ ";
+
+ for (typename Cntnr::data_type::const_iterator it_ = it->second.begin();
+ it_ != it->second.end(); ++it_)
+ std::cout <<* it_ << " ";
+
+ std::cout << "}" << std::endl;
+ }
+
+ std::cout << std::endl;
+
+ c.clear();
+
+ assert(c.empty());
+ assert(c.size() == 0);
+}
+
+int
+main()
+{
+ /*
+ * Perform operations on a collision-chaining hash-table of of
+ * red-black trees.
+ */
+ some_op_sequence(pb_assoc::cc_hash_assoc_cntnr<
+ int,
+ pb_assoc::compound_data_type<
+ pb_assoc::tree_assoc_cntnr<
+ char,
+ pb_assoc::null_data_type> > >());
+}
diff --git a/libstdc++-v3/testsuite/ext/pb_assoc/example/basic_set.cc b/libstdc++-v3/testsuite/ext/pb_assoc/example/basic_set.cc
new file mode 100644
index 00000000000..694a0f08958
--- /dev/null
+++ b/libstdc++-v3/testsuite/ext/pb_assoc/example/basic_set.cc
@@ -0,0 +1,120 @@
+// -*- C++ -*-
+
+// 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.
+
+// As a special exception, you may use this file as part of a free software
+// library without restriction. Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General 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 basic_set_example.cpp
+ * A basic example showing how to use sets.
+ */
+
+// For various associative containers.
+#include <ext/pb_assoc/assoc_cntnr.hpp>
+// For null_data_type
+#include <ext/pb_assoc/data_type.hpp>
+// For cout, endl
+#include <iostream>
+// For assert
+#include <cassert>
+
+template<class Cntnr>
+void
+some_op_sequence(Cntnr c)
+{
+ assert(c.empty());
+ assert(c.size() == 0);
+
+ c.insert(1);
+ c.insert(2);
+
+ assert(!c.empty());
+ assert(c.size() == 2);
+
+ std::cout << "All value types in the container:" << std::endl;
+ for (typename Cntnr::const_iterator it = c.begin(); it != c.end();
+ ++it)
+ std::cout <<* it << " ";
+
+ std::cout << std::endl;
+
+ c.clear();
+
+ assert(c.empty());
+ assert(c.size() == 0);
+}
+
+int
+main()
+{
+ /*
+ * Perform operations on a collision-chaining hash set.
+ */
+ some_op_sequence(pb_assoc::cc_hash_assoc_cntnr<int, pb_assoc::null_data_type>());
+
+ /*
+ * Perform operations on a general-probing hash set.
+ */
+ some_op_sequence(pb_assoc::gp_hash_assoc_cntnr<int, pb_assoc::null_data_type>());
+
+ /*
+ * Perform operations on a red-black tree set.
+ */
+ some_op_sequence(pb_assoc::tree_assoc_cntnr<int, pb_assoc::null_data_type>());
+
+ /*
+ * Perform operations on a splay tree set.
+ */
+ some_op_sequence(pb_assoc::tree_assoc_cntnr<
+ int,
+ pb_assoc::null_data_type,
+ std::less<int>,
+ pb_assoc::splay_tree_ds_tag>());
+
+ /*
+ * Perform operations on a splay tree set.
+ */
+ some_op_sequence(pb_assoc::tree_assoc_cntnr<
+ int,
+ pb_assoc::null_data_type,
+ std::less<int>,
+ pb_assoc::ov_tree_ds_tag>());
+
+ /*
+ * Perform operations on a list-update set.
+ */
+ some_op_sequence(pb_assoc::lu_assoc_cntnr<int, pb_assoc::null_data_type>());
+}
diff --git a/libstdc++-v3/testsuite/ext/pb_assoc/example/ds_traits.cc b/libstdc++-v3/testsuite/ext/pb_assoc/example/ds_traits.cc
new file mode 100644
index 00000000000..ef1f5f64031
--- /dev/null
+++ b/libstdc++-v3/testsuite/ext/pb_assoc/example/ds_traits.cc
@@ -0,0 +1,262 @@
+// -*- C++ -*-
+
+// 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.
+
+// As a special exception, you may use this file as part of a free software
+// library without restriction. Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General 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 ds_traits_example.cpp
+ * A basic example showing how to use ds_traits for querying container types
+ * for their behavior.
+ */
+
+// For various associative containers.
+#include <ext/pb_assoc/assoc_cntnr.hpp>
+// For ds_traits.
+#include <ext/pb_assoc/ds_trait.hpp>
+// For cout, endl.
+#include <iostream>
+
+template<class DS_Category>
+void
+print_ds_category(DS_Category);
+
+template<>
+void
+print_ds_category(pb_assoc::cc_hash_ds_tag)
+{
+ std::cout << "Collision-chaining hash based associative-container:" <<
+ std::endl;
+}
+
+template<>
+void
+print_ds_category(pb_assoc::gp_hash_ds_tag)
+{
+ std::cout << "Probing hash based associative-container:" <<
+ std::endl;
+}
+
+template<>
+void
+print_ds_category(pb_assoc::rb_tree_ds_tag)
+{
+ std::cout << "Red-black tree associative-container:" <<
+ std::endl;
+}
+
+template<>
+void
+print_ds_category(pb_assoc::splay_tree_ds_tag)
+{
+ std::cout << "Splay tree associative-container:" <<
+ std::endl;
+}
+
+template<>
+void
+print_ds_category(pb_assoc::ov_tree_ds_tag)
+{
+ std::cout << "Ordered-vector tree associative-container:" <<
+ std::endl;
+}
+
+template<>
+void
+print_ds_category(pb_assoc::lu_ds_tag)
+{
+ std::cout << "List-based associative-container:" <<
+ std::endl;
+}
+
+void
+print_erase_can_throw(bool can)
+{
+ if (can)
+ {
+ std::cout << "Erase can throw" << std::endl;
+
+ return;
+ }
+
+ std::cout << "Erase cannot throw" << std::endl;
+}
+
+void
+print_order_preserving(bool does)
+{
+ if (does)
+ {
+ std::cout << "Preserves order" << std::endl;
+
+ return;
+ }
+
+ std::cout << "Does not preserve order" << std::endl;
+}
+
+void
+print_erase_iterators(bool can)
+{
+ if (can)
+ {
+ std::cout << "Can erase iterators" << std::endl;
+
+ return;
+ }
+
+ std::cout << "Cannot erase iterators" << std::endl;
+}
+
+template<class Invalidation_Guarantee>
+void
+print_invalidation_guarantee(Invalidation_Guarantee);
+
+template<>
+void
+print_invalidation_guarantee(pb_assoc::basic_invalidation_guarantee)
+{
+ std::cout << "Guarantees only that found references, pointers, and "
+ "iterators are valid as long as the container object is not "
+ "modified" << std::endl;
+}
+
+template<>
+void
+print_invalidation_guarantee(pb_assoc::find_invalidation_guarantee)
+{
+ std::cout << "Guarantees that found references, pointers, and "
+ "find_iterators are valid even if the container object "
+ "is modified" << std::endl;
+}
+
+template<>
+void
+print_invalidation_guarantee(pb_assoc::range_invalidation_guarantee)
+{
+ std::cout << "Guarantees that iterators remain valid even if the "
+ "container object is modified" << std::endl;
+}
+
+void
+print_reverse_iteration(bool does)
+{
+ if (does)
+ {
+ std::cout << "Supports reverse iteration" << std::endl;
+
+ return;
+ }
+
+ std::cout << "Does not support reverse iteration" << std::endl;
+}
+
+void
+print_split_join(bool does)
+{
+ if (does)
+ {
+ std::cout << "Supports split and join" << std::endl;
+
+ return;
+ }
+
+ std::cout << "Does not support split and join" << std::endl;
+}
+
+template<class Cntnr>
+void
+print_container_attributes()
+{
+ // First print out the data-structure category.
+
+ print_ds_category(typename Cntnr::ds_category());
+
+ // Next is the data-structure traits class of the container.
+
+ typedef pb_assoc::ds_traits< Cntnr> traits;
+
+ // Now print the attributes of the container.
+
+ print_erase_can_throw(traits::erase_can_throw);
+
+ print_order_preserving(traits::order_preserving);
+
+ print_erase_iterators(traits::erase_iterators);
+
+ print_invalidation_guarantee(typename traits::invalidation_guarantee());
+
+ print_reverse_iteration(traits::reverse_iteration);
+
+ print_split_join(traits::split_join);
+
+ std::cout << std::endl << std::endl;
+}
+
+int
+main()
+{
+ print_container_attributes<pb_assoc::cc_hash_assoc_cntnr<int, char> >();
+
+ print_container_attributes<pb_assoc::gp_hash_assoc_cntnr<int, char> >();
+
+ print_container_attributes<pb_assoc::tree_assoc_cntnr<int, char> >();
+
+ print_container_attributes<pb_assoc::tree_assoc_cntnr<
+ int,
+ char,
+ std::less<int>,
+ pb_assoc::splay_tree_ds_tag> >();
+
+ print_container_attributes<pb_assoc::tree_assoc_cntnr<
+ int,
+ char,
+ std::less<int>,
+ pb_assoc::ov_tree_ds_tag> >();
+
+ print_container_attributes<pb_assoc::lu_assoc_cntnr<int, char> >();
+
+ typedef
+ pb_assoc::lu_assoc_cntnr<
+ int,
+ pb_assoc::compound_data_type<
+ pb_assoc::gp_hash_assoc_cntnr<
+ char,
+ pb_assoc::null_data_type> > >
+ mmap_t;
+
+ print_container_attributes<mmap_t>();
+}
diff --git a/libstdc++-v3/testsuite/ext/pb_assoc/example/erase_if.cc b/libstdc++-v3/testsuite/ext/pb_assoc/example/erase_if.cc
new file mode 100644
index 00000000000..91bc94ba7aa
--- /dev/null
+++ b/libstdc++-v3/testsuite/ext/pb_assoc/example/erase_if.cc
@@ -0,0 +1,133 @@
+// -*- C++ -*-
+
+// 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.
+
+// As a special exception, you may use this file as part of a free software
+// library without restriction. Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General 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 erase_if_example.cpp
+ * A basic example showing how to use erase_if.
+ */
+
+// For various associative containers.
+#include <ext/pb_assoc/assoc_cntnr.hpp>
+// For cout, endl.
+#include <iostream>
+// For assert.
+#include <cassert>
+
+struct between : public std::unary_function<
+ std::pair<const int, char>,
+ bool>
+{
+ between(int b, int e) : m_b(b),
+ m_e(e)
+ { }
+
+ inline bool
+ operator()(std::pair<const int, char>& r_val)
+ {
+ return (r_val.first >= m_b&& r_val.first < m_e);
+ }
+
+private:
+ const int m_b;
+ const int m_e;
+};
+
+template<class Cntnr>
+void
+some_op_sequence(Cntnr c)
+{
+ assert(c.empty());
+ assert(c.size() == 0);
+
+ for (int i = 0; i < 100; ++i)
+ c.insert(std::make_pair(i, static_cast<char>(i)));
+
+ assert(c.size() == 100);
+
+ /* Erase all values whose key is between 10 (inclusive)
+ * and 90 (non-inclusive).
+ */
+ c.erase_if(between(10 , 90));
+
+ assert(!c.empty());
+ assert(c.size() == 20);
+}
+
+int
+main()
+{
+
+ /*
+ * Perform operations on a list-update set.
+ */
+ some_op_sequence(pb_assoc::lu_assoc_cntnr<int, char>());
+
+ /*
+ * Perform operations on a collision-chaining hash set.
+ */
+ some_op_sequence(pb_assoc::cc_hash_assoc_cntnr<int, char>());
+
+ /*
+ * Perform operations on a general-probing hash set.
+ */
+ some_op_sequence(pb_assoc::gp_hash_assoc_cntnr<int, char>());
+
+ /*
+ * Perform operations on a red-black tree set.
+ */
+ some_op_sequence(pb_assoc::tree_assoc_cntnr<int, char>());
+
+ /*
+ * Perform operations on a splay tree set.
+ */
+ some_op_sequence(pb_assoc::tree_assoc_cntnr<
+ int,
+ char,
+ std::less<int>,
+ pb_assoc::splay_tree_ds_tag>());
+
+ /*
+ * Perform operations on a splay tree set.
+ */
+ some_op_sequence(pb_assoc::tree_assoc_cntnr<
+ int,
+ char,
+ std::less<int>,
+ pb_assoc::ov_tree_ds_tag>());
+}
diff --git a/libstdc++-v3/testsuite/ext/pb_assoc/example/extract_key.cc b/libstdc++-v3/testsuite/ext/pb_assoc/example/extract_key.cc
new file mode 100644
index 00000000000..3d830652891
--- /dev/null
+++ b/libstdc++-v3/testsuite/ext/pb_assoc/example/extract_key.cc
@@ -0,0 +1,132 @@
+// -*- C++ -*-
+
+// 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.
+
+// As a special exception, you may use this file as part of a free software
+// library without restriction. Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General 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 extract_key_example.cpp
+ * An example of extracting keys from values.
+ */
+
+// For various associative containers
+#include <ext/pb_assoc/assoc_cntnr.hpp>
+// For binary_function
+#include <functional>
+// For assert
+#include <cassert>
+
+using namespace std;
+
+/*
+ * A functor for checking whether two tables share exactly the
+ * same keys.
+ */
+template<class Cntnr0, class Cntnr1>
+struct compare_keys : public std::binary_function<
+ Cntnr0,
+ Cntnr1,
+ bool>
+{
+ bool
+ operator()(const Cntnr0& r_c0, const Cntnr1& r_c1)
+ {
+ // If the tables' sizes differ, they cannot share the same keys.
+ if (r_c0.size() != r_c1.size())
+ return (false);
+
+ // Loop and check each key.
+ for (typename Cntnr0::const_iterator it = r_c0.begin();
+ it != r_c0.end(); ++it)
+ if (r_c1.find(r_c0.extract_key(*it)) == r_c1.end())
+ return (false);
+
+ return (true);
+ };
+};
+
+template<class Cntnr0, class Cntnr1>
+bool
+key_equiv(const Cntnr0& r_c0, const Cntnr1& r_c1)
+{
+ return (compare_keys<Cntnr0, Cntnr1>()(r_c0, r_c1));
+}
+
+int
+main()
+{
+ /*
+ * A collision-chaining hash-based associative container
+ * mapping integers to characters.
+ */
+ pb_assoc::cc_hash_assoc_cntnr<int, char> c0;
+
+ /*
+ * A red-black tree-based associative container
+ * mapping integers to doubles.
+ */
+ pb_assoc::tree_assoc_cntnr<int, double> c1;
+
+ /*
+ * A list-update associative container storing integers.
+ */
+ pb_assoc::lu_assoc_cntnr<int, pb_assoc::null_data_type> c2;
+
+ /*
+ * Since the objects are initially empty, they
+ * should all be equivalent.
+ **/
+
+ assert(key_equiv(c0, c0));
+ assert(key_equiv(c0, c1));
+ assert(key_equiv(c0, c2));
+
+ // Insert some entries.
+
+ c0.insert(std::make_pair(1, 'a'));
+
+ c1.insert(std::make_pair(1, 'a'));
+ c1.insert(std::make_pair(2, 'b'));
+
+ c2.insert(1);
+
+ // Only c0 and c2 contain a single key with value 1.
+
+ assert(key_equiv(c0, c0));
+ assert(key_equiv(c0, c1) == false);
+ assert(key_equiv(c0, c2));
+}
+
diff --git a/libstdc++-v3/testsuite/ext/pb_assoc/example/hash_find_neg.cc b/libstdc++-v3/testsuite/ext/pb_assoc/example/hash_find_neg.cc
new file mode 100644
index 00000000000..177715b3be2
--- /dev/null
+++ b/libstdc++-v3/testsuite/ext/pb_assoc/example/hash_find_neg.cc
@@ -0,0 +1,73 @@
+// { dg-do compile }
+// -*- C++ -*-
+
+// 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.
+
+// As a special exception, you may use this file as part of a free software
+// library without restriction. Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General 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 bad_find_example.cpp
+ * A basic example showing how *not* to use unordered containers.
+ */
+
+// For cc_hash_assoc_cntnr.
+#include <ext/pb_assoc/assoc_cntnr.hpp>
+// For pair.
+#include <utility>
+
+int
+main()
+{
+ /*
+ * A collision-chaining hash table mapping ints to chars.
+ */
+ typedef pb_assoc::cc_hash_assoc_cntnr< int, char> map_t;
+
+ // An map_t object.
+ map_t h;
+
+ // Insert a value mapping the int 1 to the char 'a'.
+ h.insert(std::make_pair(1, 'a'));
+
+ /*
+ * Find the entry of the key '1' the* wrong* way.
+ * The following line will not compile, since map_t::find
+ * returns a find_iterator, which, by design, is not convertible
+ * to map_t::iterator.
+ */
+ map_t::iterator it = h.find(1); // { dg-error "conversion from" }
+}
+
diff --git a/libstdc++-v3/testsuite/ext/pb_assoc/example/hash_illegal_resize.cc b/libstdc++-v3/testsuite/ext/pb_assoc/example/hash_illegal_resize.cc
new file mode 100644
index 00000000000..4c8f960aeb5
--- /dev/null
+++ b/libstdc++-v3/testsuite/ext/pb_assoc/example/hash_illegal_resize.cc
@@ -0,0 +1,148 @@
+// -*- C++ -*-
+
+// 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.
+
+// As a special exception, you may use this file as part of a free software
+// library without restriction. Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General 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 hash_illegal_resize_example.cpp
+ * An example of externally resizing a hash-based container object.
+ */
+
+// For gp_hash_assoc_cntnr
+#include <ext/pb_assoc/assoc_cntnr.hpp>
+// For hash-related policies.
+#include <ext/pb_assoc/hash_policy.hpp>
+// For cannot_resize
+#include <ext/pb_assoc/exception.hpp>
+// For assert
+#include <cassert>
+
+/*
+ * A simple hash functor.
+ * std::hash could serve instead of this functor,
+ * but it is not yet standard everywhere.
+ */
+struct int_hash : public std::unary_function<
+ int,
+ size_t>
+{
+ inline size_t
+ operator()(const int& r_i) const
+ {
+ return (r_i);
+ }
+};
+
+int
+main()
+{
+ /*
+ * A probing hash table mapping ints to chars.
+ */
+ typedef
+ pb_assoc::gp_hash_assoc_cntnr<
+ int,
+ int,
+ int_hash,
+ std::equal_to<
+ int>,
+ // Combining function.
+ pb_assoc::direct_mod_range_hashing<>,
+ // Probe function.
+ pb_assoc::quadratic_probe_fn<
+ const int& >,
+ // Resize policy.
+ pb_assoc::hash_standard_resize_policy<
+ pb_assoc::hash_prime_size_policy,
+ pb_assoc::hash_load_check_resize_trigger<>,
+ /* Allow external access to size.
+ * Without setting this to true, external resizing
+ * is not possible.
+ */
+ true> >
+ map_t;
+
+ map_t g;
+
+ /*
+ * Check the actual size of the container object.
+ * This should be at least
+ * the initial size given by the size policy object.
+ **/
+ assert(g.get_actual_size() > 8);
+
+ // Insert some elements.
+
+ int i;
+
+ for (i = 0; i < 1000; ++i)
+ g[i] = 2* i;
+
+ // Check all ok.
+
+ assert(g.size() == 1000);
+
+ for (i = 0; i < 1000; ++i)
+ assert(g.find(i) != g.end()&& g.find(i)->second == 2* i);
+
+ // Now attempt to resize the table to 200 (impossible).
+
+ bool ex_thrown = false;
+
+ try
+ {
+ g.resize(200);
+ }
+ catch(pb_assoc::cannot_resize& )
+ {
+ ex_thrown = true;
+ }
+
+ /*
+ * Assert an exception was thrown. A probing table cannot contain
+ * 1000 entries in less than 1000 places.
+ */
+ assert(ex_thrown);
+
+ // Check all ok.
+
+ assert(g.size() == 1000);
+
+ for (i = 0; i < 1000; ++i)
+ assert(g.find(i) != g.end()&& g.find(i)->second == 2* i);
+}
+
diff --git a/libstdc++-v3/testsuite/ext/pb_assoc/example/hash_initial_size.cc b/libstdc++-v3/testsuite/ext/pb_assoc/example/hash_initial_size.cc
new file mode 100644
index 00000000000..efe533ff94e
--- /dev/null
+++ b/libstdc++-v3/testsuite/ext/pb_assoc/example/hash_initial_size.cc
@@ -0,0 +1,122 @@
+// -*- C++ -*-
+
+// 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.
+
+// As a special exception, you may use this file as part of a free software
+// library without restriction. Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General 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 gp_ht_map_resize_example.cpp
+ * An example of setting an initial size for a container object.
+ */
+
+// For gp_hash_assoc_cntnr
+#include <ext/pb_assoc/assoc_cntnr.hpp>
+// For hash-related policies.
+#include <ext/pb_assoc/hash_policy.hpp>
+// For assert
+#include <cassert>
+
+/*
+ * A simple hash functor.
+ * std::hash could serve instead of this functor,
+ * but it is not yet standard everywhere.
+ */
+struct int_hash : public std::unary_function<
+ int,
+ size_t>
+{
+ inline size_t
+ operator()(const int& r_i) const
+ {
+ return (r_i);
+ }
+};
+
+int
+main()
+{
+ // Resize policy type.
+ typedef
+ pb_assoc::hash_standard_resize_policy<
+ // Size-policy type.
+ pb_assoc::hash_exponential_size_policy<>,
+ // Trigger-policy type.
+ pb_assoc::hash_load_check_resize_trigger<>,
+ /* Allow external access to size.
+ * This is just used in this example for using the
+ * get_actual_size method (which won't be accessible without
+ * this flag.
+ */
+ true>
+ resize_policy_t;
+
+ /*
+ * A collision-probing hash table mapping ints to chars.
+ */
+ typedef
+ pb_assoc::gp_hash_assoc_cntnr<
+ int,
+ char,
+ int_hash,
+ std::equal_to<
+ int>,
+ // Combining function.
+ pb_assoc::direct_mask_range_hashing<>,
+ // Probe function.
+ pb_assoc::linear_probe_fn<
+ const int& >,
+ // Resize policy.
+ resize_policy_t>
+ map_t;
+
+ // A resize-policy object with suggested initial size 256.
+ resize_policy_t res(pb_assoc::hash_exponential_size_policy<>(256));
+
+ map_t g(int_hash(),
+ std::equal_to<int>(),
+ pb_assoc::direct_mask_range_hashing<>(),
+ pb_assoc::linear_probe_fn<const int& >(),
+ res);
+
+ /*
+ * Check the actual size of the container object. In this case,
+ * this should be the initial size given by the size policy object.
+ **/
+ assert(g.get_actual_size() >= 256);
+
+ assert(g.size() == 0);
+}
+
diff --git a/libstdc++-v3/testsuite/ext/pb_assoc/example/hash_load_set_change.cc b/libstdc++-v3/testsuite/ext/pb_assoc/example/hash_load_set_change.cc
new file mode 100644
index 00000000000..d387c8b8eae
--- /dev/null
+++ b/libstdc++-v3/testsuite/ext/pb_assoc/example/hash_load_set_change.cc
@@ -0,0 +1,152 @@
+// -*- C++ -*-
+
+// 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.
+
+// As a special exception, you may use this file as part of a free software
+// library without restriction. Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General 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 hash_load_set_change_example.cpp
+ * An example of setting and changing the load factor of a hash-based
+ * container object.
+ */
+
+// For cc_hash_assoc_cntnr.
+#include <ext/pb_assoc/assoc_cntnr.hpp>
+/*
+ * For hash_standard_resize_policy, hash_exponential_size_policy,
+ * and direct_mask_range_hashing.
+ */
+#include <ext/pb_assoc/hash_policy.hpp>
+// For unary_function.
+#include <functional>
+// For assert
+#include <cassert>
+
+/*
+ * A simple hash functor.
+ * std::hash could serve instead of this functor,
+ * but it is not yet standard everywhere.
+ */
+struct int_hash : public std::unary_function<
+ int,
+ size_t>
+{
+ inline size_t
+ operator()(int i) const
+ {
+ return (i);
+ }
+};
+
+int
+main()
+{
+ // A trigger policy type.
+ typedef pb_assoc::hash_load_check_resize_trigger< true> trigger_t;
+
+ // A resize policy type.
+ typedef
+ pb_assoc::hash_standard_resize_policy<
+ pb_assoc::hash_exponential_size_policy<>,
+ // Trigger type.
+ trigger_t,
+ /* Allow external access to size.
+ * This is not necessary for setting the load factor,
+ * but it allows to call get_actual_size.
+ */
+ true>
+ resize_t;
+
+ /*
+ * A collision-chaining hash table mapping ints to chars.
+ */
+ typedef
+ pb_assoc::cc_hash_assoc_cntnr<
+ int,
+ char,
+ int_hash,
+ std::equal_to<int>,
+ // Combining function.
+ pb_assoc::direct_mask_range_hashing<>,
+ // Resize policy.
+ resize_t>
+ map_t;
+
+ // A trigger policy object with load between 0.3 and 0.8.
+ trigger_t trigger(static_cast<float>(0.3), static_cast<float>(0.8));
+
+ // A resize policy object with the above trigger.
+ resize_t resize(pb_assoc::hash_exponential_size_policy<>(),
+ trigger);
+
+ map_t c(int_hash(),
+ std::equal_to<int>(),
+ pb_assoc::direct_mask_range_hashing<>(),
+ resize);
+
+ c[1] = 'a';
+
+ // Check the loads and sizes.
+
+ assert(c.get_loads().first == static_cast<float>(0.3));
+ assert(c.get_loads().second == static_cast<float>(0.8));
+
+ assert(c.get_actual_size() == 8);
+
+ assert(c.size() == 1);
+
+ /*
+ * Note that there is a discrepancy between the loads of the policy
+ * object and the actual size of the container object. This is
+ * because the container's construction performs an implicit external
+ * resize.
+ */
+
+ c[2] = 'b';
+ c[3] = 'c';
+ c[4] = 'd';
+
+ assert(c.get_actual_size() == 8);
+
+ // Change the loads. This causes (potentially) a resize.
+ c.set_loads(std::make_pair(
+ static_cast<float>(0.01),
+ static_cast<float>(0.05)));
+
+ // The loads actually changed.
+ assert(c.get_actual_size() > 8);
+}
+
diff --git a/libstdc++-v3/testsuite/ext/pb_assoc/example/hash_mod.cc b/libstdc++-v3/testsuite/ext/pb_assoc/example/hash_mod.cc
new file mode 100644
index 00000000000..f730b77b99d
--- /dev/null
+++ b/libstdc++-v3/testsuite/ext/pb_assoc/example/hash_mod.cc
@@ -0,0 +1,89 @@
+// -*- C++ -*-
+
+// 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.
+
+// As a special exception, you may use this file as part of a free software
+// library without restriction. Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General 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 hash_mod_example.cpp
+ * An example showing how to use a mod range-hasing function
+ */
+
+// For cc_hash_assoc_cntnr.
+#include <ext/pb_assoc/assoc_cntnr.hpp>
+// For direct_mask_range_hashing and hash_standard_resize_policy.
+#include <ext/pb_assoc/hash_policy.hpp>
+// For unary_function, binary_function.
+#include <functional>
+/*
+ * A simple hash functor.
+ * std::hash could serve instead of this functor,
+ * but it is not yet standard everywhere.
+ */
+struct int_hash : public std::unary_function<
+ int,
+ size_t>
+{
+ inline size_t
+ operator()(int i) const
+ {
+ return (i);
+ }
+};
+
+int
+main()
+{
+ /*
+ * A collision-chaining hash table mapping ints to chars.
+ */
+ typedef
+ pb_assoc::cc_hash_assoc_cntnr<
+ int,
+ char,
+ int_hash,
+ std::equal_to<int>,
+ // Combining function.
+ pb_assoc::direct_mod_range_hashing<> >
+ map_t;
+
+ map_t c;
+
+ c[32] = 'b';
+ c[1024] = 'c';
+ c[4096] = 'd';
+}
+
diff --git a/libstdc++-v3/testsuite/ext/pb_assoc/example/hash_resize.cc b/libstdc++-v3/testsuite/ext/pb_assoc/example/hash_resize.cc
new file mode 100644
index 00000000000..a510932acbb
--- /dev/null
+++ b/libstdc++-v3/testsuite/ext/pb_assoc/example/hash_resize.cc
@@ -0,0 +1,146 @@
+// -*- C++ -*-
+
+// 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.
+
+// As a special exception, you may use this file as part of a free software
+// library without restriction. Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General 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 hash_resize_example.cpp
+ * An example of externally resizing a map.
+ */
+
+// For gp_hash_assoc_cntnr.
+#include <ext/pb_assoc/assoc_cntnr.hpp>
+// For hash-related policies.
+#include <ext/pb_assoc/hash_policy.hpp>
+// For unary_function.
+#include <functional>
+// For assert
+#include <cassert>
+
+/*
+ * A simple hash functor.
+ * std::hash could serve instead of this functor,
+ * but it is not yet standard everywhere.
+ */
+struct int_hash : public std::unary_function<
+ int,
+ size_t>
+{
+ inline size_t
+ operator()(const int& r_i) const
+ {
+ return (r_i);
+ }
+};
+
+int
+main()
+{
+ /*
+ * A probing hash table mapping ints to chars.
+ */
+ typedef
+ pb_assoc::gp_hash_assoc_cntnr<
+ int,
+ char,
+ int_hash,
+ std::equal_to<
+ int>,
+ // Combining function.
+ pb_assoc::direct_mask_range_hashing<>,
+ // Probe function.
+ pb_assoc::linear_probe_fn<
+ int>,
+ // Resize policy.
+ pb_assoc::hash_standard_resize_policy<
+ pb_assoc::hash_exponential_size_policy<>,
+ pb_assoc::hash_load_check_resize_trigger<>,
+ /* Allow external access to size.
+ * Without setting this to true, external resizing
+ * is not possible.
+ */
+ true> >
+ map_t;
+
+ map_t g;
+
+ /*
+ * Check the actual size of the container object. In this case,
+ * this should be the initial size given by the size policy object.
+ **/
+ assert(g.get_actual_size() == 8);
+
+ // Insert some elements.
+
+ g[1] = 'a';
+ g[2] = 'b';
+ g[3] = 'c';
+
+ // Now resize the table upward.
+
+ g.resize(200);
+
+ /*
+ * Check the actual size of the container object.
+ * For the policy used in this example, the
+ * nearest larger size than 200 is 256.
+ **/
+ assert(g.get_actual_size() == 256);
+
+ g[67] = 'g';
+ g[22] = 'f';
+
+ // Regardless of the internal size, the logical size should be 5.
+ assert(g.size() == 5);
+
+ // Now resize the table downward.
+
+ g.resize(106);
+
+ /*
+ * Check the actual size of the container object.
+ * For the policy used in this example, the
+ * nearest larger size than 106 is 128.
+ **/
+ assert(g.get_actual_size() == 128);
+
+ g[37] = 'f';
+
+ // Regardless of the internal size, the logical size should be 5.
+ assert(g.size() == 6);
+}
+
diff --git a/libstdc++-v3/testsuite/ext/pb_assoc/example/hash_resize_neg.cc b/libstdc++-v3/testsuite/ext/pb_assoc/example/hash_resize_neg.cc
new file mode 100644
index 00000000000..439939cb894
--- /dev/null
+++ b/libstdc++-v3/testsuite/ext/pb_assoc/example/hash_resize_neg.cc
@@ -0,0 +1,73 @@
+// { dg-do compile }
+// -*- C++ -*-
+
+// 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.
+
+// As a special exception, you may use this file as part of a free software
+// library without restriction. Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General 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 hash_bad_resize_example.cpp
+ * An example showing how *not* to resize a hash-based container.
+ */
+
+// For cc_hash_assoc_cntnr
+#include <ext/pb_assoc/assoc_cntnr.hpp>
+// For assert
+#include <cassert>
+
+int
+main()
+{
+ /*
+ * A collision-chaining hash table mapping ints to chars.
+ */
+ typedef pb_assoc::cc_hash_assoc_cntnr< int, char> map_t;
+
+ // An map_t object.
+ map_t h;
+
+ /*
+ * Following line won't compile. The resize policy needs to be configured
+ *to allow external resize (by default, this is not available).
+ */
+ h.resize(20);
+}
+
+// { dg-error "instantiated" "" { target *-*-* } 66 }
+// { dg-error "no matching function" "" { target *-*-* } 263 }
+// { dg-error "candidates are" "" { target *-*-* } 261 }
+// { dg-error "void" "" { target *-*-* } 269 }
+// { dg-excess-errors "" { target *-*-* } }
diff --git a/libstdc++-v3/testsuite/ext/pb_assoc/example/hash_shift_mask.cc b/libstdc++-v3/testsuite/ext/pb_assoc/example/hash_shift_mask.cc
new file mode 100644
index 00000000000..3e509e46387
--- /dev/null
+++ b/libstdc++-v3/testsuite/ext/pb_assoc/example/hash_shift_mask.cc
@@ -0,0 +1,130 @@
+// -*- C++ -*-
+
+// 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.
+
+// As a special exception, you may use this file as part of a free software
+// library without restriction. Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General 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 hash_shift_mask_example.cpp
+ * An example showing how to write a range-hasing functor.
+ */
+
+// For cc_hash_assoc_cntnr.
+#include <ext/pb_assoc/assoc_cntnr.hpp>
+// For hash-related policies.
+#include <ext/pb_assoc/hash_policy.hpp>
+// For unary_function and binary_function
+#include <functional>
+
+/*
+ * A simple hash functor.
+ * std::hash could serve instead of this functor,
+ * but it is not yet standard everywhere.
+ */
+struct simple_int_hash : public std::unary_function<
+ int,
+ size_t>
+{
+ inline size_t
+ operator()(int i) const
+ {
+ return (i);
+ }
+};
+
+// A range-hashing function which shifts 2 bits right and then masks.
+class shift_two_mask_range_hashing : private pb_assoc::direct_mask_range_hashing<>
+{
+public:
+ typedef size_t size_type;
+
+public:
+ /*
+ * Swaps with a different instant.
+ */
+ void
+ swap(shift_two_mask_range_hashing& r_other)
+ {
+ pb_assoc::direct_mask_range_hashing<>::swap(r_other);
+ }
+
+ /*
+ * Called by the container when internally resized.
+ */
+ void
+ notify_resized(size_type size)
+ {
+ pb_assoc::direct_mask_range_hashing<>::notify_resized(size);
+ }
+
+ /*
+ * Given a hash value, returns a number in the range of the
+ * internal size of the container.
+ */
+ inline size_type
+ operator()(size_type hash) const
+ {
+ return (pb_assoc::direct_mask_range_hashing<>::operator()(
+ hash >> 2));
+ }
+};
+
+int
+main()
+{
+ /*
+ * A collision-chaining hash table mapping ints to chars.
+ */
+ typedef
+ pb_assoc::cc_hash_assoc_cntnr<
+ int,
+ char,
+ // Hash function.
+ simple_int_hash,
+ std::equal_to<int>,
+ // Range hashing function.
+ shift_two_mask_range_hashing>
+ map_t;
+
+ map_t h;
+
+ // Use normally.
+
+ h[16] = 'a';
+ h[256] = 'e';
+ h[4] = 'z';
+}
+
diff --git a/libstdc++-v3/testsuite/ext/pb_assoc/example/mapping_level.cc b/libstdc++-v3/testsuite/ext/pb_assoc/example/mapping_level.cc
new file mode 100644
index 00000000000..a99d7511ebc
--- /dev/null
+++ b/libstdc++-v3/testsuite/ext/pb_assoc/example/mapping_level.cc
@@ -0,0 +1,150 @@
+// -*- C++ -*-
+
+// 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.
+
+// As a special exception, you may use this file as part of a free software
+// library without restriction. Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General 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 mapping_level_example.cpp
+ * A basic example showing how to use different mapping levels.
+ */
+
+// For cout, endl.
+#include <iostream>
+// For various associative containers.
+#include <ext/pb_assoc/assoc_cntnr.hpp>
+// For compound_data_type.
+#include <ext/pb_assoc/data_type.hpp>
+// For sting.
+#include <string>
+// For assert.
+#include <cassert>
+// For unary_function.
+#include <functional>
+
+typedef std::string user_name;
+
+typedef unsigned long machine_id;
+
+typedef std::string process_name;
+
+typedef float running_time;
+
+typedef
+pb_assoc::lu_assoc_cntnr<
+ process_name,
+ running_time>
+pr_name_rn_time_map;
+
+typedef
+pb_assoc::lu_assoc_cntnr<
+ machine_id,
+ pb_assoc::compound_data_type<
+ pr_name_rn_time_map> >
+machine_pr_map;
+
+typedef
+pb_assoc::lu_assoc_cntnr<
+ user_name,
+ pb_assoc::compound_data_type<
+ machine_pr_map> >
+user_machine_pr_map;
+
+typedef user_machine_pr_map::rebind<2>::other l2_t;
+
+typedef user_machine_pr_map::rebind<1>::other l1_t;
+
+struct is_same_proc : public std::unary_function<
+ l1_t::iterator::const_reference,
+ bool>
+{
+ is_same_proc(const process_name& r_proc) : m_proc(r_proc)
+ {
+
+ };
+
+ bool
+ operator()(l1_t::iterator::const_reference r_val)
+ {
+ return (r_val.first.second == m_proc);
+ }
+
+private:
+ process_name m_proc;
+};
+
+int main()
+{
+ user_machine_pr_map m;
+
+ /**
+ * Following shows different ways to insert into a user_machine_pr_map object.
+ **/
+
+ // Josh launches on machine 1 firefox at time 1000.
+
+ m["Josh"][1]["firefox"] = 1000;
+
+ // Ben launches on machine 1 python at time 1003.
+ ((l1_t& )m)[std::make_pair(
+ std::make_pair("Ben", 1),
+ "python")] = 1003;
+
+ // Josh launches on machine 2 buggy at time 1004.
+
+ m.find("Josh")->second[2]["buggy"] = 1004;
+
+ // Sarah launches on machine 3 kdevelop at time 1010.
+
+ m["Sarah"][2].insert(std::make_pair("kdevelop", 1010));
+
+ // Iterate over all users running applications.
+
+ {
+ std::cout << "All users running applications:" << std::endl;
+
+ user_machine_pr_map::const_iterator it = m.begin();
+
+ while (it != m.end())
+ std::cout << (it++)->first << std::endl;
+ }
+
+ // Sarah has terminated kdevelop
+ ((l1_t& )m).erase(std::make_pair(
+ std::make_pair("Sarah", 2),
+ "kdevelop"));
+}
+
diff --git a/libstdc++-v3/testsuite/ext/pb_assoc/example/mapping_level_neg.cc b/libstdc++-v3/testsuite/ext/pb_assoc/example/mapping_level_neg.cc
new file mode 100644
index 00000000000..89711ba693f
--- /dev/null
+++ b/libstdc++-v3/testsuite/ext/pb_assoc/example/mapping_level_neg.cc
@@ -0,0 +1,83 @@
+// { dg-do compile }
+// -*- C++ -*-
+
+// 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.
+
+// As a special exception, you may use this file as part of a free software
+// library without restriction. Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General 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 bad_mapping_level_example.cpp
+ * An example how not to use mapping levels.
+ */
+
+// For cout, endl.
+#include <iostream>
+// For various associative containers.
+#include <ext/pb_assoc/assoc_cntnr.hpp>
+// For compound_data_type.
+#include <ext/pb_assoc/data_type.hpp>
+
+int
+main()
+{
+ typedef
+ pb_assoc::tree_assoc_cntnr<
+ int,
+ pb_assoc::compound_data_type<
+ pb_assoc::tree_assoc_cntnr<
+ char,
+ pb_assoc::null_data_type> > >
+ t_0;
+
+ typedef t_0::rebind<1>::other t_0_rebound;
+
+ typedef
+ pb_assoc::tree_assoc_cntnr<
+ int,
+ pb_assoc::tree_assoc_cntnr<
+ char,
+ pb_assoc::null_data_type> >
+ t_1;
+
+ /*
+ * Following line will not compile.
+ * t1 is a "map" type, and cannot be rebound.
+ **/
+
+ typedef t_1::rebind<1>::other t_1_rebound; // { dg-error "expected" }
+}
+
+
diff --git a/libstdc++-v3/testsuite/ext/pb_assoc/example/ms_traits.cc b/libstdc++-v3/testsuite/ext/pb_assoc/example/ms_traits.cc
new file mode 100644
index 00000000000..e2b8a4befcd
--- /dev/null
+++ b/libstdc++-v3/testsuite/ext/pb_assoc/example/ms_traits.cc
@@ -0,0 +1,121 @@
+// -*- C++ -*-
+
+// 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.
+
+// As a special exception, you may use this file as part of a free software
+// library without restriction. Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General 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 ms_traits_example.cpp
+ * A basic example showing how to use ms_traits for querying container types
+ * for their behavior.
+ */
+
+// For various associative containers.
+#include <ext/pb_assoc/assoc_cntnr.hpp>
+// For ms_traits.
+#include <ext/pb_assoc/ms_trait.hpp>
+// For cout, endl.
+#include <iostream>
+
+void
+print_has_data_compound_data(bool has_data, bool has_compound_data)
+{
+ if (!has_data)
+ {
+ std::cout << "Does not have data." << std::endl;
+
+ return;
+ }
+
+ if (!has_compound_data)
+ {
+ std::cout << "Has data." << std::endl;
+
+ return;
+ }
+
+ std::cout << "Has compound data." << std::endl;
+}
+
+void
+print_mapping_level(unsigned int mapping_level)
+{
+ std::cout << "Mapping level = " << mapping_level << std::endl;
+}
+
+template<class Cntnr>
+void
+print_mapping_attributes()
+{
+ typedef pb_assoc::ms_traits< Cntnr> traits;
+
+ print_has_data_compound_data(traits::has_data, traits::has_compound_data);
+
+ print_mapping_level(traits::mapping_level);
+
+ std::cout << std::endl << std::endl;
+}
+
+int
+main()
+{
+ std::cout << "\"Set\"-type container:" << std::endl;
+
+ print_mapping_attributes<
+ pb_assoc::cc_hash_assoc_cntnr<int, pb_assoc::null_data_type> >();
+
+ std::cout << "\"Map\"-type container:" << std::endl;
+
+ print_mapping_attributes<
+ pb_assoc::cc_hash_assoc_cntnr<int, char> >();
+
+ typedef
+ pb_assoc::cc_hash_assoc_cntnr<
+ int,
+ pb_assoc::compound_data_type<
+ pb_assoc::tree_assoc_cntnr<
+ char,
+ pb_assoc::null_data_type> > >
+ mmap_t;
+
+ std::cout << "\"Multimap\"-type container:" << std::endl;
+
+ print_mapping_attributes<mmap_t>();
+
+ std::cout << "Rebound \"Multimap\"-type container:" << std::endl;
+
+ print_mapping_attributes<mmap_t::rebind<1>::other>();
+}
diff --git a/libstdc++-v3/testsuite/ext/pb_assoc/example/ranged_hash.cc b/libstdc++-v3/testsuite/ext/pb_assoc/example/ranged_hash.cc
new file mode 100644
index 00000000000..05e65a5d45a
--- /dev/null
+++ b/libstdc++-v3/testsuite/ext/pb_assoc/example/ranged_hash.cc
@@ -0,0 +1,193 @@
+// -*- C++ -*-
+
+// 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.
+
+// As a special exception, you may use this file as part of a free software
+// library without restriction. Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General 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 ranged_hash_example.cpp
+ * A basic example showing how to write a ranged-hash functor.
+ */
+
+// For cc_hash_assoc_cntnr.
+#include <ext/pb_assoc/assoc_cntnr.hpp>
+// For hash-related policies.
+#include <ext/pb_assoc/hash_policy.hpp>
+// For unary_function and binary_function.
+#include <functional>
+// For assert.
+#include <cassert>
+// For string.
+#include <string>
+
+/**
+ * A (somewhat simplistic) ranged-hash function for strings.
+ * It uses the size of the container object to determine
+ * the hashing method. For smaller sizes it uses a simple hash function;
+ * for larger sizes it uses a more complicated hash function.
+ */
+class simple_string_ranged_hash_fn : public std::unary_function<
+ std::string,
+ size_t>
+{
+public:
+ typedef size_t size_type;
+
+ // Default constructor.
+ simple_string_ranged_hash_fn();
+
+ // Called to notify that the size has changed.
+ void
+ notify_resized(size_t size);
+
+ /*
+ * Called for hashing a string into a size_t in a
+ * given range.
+ */
+ size_t
+ operator()(const std::string& r_string);
+
+ // Swaps content.
+ void
+ swap(simple_string_ranged_hash_fn& r_other);
+
+private:
+ // Records the size of the container object.
+ size_t m_container_size;
+};
+
+simple_string_ranged_hash_fn::
+simple_string_ranged_hash_fn() :
+ m_container_size(0)
+{
+
+}
+
+void
+simple_string_ranged_hash_fn::
+notify_resized(size_t size)
+{
+ m_container_size = size;
+}
+
+size_t
+simple_string_ranged_hash_fn::
+operator()(const std::string& r_string)
+{
+ /*
+ * This (simplified) hash algorithm decides that if there are
+ * fewer than 100 strings in the container it will hash
+ * a string by summing its characters; otherwise, it will
+ * perform a more complicated operation in order to produce
+ * hash values with fewer collisions.
+ */
+
+ std::string::const_iterator it = r_string.begin();
+
+ size_t hash = 0;
+
+ if (m_container_size < 100)
+ {
+ // For this size, perform an std::accumulate type of operation.
+
+ while (it != r_string.end())
+ hash += static_cast<size_t>(*it++);
+ }
+ else
+ {
+ // For this size, perform a different operation.
+
+ while (it != r_string.end())
+ {
+ hash += static_cast<size_t>(*it++);
+
+ hash *= 5;
+ }
+ }
+
+ /*
+ * The function must, by whatever means, return
+ * a size in the range 0 to m_container_size.
+ */
+ return (hash % m_container_size);
+}
+
+void
+simple_string_ranged_hash_fn::
+swap(simple_string_ranged_hash_fn& r_other)
+{
+ std::swap(m_container_size, r_other.m_container_size);
+}
+
+int
+main()
+{
+ /*
+ * A collision-chaining hash table storing strings.
+ */
+ typedef
+ pb_assoc::cc_hash_assoc_cntnr<
+ std::string,
+ pb_assoc::null_data_type,
+ // Null hash function
+ pb_assoc::null_hash_fn,
+ // Equivalence function.
+ std::equal_to<
+ std::string>,
+ // Range hashing function.
+ simple_string_ranged_hash_fn >
+ set_t;
+
+ /*
+ * Note that in the above, the library determines a resize policy
+ * appropriate for direct_mod_range_hashing.
+ */
+
+ set_t h;
+
+ // Use the table normally.
+
+ h.insert("Hello, ");
+ h.insert("world");
+
+ assert(h.size() == 2);
+
+ assert(h.find("Hello, ") != h.end());
+ assert(h.find("world") != h.end());
+
+ assert(h.find("Goodbye, oh cruel world!") == h.end());
+}
+
diff --git a/libstdc++-v3/testsuite/ext/pb_assoc/example/store_hash.cc b/libstdc++-v3/testsuite/ext/pb_assoc/example/store_hash.cc
new file mode 100644
index 00000000000..b190af71dc5
--- /dev/null
+++ b/libstdc++-v3/testsuite/ext/pb_assoc/example/store_hash.cc
@@ -0,0 +1,111 @@
+// -*- C++ -*-
+
+// 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.
+
+// As a special exception, you may use this file as part of a free software
+// library without restriction. Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General 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 hash_mod_example.cpp
+ * An example showing how to use cc_ht_map with alternative policies.
+ */
+
+// For cc_hash_assoc_cntnr.
+#include <ext/pb_assoc/assoc_cntnr.hpp>
+// For direct_mask_range_hashing and hash_standard_resize_policy.
+#include <ext/pb_assoc/hash_policy.hpp>
+// For unary_function, binary_function.
+#include <functional>
+// For string.
+#include <string>
+
+/*
+ * A string hash functor
+ */
+struct string_hash : public std::unary_function<
+ std::string,
+ size_t>
+{
+ inline size_t
+ operator()(std::string str) const
+ {
+ std::string::const_iterator b = str.begin();
+
+ std::string::const_iterator e = str.end();
+
+ size_t hash = 0;
+
+ while (b != e)
+ {
+ hash *= 5;
+
+ hash += static_cast<size_t>(*b);
+
+ ++b;
+ }
+
+ return (hash);
+ }
+};
+
+int
+main()
+{
+ /*
+ * A collision-chaining hash table mapping strings to ints.
+ */
+ typedef
+ pb_assoc::cc_hash_assoc_cntnr<
+ std::string,
+ int,
+ // Hash function.
+ string_hash,
+ // Equivalence function.
+ std::equal_to<
+ std::string>,
+ // Range hashing function.
+ pb_assoc::direct_mask_range_hashing<>,
+ // Resize policy.
+ pb_assoc::hash_standard_resize_policy<>,
+ // Store the hash value with each entry.
+ true>
+ map_t;
+
+ map_t h;
+
+ h["Hello, "] = 0;
+ h["world"] = 1;
+}
+
diff --git a/libstdc++-v3/testsuite/ext/pb_assoc/example/tree_intervals.cc b/libstdc++-v3/testsuite/ext/pb_assoc/example/tree_intervals.cc
new file mode 100644
index 00000000000..494ab5d55f5
--- /dev/null
+++ b/libstdc++-v3/testsuite/ext/pb_assoc/example/tree_intervals.cc
@@ -0,0 +1,260 @@
+// -*- C++ -*-
+
+// 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.
+
+// As a special exception, you may use this file as part of a free software
+// library without restriction. Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General 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 tree_set_intervals_example.cpp
+ * An example showing how to augment a trees to support operations involving
+ * line intervals.
+ */
+
+// For ov_tree_set
+#include <ext/pb_assoc/assoc_cntnr.hpp>
+// For assert
+#include <cassert>
+// For NULL
+#include <cstdlib>
+
+/*
+ * Following are definitions of line intervals and functors operating on them.
+ * As the purpose of this example is node invariants, and not
+ * computational-geometry algorithms per-se, some simplifications are made
+ *(e.g., intervals are defined by unsigned integers, and not by*a parameterized type, data members are public, etc.).
+ */
+
+/*
+ * An interval of unsigned integers.
+ **/
+struct interval
+{
+ /*
+ * Constructor.
+ * @param start [i] - Start point.
+ * @param end [i] - End point.
+ */
+ interval(unsigned int start, unsigned int end) : m_start(start),
+ m_end(end)
+ {
+ assert(start <= end);
+ }
+
+ /*
+ * Comparison predicate.
+ * @param r_rhs [i] - Right-hand object with which to compare.
+ **/
+ bool
+ operator<(const interval& r_rhs) const
+ {
+ if (m_start != r_rhs.m_start)
+ return (m_start < r_rhs.m_start);
+
+ return (m_end < r_rhs.m_end);
+ }
+
+ /*
+ * Start point.
+ */
+ unsigned int m_start;
+
+ /*
+ * End point.
+ **/
+ unsigned int m_end;
+};
+
+struct intervals_node_updator;
+
+template<class Cntnr>
+bool
+overlaps(const Cntnr& r_c, const interval& r_interval);
+
+/*
+ * The entry of the set. It includes an interval and the
+ * maximal endpoint of the intervals in its subtree.
+ */
+struct entry
+{
+ // Constructor. The maximal endpoint is set to the endpoint
+ explicit entry(unsigned int start, unsigned int end) : m_interval(start, end),
+ m_max_endpoint(end)
+ { }
+
+ // Compares two entries by their intervals.
+ inline bool
+ operator<(const entry& r_rhs) const
+ {
+ return (m_interval < r_rhs.m_interval);
+ }
+
+ // An interval
+ interval m_interval;
+
+private:
+ // The maximal endpoint of the intervals in its subtree.
+ mutable unsigned int m_max_endpoint;
+
+ friend struct intervals_node_updator;
+
+ template<class Cntnr>
+ friend bool
+ overlaps(const Cntnr& r_c, const interval& r_interval);
+
+};
+
+/*
+ * Functor updating maximal endpoints of entries.
+ * Algorithm taken from "Introduction to Algorithms" by Cormen, Leiserson,
+ * and Rivest.
+ */
+struct intervals_node_updator
+{
+ inline void
+ operator()(const entry* p_entry, const entry* p_l_child_entry, const entry* p_r_child_entry)
+ {
+ /* The left maximal endpoint is 0 if there is no left child.
+ */
+ const unsigned int l_max_endpoint =(p_l_child_entry == NULL)? 0 : p_l_child_entry->m_max_endpoint;
+
+ /* The right maximal endpoint is 0 if there is no right child.
+ */
+ const unsigned int r_max_endpoint =(p_r_child_entry == NULL)? 0 : p_r_child_entry->m_max_endpoint;
+
+ p_entry->m_max_endpoint = std::max(p_entry->m_interval.m_end,
+ std::max<unsigned int>(l_max_endpoint, r_max_endpoint));
+ }
+};
+
+/*
+ * Checks whether a set of intervals contains at least one interval
+ * overlapping some interval.
+ * Algorithm taken from "Introduction to Algorithms" by Cormen, Leiserson,
+ * and Rivest.
+ **/
+template<class Cntnr>
+bool
+overlaps(const Cntnr& r_c, const interval& r_interval)
+{
+ typedef typename Cntnr::const_iterator intr_set_const_it;
+
+ typedef typename Cntnr::const_node_iterator intr_set_const_node_it;
+
+ intr_set_const_node_it node_it = r_c.node_begin();
+
+ while (node_it != r_c.node_end())
+ {
+ // Check whether r_interval overlaps the current interval.
+
+ intr_set_const_it it =* node_it;
+
+ if (r_interval.m_end >= it->m_interval.m_start&&
+ r_interval.m_start <= it->m_interval.m_end)
+ return (true);
+
+ intr_set_const_node_it l_node_it = node_it.l_child();
+
+ const unsigned int l_max_endpoint =(l_node_it == r_c.node_end())?
+ 0 : (*l_node_it)->m_max_endpoint;
+
+ if (l_max_endpoint >= r_interval.m_start)
+ node_it = l_node_it;
+ else
+ node_it = node_it.r_child();
+ }
+
+ return (false);
+}
+
+template<class Cntnr>
+void
+some_op_sequence(Cntnr c)
+{
+ // Insert some entries.
+
+ c.insert(entry(0, 100));
+ c.insert(entry(150, 160));
+ c.insert(entry(300, 1000));
+ c.insert(entry(10000, 100000));
+ c.insert(entry(200, 100200));
+
+ // Test overlaps.
+
+ // Overlaps 150 - 160
+ assert(overlaps(c, interval(145, 165)) == true);
+ // Overlaps 150 - 160
+ assert(overlaps(c, interval(145, 155)) == true);
+ assert(overlaps(c, interval(165, 175)) == false);
+ assert(overlaps(c, interval(100201, 100203)) == false);
+
+ // Erase an entry.
+
+ entry e(150, 160);
+
+ c.erase(e);
+
+ // Test overlaps again.
+
+ assert(overlaps(c, interval(145, 165)) == false);
+ assert(overlaps(c, interval(165, 175)) == false);
+ assert(overlaps(c, interval(0, 300000)) == true);
+}
+
+int
+main()
+{
+ some_op_sequence(pb_assoc::tree_assoc_cntnr<
+ entry,
+ pb_assoc::null_data_type,
+ std::less<entry>,
+ pb_assoc::ov_tree_ds_tag,
+ intervals_node_updator>());
+
+ some_op_sequence(pb_assoc::tree_assoc_cntnr<
+ entry,
+ pb_assoc::null_data_type,
+ std::less<entry>,
+ pb_assoc::rb_tree_ds_tag,
+ intervals_node_updator>());
+
+ some_op_sequence(pb_assoc::tree_assoc_cntnr<
+ entry,
+ pb_assoc::null_data_type,
+ std::less<entry>,
+ pb_assoc::splay_tree_ds_tag,
+ intervals_node_updator>());
+}
+
diff --git a/libstdc++-v3/testsuite/ext/pb_assoc/example/tree_join.cc b/libstdc++-v3/testsuite/ext/pb_assoc/example/tree_join.cc
new file mode 100644
index 00000000000..97ae68038f1
--- /dev/null
+++ b/libstdc++-v3/testsuite/ext/pb_assoc/example/tree_join.cc
@@ -0,0 +1,127 @@
+// -*- C++ -*-
+
+// 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.
+
+// As a special exception, you may use this file as part of a free software
+// library without restriction. Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General 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 tree_join_example.cpp.cpp
+ * An example showing how to join splay_tree_map objects.
+ * The code in the example is relevant to red-black trees as well.
+ */
+
+// For tree_assoc_cntnr
+#include <ext/pb_assoc/assoc_cntnr.hpp>
+// For cannot_join exception.
+#include <ext/pb_assoc/exception.hpp>
+// For assert
+#include <cassert>
+
+int
+main()
+{
+ /*
+ * A splay tree table mapping ints to chars.
+ */
+ typedef
+ pb_assoc::tree_assoc_cntnr<
+ int,
+ char,
+ std::less<
+ int>,
+ pb_assoc::splay_tree_ds_tag>
+ map_t;
+
+ // Two map_t object.
+ map_t h0, h1;
+
+ // Insert some values into the first table.
+ for (int i0 = 0; i0 < 100; ++i0)
+ h0.insert(std::make_pair(i0, 'a'));
+
+ // Insert some values into the second table.
+ for (int i1 = 0; i1 < 100; ++i1)
+ h1.insert(std::make_pair(1000 + i1, 'b'));
+
+ /*
+ * Since all the elements in h0 are smaller than those in h1,
+ * it is possible to join the two tables. This is exception free.
+ */
+
+ h0.join(h1);
+
+ // h0 should now contain all entries, and h1 should be empty.
+
+ assert(h0.size() == 200);
+ assert(h1.empty());
+
+ // Now perform an illegal join.
+
+ // Two other map_t objects.
+ map_t h2, h3;
+
+ h2[1] = 'a';
+ h2[3] = 'c';
+
+ h3[2] = 'b';
+
+ /*
+ * It is not true that all elements in h2 are smaller than those
+ * in h3, nor is it true that they are all larger. Hence, attempting
+ * to join h2, and h3 should result in an exception.
+ */
+
+ bool exception_thrown = false;
+
+ try
+ {
+ h2.join(h3);
+ }
+ catch(pb_assoc::cannot_join& )
+ {
+ exception_thrown = true;
+ }
+
+ assert(exception_thrown);
+
+ // Since the operation was not performed, the tables should be unaltered.
+
+ assert(h2.size() == 2);
+ assert(h3[2] == 'b');
+
+ return (0);
+}
+
diff --git a/libstdc++-v3/testsuite/ext/pb_assoc/example/tree_order_statistics.cc b/libstdc++-v3/testsuite/ext/pb_assoc/example/tree_order_statistics.cc
new file mode 100644
index 00000000000..c15b5599677
--- /dev/null
+++ b/libstdc++-v3/testsuite/ext/pb_assoc/example/tree_order_statistics.cc
@@ -0,0 +1,133 @@
+// -*- C++ -*-
+
+// 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.
+
+// As a special exception, you may use this file as part of a free software
+// library without restriction. Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General 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 tree_order_statistics_example.cpp
+ * An example showing how to use functors for order-statistics
+ * in tree-based containers.
+ */
+
+// For tree_assoc_cntnr
+#include <ext/pb_assoc/assoc_cntnr.hpp>
+// For order-statistics related policies
+#include <ext/pb_assoc/tree_policy.hpp>
+// For assert
+#include <cassert>
+
+/*
+ * A red-black tree table storing ints and their order statistics.
+ */
+typedef
+pb_assoc::tree_assoc_cntnr<
+ pb_assoc::order_statistics_key<int>,
+ pb_assoc::null_data_type,
+ pb_assoc::order_statistics_key_cmp<std::less<int> >,
+ pb_assoc::rb_tree_ds_tag,
+ pb_assoc::order_statistics_node_updator<int> >
+set_t;
+
+int
+main()
+{
+ set_t s;
+
+ typedef pb_assoc::order_statistics_key< int> int_order_statistics_key;
+
+ // Insert some entries into s.
+
+ s.insert(int_order_statistics_key(12));
+ s.insert(int_order_statistics_key(505));
+ s.insert(int_order_statistics_key(30));
+ s.insert(int_order_statistics_key(1000));
+ s.insert(int_order_statistics_key(10000));
+ s.insert(int_order_statistics_key(100));
+
+ // The order of the keys should be: 12, 30, 100, 505, 1000, 10000.
+
+ pb_assoc::find_by_order<set_t> by_order;
+
+ assert(*by_order(s, 0) == 12);
+ assert(*by_order(s, 1) == 30);
+ assert(*by_order(s, 2) == 100);
+ assert(*by_order(s, 3) == 505);
+ assert(*by_order(s, 4) == 1000);
+ assert(*by_order(s, 5) == 10000);
+ assert(by_order(s, 6) == s.end());
+
+ // The order of the keys should be: 12, 30, 100, 505, 1000, 10000.
+
+ pb_assoc::order_by_key<set_t> by_key;
+
+ assert(by_key(s, 10) == 0);
+ assert(by_key(s, 12) == 0);
+ assert(by_key(s, 15) == 1);
+ assert(by_key(s, 30) == 1);
+ assert(by_key(s, 99) == 2);
+ assert(by_key(s, 100) == 2);
+ assert(by_key(s, 505) == 3);
+ assert(by_key(s, 1000) == 4);
+ assert(by_key(s, 10000) == 5);
+ assert(by_key(s, 9999999) == 6);
+
+ // Erase an entry.
+ s.erase(int_order_statistics_key(30));
+
+ // The order of the keys should be: 12, 100, 505, 1000, 10000.
+
+ assert(*by_order(s, 0) == 12);
+ assert(*by_order(s, 1) == 100);
+ assert(*by_order(s, 2) == 505);
+ assert(*by_order(s, 3) == 1000);
+ assert(*by_order(s, 4) == 10000);
+ assert(by_order(s, 5) == s.end());
+
+ // The order of the keys should be: 12, 100, 505, 1000, 10000.
+
+ assert(by_key(s, 10) == 0);
+ assert(by_key(s, 12) == 0);
+ assert(by_key(s, 100) == 1);
+ assert(by_key(s, 505) == 2);
+ assert(by_key(s, 707) == 3);
+ assert(by_key(s, 1000) == 3);
+ assert(by_key(s, 1001) == 4);
+ assert(by_key(s, 10000) == 4);
+ assert(by_key(s, 100000) == 5);
+ assert(by_key(s, 9999999) == 5);
+}
+
diff --git a/libstdc++-v3/testsuite/ext/pb_assoc/example/tree_order_statistics_join.cc b/libstdc++-v3/testsuite/ext/pb_assoc/example/tree_order_statistics_join.cc
new file mode 100644
index 00000000000..3cb6e6099e4
--- /dev/null
+++ b/libstdc++-v3/testsuite/ext/pb_assoc/example/tree_order_statistics_join.cc
@@ -0,0 +1,106 @@
+// -*- C++ -*-
+
+// 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.
+
+// As a special exception, you may use this file as part of a free software
+// library without restriction. Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General 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 splay_tree_map_order_statistics_example.cpp
+ * An example showing how to augment a splay tree to support order statistics.
+ */
+
+// For trees.
+#include <ext/pb_assoc/assoc_cntnr.hpp>
+// For order_statistics_key
+#include <ext/pb_assoc/tree_policy.hpp>
+// For assert
+#include <cassert>
+
+/**
+ * A splay tree table mapping ints to chars and storing the ints order statistics.
+ */
+typedef
+pb_assoc::tree_assoc_cntnr<
+ pb_assoc::order_statistics_key<int>,
+ char,
+ pb_assoc::order_statistics_key_cmp<std::less<int> >,
+ pb_assoc::splay_tree_ds_tag,
+ pb_assoc::order_statistics_node_updator<int> >
+map_t;
+
+int
+main()
+{
+ typedef pb_assoc::order_statistics_key< int> int_order_statistics_key;
+
+ map_t s0;
+
+ // Insert some entries into s0.
+
+ s0.insert(make_pair(int_order_statistics_key(12), 'a'));
+ s0.insert(make_pair(int_order_statistics_key(505), 'b'));
+ s0.insert(make_pair(int_order_statistics_key(30), 'c'));
+
+ // The order of the keys should be: 12, 30, 505.
+
+ pb_assoc::find_by_order<map_t> by_order;
+
+ assert(by_order(s0, 0)->first == 12);
+ assert(by_order(s0, 1)->first == 30);
+ assert(by_order(s0, 2)->first == 505);
+
+ map_t s1;
+
+ // Insert some entries into s1.
+
+ s1.insert(make_pair(int_order_statistics_key(506), 'a'));
+ s1.insert(make_pair(int_order_statistics_key(1222), 'b'));
+ s1.insert(make_pair(int_order_statistics_key(3004), 'c'));
+
+ // Now join s0 and s1.
+
+ s0.join(s1);
+
+ // The order of the keys should be: 12, 30, 505.
+
+ assert(by_order(s0, 0)->first == 12);
+ assert(by_order(s0, 1)->first == 30);
+ assert(by_order(s0, 2)->first == 505);
+ assert(by_order(s0, 3)->first == 506);
+ assert(by_order(s0, 4)->first == 1222);
+ assert(by_order(s0, 5)->first == 3004);
+}
+
diff --git a/libstdc++-v3/testsuite/ext/pb_assoc/example/tree_split.cc b/libstdc++-v3/testsuite/ext/pb_assoc/example/tree_split.cc
new file mode 100644
index 00000000000..d75330a8caf
--- /dev/null
+++ b/libstdc++-v3/testsuite/ext/pb_assoc/example/tree_split.cc
@@ -0,0 +1,90 @@
+// -*- C++ -*-
+
+// 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.
+
+// As a special exception, you may use this file as part of a free software
+// library without restriction. Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General 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 tree_split_example.cpp
+ * A basic example showing how to split tree-based container objects.
+ */
+
+// For rb_tree_assoc_cntnr.
+#include <ext/pb_assoc/assoc_cntnr.hpp>
+// For assert
+#include <cassert>
+
+int
+main()
+{
+ /*
+ * A red-black tree table mapping ints to chars.
+ */
+ typedef pb_assoc::tree_assoc_cntnr< int, char> map_t;
+
+ // A map_t object.
+ map_t r;
+
+ // Inserts some entries into r.
+
+ for (int i = 0; i < 100; ++ i)
+ r.insert(std::make_pair(i, 'a'));
+
+ // Now split r into a different map_t object.
+
+ // larger_r will hold the larger values following the split.
+ map_t larger_r;
+
+ // Split all elements larger than 1000 into larger_r. This is exception free.
+ r.split(1000, larger_r);
+
+ /*
+ * Since there were no elements larger than 1000, r
+ * should be unchanged.
+ **/
+
+ assert(r.size() == 100);
+ assert(r.begin()->first == 0);
+
+ // Now perform a split which actually changes the content of r.
+
+ // Split all elements larger than 3 into larger_r.
+ r.split(3, larger_r);
+
+ assert(r.size() == 4);
+ assert(larger_r.begin()->first == 4);
+}
+
diff --git a/libstdc++-v3/testsuite/performance/20_util/allocator/insert.cc b/libstdc++-v3/testsuite/performance/20_util/allocator/insert.cc
deleted file mode 100644
index ab53afcac63..00000000000
--- a/libstdc++-v3/testsuite/performance/20_util/allocator/insert.cc
+++ /dev/null
@@ -1,330 +0,0 @@
-// Copyright (C) 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, 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.
-
-/*
- * The goal with this application is to compare the performance
- * between different std::allocator implementations. The results are
- * influenced by the underlying allocator in the "C" library, malloc.
- */
-
-// 2003-02-05 Stefan Olsson <stefan@snon.net>
-
-#include <vector>
-#include <list>
-#include <map>
-#include <deque>
-#include <set>
-#include <typeinfo>
-#include <sstream>
-#include <ext/mt_allocator.h>
-#include <ext/new_allocator.h>
-#include <ext/malloc_allocator.h>
-#include <ext/bitmap_allocator.h>
-#include <ext/pool_allocator.h>
-#include <cxxabi.h>
-#include <testsuite_performance.h>
-
-using namespace std;
-
-typedef int test_type;
-
-// The number of iterations to be performed.
-int iterations = 10000;
-
-// The number of values to insert in the container, 32 will cause 5
-// (re)allocations to be performed (sizes 4, 8, 16, 32 and 64)
-// This means that all allocations are within _MAX_BYTES = 128 as
-// defined in stl_alloc.h for __pool_alloc. Whether or not this
-// value is relevant in "the real world" or not I don't know and
-// should probably be investigated in more detail.
-int insert_values = 128;
-
-template<typename TestType>
- struct value_type : public pair<TestType, TestType>
- {
- value_type() : pair<TestType, TestType>(0, 0) { }
-
- inline value_type operator++() { return ++this->first, *this; }
- inline operator TestType() const { return this->first; }
- };
-
-template<typename Container>
- void
- do_loop()
- {
- Container obj;
- int test_iterations = 0;
- value_type<test_type> test_value;
- while (test_iterations < iterations)
- {
- for (int j = 0; j < insert_values; ++j)
- obj.insert(obj.end(), ++test_value);
- ++test_iterations;
- }
- }
-
-template<typename Container>
- void*
- do_test(void* p = NULL)
- {
- do_loop<Container>();
- return p;
- }
-
-template<typename Container>
- void
- test_container(Container obj, bool run_threaded = false)
- {
- using namespace __gnu_test;
- int status;
-
- time_counter time;
- resource_counter resource;
- {
- start_counters(time, resource);
- if (!run_threaded)
- {
- do_loop<Container>();
- }
- else
- {
-#if defined (_GLIBCXX_GCC_GTHR_POSIX_H) && !defined (NOTHREAD)
- pthread_t t1, t2, t3, t4;
- pthread_create(&t1, 0, &do_test<Container>, 0);
- pthread_create(&t2, 0, &do_test<Container>, 0);
- pthread_create(&t3, 0, &do_test<Container>, 0);
- pthread_create(&t4, 0, &do_test<Container>, 0);
-
- pthread_join(t1, NULL);
- pthread_join(t2, NULL);
- pthread_join(t3, NULL);
- pthread_join(t4, NULL);
-#endif
- }
- stop_counters(time, resource);
-
- std::ostringstream comment;
- if (run_threaded)
- comment << "4-way threaded iterations: " << iterations*4 << '\t';
- else
- comment << "iterations: " << iterations << '\t';
- comment << "type: " << abi::__cxa_demangle(typeid(obj).name(),
- 0, 0, &status);
- report_header(__FILE__, comment.str());
- report_performance(__FILE__, string(), time, resource);
- }
- }
-
-// http://gcc.gnu.org/ml/libstdc++/2001-05/msg00105.html
-// http://gcc.gnu.org/ml/libstdc++/2003-05/msg00231.html
-int main(void)
-{
- typedef __gnu_cxx::malloc_allocator<test_type> m_alloc_type;
- typedef __gnu_cxx::new_allocator<test_type> n_alloc_type;
- typedef __gnu_cxx::__mt_alloc<test_type> so_alloc_type;
- typedef __gnu_cxx::bitmap_allocator<test_type> bit_alloc_type;
- typedef __gnu_cxx::__pool_alloc<test_type> po_alloc_type;
-
-#ifdef TEST_B0
- test_container(vector<test_type, m_alloc_type>());
-#endif
-#ifdef TEST_B1
- test_container(vector<test_type, n_alloc_type>());
-#endif
-#ifdef TEST_B2
- test_container(vector<test_type, so_alloc_type>());
-#endif
-#ifdef TEST_B3
- test_container(vector<test_type, bit_alloc_type>());
-#endif
-#ifdef TEST_B4
- test_container(vector<test_type, po_alloc_type>());
-#endif
-
-#ifdef TEST_B5
- test_container(list<test_type, m_alloc_type>());
-#endif
-#ifdef TEST_B6
- test_container(list<test_type, n_alloc_type>());
-#endif
-#ifdef TEST_B7
- test_container(list<test_type, so_alloc_type>());
-#endif
-#ifdef TEST_B8
- test_container(list<test_type, bit_alloc_type>());
-#endif
-#ifdef TEST_B9
- test_container(list<test_type, po_alloc_type>());
-#endif
-
-#ifdef TEST_B10
- test_container(deque<test_type, m_alloc_type>());
-#endif
-#ifdef TEST_B11
- test_container(deque<test_type, n_alloc_type>());
-#endif
-#ifdef TEST_B12
- test_container(deque<test_type, so_alloc_type>());
-#endif
-#ifdef TEST_B13
- test_container(deque<test_type, bit_alloc_type>());
-#endif
-#ifdef TEST_B14
- test_container(deque<test_type, po_alloc_type>());
-#endif
-
- typedef less<test_type> compare_type;
- typedef pair<const test_type, test_type> pair_type;
- typedef __gnu_cxx::malloc_allocator<pair_type> m_pair_alloc_type;
- typedef __gnu_cxx::new_allocator<pair_type> n_pair_alloc_type;
- typedef __gnu_cxx::__mt_alloc<pair_type> so_pair_alloc_type;
- typedef __gnu_cxx::bitmap_allocator<pair_type> bit_pair_alloc_type;
- typedef __gnu_cxx::__pool_alloc<pair_type> po_pair_alloc_type;
-
-#ifdef TEST_B15
- test_container(map<test_type, test_type, compare_type,
- m_pair_alloc_type>());
-#endif
-#ifdef TEST_B16
- test_container(map<test_type, test_type, compare_type,
- n_pair_alloc_type>());
-#endif
-#ifdef TEST_B17
- test_container(map<test_type, test_type, compare_type,
- so_pair_alloc_type>());
-#endif
-#ifdef TEST_B18
- test_container(map<test_type, test_type, compare_type,
- bit_pair_alloc_type>());
-#endif
-#ifdef TEST_B19
- test_container(map<test_type, test_type, compare_type,
- po_pair_alloc_type>());
-#endif
-
-#ifdef TEST_B20
- test_container(set<test_type, compare_type, m_alloc_type>());
-#endif
-#ifdef TEST_B21
- test_container(set<test_type, compare_type, n_alloc_type>());
-#endif
-#ifdef TEST_B22
- test_container(set<test_type, compare_type, so_alloc_type>());
-#endif
-#ifdef TEST_B23
- test_container(set<test_type, compare_type, bit_alloc_type>());
-#endif
-#ifdef TEST_B24
- test_container(set<test_type, compare_type, po_alloc_type>());
-#endif
-
-#ifdef TEST_T0
- test_container(vector<test_type, m_alloc_type>(), true);
-#endif
-#ifdef TEST_T1
- test_container(vector<test_type, n_alloc_type>(), true);
-#endif
-#ifdef TEST_T2
- test_container(vector<test_type, so_alloc_type>(), true);
-#endif
-#ifdef TEST_T3
- test_container(vector<test_type, bit_alloc_type>(), true);
-#endif
-#ifdef TEST_T4
- test_container(vector<test_type, po_alloc_type>(), true);
-#endif
-
-#ifdef TEST_T5
- test_container(list<test_type, m_alloc_type>(), true);
-#endif
-#ifdef TEST_T6
- test_container(list<test_type, n_alloc_type>(), true);
-#endif
-#ifdef TEST_T7
- test_container(list<test_type, so_alloc_type>(), true);
-#endif
-#ifdef TEST_T8
- test_container(list<test_type, bit_alloc_type>(), true);
-#endif
-#ifdef TEST_T9
- test_container(list<test_type, po_alloc_type>(), true);
-#endif
-
-#ifdef TEST_T10
- test_container(deque<test_type, m_alloc_type>(), true);
-#endif
-#ifdef TEST_T11
- test_container(deque<test_type, n_alloc_type>(), true);
-#endif
-#ifdef TEST_T12
- test_container(deque<test_type, so_alloc_type>(), true);
-#endif
-#ifdef TEST_T13
- test_container(deque<test_type, bit_alloc_type>(), true);
-#endif
-#ifdef TEST_T14
- test_container(deque<test_type, po_alloc_type>(), true);
-#endif
-
-#ifdef TEST_T15
- test_container(map<test_type, test_type, compare_type,
- m_pair_alloc_type>(), true);
-#endif
-#ifdef TEST_T16
- test_container(map<test_type, test_type, compare_type,
- n_pair_alloc_type>(), true);
-#endif
-#ifdef TEST_T17
- test_container(map<test_type, test_type, compare_type,
- so_pair_alloc_type>(), true);
-#endif
-#ifdef TEST_T18
- test_container(map<test_type, test_type, compare_type,
- bit_pair_alloc_type>(), true);
-#endif
-#ifdef TEST_T19
- test_container(map<test_type, test_type, compare_type,
- po_pair_alloc_type>(), true);
-#endif
-
-#ifdef TEST_T20
- test_container(set<test_type, compare_type, m_alloc_type>(), true);
-#endif
-#ifdef TEST_T21
- test_container(set<test_type, compare_type, n_alloc_type>(), true);
-#endif
-#ifdef TEST_T22
- test_container(set<test_type, compare_type, so_alloc_type>(), true);
-#endif
-#ifdef TEST_T23
- test_container(set<test_type, compare_type, bit_alloc_type>(), true);
-#endif
-#ifdef TEST_T24
- test_container(set<test_type, compare_type, po_alloc_type>(), true);
-#endif
- return 0;
-}
diff --git a/libstdc++-v3/testsuite/performance/20_util/allocator/insert_insert.cc b/libstdc++-v3/testsuite/performance/20_util/allocator/insert_insert.cc
deleted file mode 100644
index f0a3e7596a8..00000000000
--- a/libstdc++-v3/testsuite/performance/20_util/allocator/insert_insert.cc
+++ /dev/null
@@ -1,217 +0,0 @@
-// Copyright (C) 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, 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.
-
-/*
- * The goal with this application is to compare the performance
- * between different std::allocator implementations. The results are
- * influenced by the underlying allocator in the "C" library, malloc.
- */
-
-// 2003-02-05 Stefan Olsson <stefan@snon.net>
-
-#include <vector>
-#include <list>
-#include <map>
-#include <deque>
-#include <set>
-#include <typeinfo>
-#include <sstream>
-#include <ext/mt_allocator.h>
-#include <ext/new_allocator.h>
-#include <ext/malloc_allocator.h>
-#include <ext/bitmap_allocator.h>
-#include <ext/pool_allocator.h>
-#include <cxxabi.h>
-#include <testsuite_performance.h>
-
-using namespace std;
-
-typedef int test_type;
-
-// The number of iterations to be performed.
-int iterations = 10000;
-
-// The number of values to insert in the container, 32 will cause 5
-// (re)allocations to be performed (sizes 4, 8, 16, 32 and 64)
-// This means that all allocations are within _MAX_BYTES = 128 as
-// defined in stl_alloc.h for __pool_alloc. Whether or not this
-// value is relevant in "the real world" or not I don't know and
-// should probably be investigated in more detail.
-int insert_values = 128;
-
-template<typename TestType>
- struct value_type : public pair<TestType, TestType>
- {
- value_type() : pair<TestType, TestType>(0, 0) { }
-
- inline value_type operator++() { return ++this->first, *this; }
- inline operator TestType() const { return this->first; }
- };
-
-template<typename Container>
- void
- do_loop()
- {
- Container obj;
- int test_iterations = 0;
- value_type<test_type> test_value;
- while (test_iterations < iterations)
- {
- for (int j = 0; j < insert_values; ++j)
- obj.insert(obj.end(), ++test_value);
- ++test_iterations;
- }
- }
-
-template<typename Container>
- void
- test_container(Container obj)
- {
- using namespace __gnu_test;
- int status;
-
- time_counter time;
- resource_counter resource;
- {
- start_counters(time, resource);
- do_loop<Container>();
- do_loop<Container>();
- stop_counters(time, resource);
-
- std::ostringstream comment;
- comment << "repeated iterations: " << iterations*2 << '\t';
- comment << "type: " << abi::__cxa_demangle(typeid(obj).name(),
- 0, 0, &status);
- report_header(__FILE__, comment.str());
- report_performance(__FILE__, string(), time, resource);
- }
- }
-
-// http://gcc.gnu.org/ml/libstdc++/2001-05/msg00105.html
-// http://gcc.gnu.org/ml/libstdc++/2003-05/msg00231.html
-int main(void)
-{
- typedef __gnu_cxx::malloc_allocator<test_type> m_alloc_type;
- typedef __gnu_cxx::new_allocator<test_type> n_alloc_type;
- typedef __gnu_cxx::__mt_alloc<test_type> so_alloc_type;
- typedef __gnu_cxx::bitmap_allocator<test_type> bit_alloc_type;
- typedef __gnu_cxx::__pool_alloc<test_type> po_alloc_type;
-
-#ifdef TEST_S0
- test_container(vector<test_type, m_alloc_type>());
-#endif
-#ifdef TEST_S1
- test_container(vector<test_type, n_alloc_type>());
-#endif
-#ifdef TEST_S2
- test_container(vector<test_type, so_alloc_type>());
-#endif
-#ifdef TEST_S3
- test_container(vector<test_type, bit_alloc_type>());
-#endif
-#ifdef TEST_S4
- test_container(vector<test_type, po_alloc_type>());
-#endif
-
-#ifdef TEST_S5
- test_container(list<test_type, m_alloc_type>());
-#endif
-#ifdef TEST_S6
- test_container(list<test_type, n_alloc_type>());
-#endif
-#ifdef TEST_S7
- test_container(list<test_type, so_alloc_type>());
-#endif
-#ifdef TEST_S8
- test_container(list<test_type, bit_alloc_type>());
-#endif
-#ifdef TEST_S9
- test_container(list<test_type, po_alloc_type>());
-#endif
-
-#ifdef TEST_S10
- test_container(deque<test_type, m_alloc_type>());
-#endif
-#ifdef TEST_S11
- test_container(deque<test_type, n_alloc_type>());
-#endif
-#ifdef TEST_S12
- test_container(deque<test_type, so_alloc_type>());
-#endif
-#ifdef TEST_S13
- test_container(deque<test_type, bit_alloc_type>());
-#endif
-#ifdef TEST_S14
- test_container(deque<test_type, po_alloc_type>());
-#endif
-
- typedef less<test_type> compare_type;
- typedef pair<const test_type, test_type> pair_type;
- typedef __gnu_cxx::malloc_allocator<pair_type> m_pair_alloc_type;
- typedef __gnu_cxx::new_allocator<pair_type> n_pair_alloc_type;
- typedef __gnu_cxx::__mt_alloc<pair_type> so_pair_alloc_type;
- typedef __gnu_cxx::bitmap_allocator<pair_type> bit_pair_alloc_type;
- typedef __gnu_cxx::__pool_alloc<pair_type> po_pair_alloc_type;
-
-#ifdef TEST_S15
- test_container(map<test_type, test_type, compare_type,
- m_pair_alloc_type>());
-#endif
-#ifdef TEST_S16
- test_container(map<test_type, test_type, compare_type,
- n_pair_alloc_type>());
-#endif
-#ifdef TEST_S17
- test_container(map<test_type, test_type, compare_type,
- so_pair_alloc_type>());
-#endif
-#ifdef TEST_S18
- test_container(map<test_type, test_type, compare_type,
- bit_pair_alloc_type>());
-#endif
-#ifdef TEST_S19
- test_container(map<test_type, test_type, compare_type,
- po_pair_alloc_type>());
-#endif
-
-#ifdef TEST_S20
- test_container(set<test_type, compare_type, m_alloc_type>());
-#endif
-#ifdef TEST_S21
- test_container(set<test_type, compare_type, n_alloc_type>());
-#endif
-#ifdef TEST_S22
- test_container(set<test_type, compare_type, so_alloc_type>());
-#endif
-#ifdef TEST_S23
- test_container(set<test_type, compare_type, bit_alloc_type>());
-#endif
-#ifdef TEST_S24
- test_container(set<test_type, compare_type, po_alloc_type>());
-#endif
- return 0;
-}
diff --git a/libstdc++-v3/testsuite/performance/20_util/allocator/list_sort_search.cc b/libstdc++-v3/testsuite/performance/20_util/allocator/list_sort_search.cc
deleted file mode 100644
index 5c996244574..00000000000
--- a/libstdc++-v3/testsuite/performance/20_util/allocator/list_sort_search.cc
+++ /dev/null
@@ -1,127 +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, 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.
-
-// 2004-03-11 Dhruv Matani <dhruvbird@HotPOP.com>
-
-#include <list>
-#include <algorithm>
-#include <cstdlib>
-#include <typeinfo>
-#include <sstream>
-#include <ext/mt_allocator.h>
-#include <ext/new_allocator.h>
-#include <ext/malloc_allocator.h>
-#include <ext/bitmap_allocator.h>
-#include <ext/pool_allocator.h>
-#include <cxxabi.h>
-#include <testsuite_performance.h>
-
-using namespace std;
-using __gnu_cxx::malloc_allocator;
-using __gnu_cxx::new_allocator;
-using __gnu_cxx::__mt_alloc;
-using __gnu_cxx::bitmap_allocator;
-using __gnu_cxx::__pool_alloc;
-
-typedef int test_type;
-
-template <typename Alloc>
- int
- Test_Allocator()
- {
- typedef list<int, Alloc> My_List;
- My_List il1;
- int const Iter = 150000;
-
- int ctr = 3;
- while (ctr--)
- {
- for (int i = 0; i < Iter; ++i)
- il1.push_back(rand()%500001);
-
- //Search for random values that may or may not belong to the list.
- for (int i = 0; i < 50; ++i)
- std::find(il1.begin(), il1.end(), rand() % 100001);
-
- il1.sort();
-
- //Search for random values that may or may not belong to the list.
- for (int i = 0; i < 50; ++i)
- {
- typename My_List::iterator _liter = std::find(il1.begin(),
- il1.end(),
- rand() % 100001);
- if (_liter != il1.end())
- il1.erase(_liter);
- }
-
- il1.clear();
- }
- return Iter;
- }
-
-template <typename Alloc>
- void
- do_test()
- {
- using namespace __gnu_test;
- int status;
- Alloc obj;
-
- time_counter time;
- resource_counter resource;
- clear_counters(time, resource);
- start_counters(time, resource);
- int test_iterations = Test_Allocator<Alloc>();
- stop_counters(time, resource);
-
- std::ostringstream comment;
- comment << "iterations: " << test_iterations << '\t';
- comment << "type: " << abi::__cxa_demangle(typeid(obj).name(),
- 0, 0, &status);
- report_header(__FILE__, comment.str());
- report_performance(__FILE__, string(), time, resource);
- }
-
-int main()
-{
-#ifdef TEST_S0
- do_test<new_allocator<int> >();
-#endif
-#ifdef TEST_S1
- do_test<malloc_allocator<int> >();
-#endif
-#ifdef TEST_S2
- do_test<__mt_alloc<int> >();
-#endif
-#ifdef TEST_S3
- do_test<bitmap_allocator<int> >();
-#endif
-#ifdef TEST_S4
- do_test<__pool_alloc<int> >();
-#endif
-}
diff --git a/libstdc++-v3/testsuite/performance/20_util/allocator/map_mt_find.cc b/libstdc++-v3/testsuite/performance/20_util/allocator/map_mt_find.cc
deleted file mode 100644
index 22d57abdb81..00000000000
--- a/libstdc++-v3/testsuite/performance/20_util/allocator/map_mt_find.cc
+++ /dev/null
@@ -1,152 +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, 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.
-
-// 2004-03-11 Dhruv Matani <dhruvbird@HotPOP.com>
-
-#include <new>
-#include <map>
-#include <cstdlib>
-#include <string>
-#include <pthread.h>
-#include <typeinfo>
-#include <sstream>
-#include <ext/mt_allocator.h>
-#include <ext/new_allocator.h>
-#include <ext/malloc_allocator.h>
-#include <ext/bitmap_allocator.h>
-#include <ext/pool_allocator.h>
-#include <cxxabi.h>
-#include <testsuite_performance.h>
-
-using namespace std;
-using __gnu_cxx::malloc_allocator;
-using __gnu_cxx::new_allocator;
-using __gnu_cxx::__mt_alloc;
-using __gnu_cxx::bitmap_allocator;
-using __gnu_cxx::__pool_alloc;
-
-bool less_int(int x1, int x2) { return x1 < x2; }
-
-#if defined USE_FUNCTION_COMPARE
-#define COMPARE_T typeof(&less_int)
-#define COMPARE_F &less_int
-#else
-#define COMPARE_T std::less<int>
-#define COMPARE_F std::less<int>()
-#endif
-
-template <typename Alloc>
- void*
- find_proc(void *_vptr)
- {
- map<int, string, COMPARE_T, Alloc> *_mptr =
- reinterpret_cast<map<int, string, COMPARE_T, Alloc>*>(_vptr);
-
- for (int i = 0; i < 700000; ++i)
- {
- int Finder = rand() % 2000000;
- _mptr->find(Finder);
- }
- return _vptr;
- }
-
-
-template <typename Alloc>
- int
- do_test()
- {
- COMPARE_T _comp = COMPARE_F;
- map<int, string, COMPARE_T, Alloc> imap(_comp);
- int x = 2;
- pthread_t thr[3];
- const int Iter = 1000000;
-
- while (x--)
- {
- for (int i = 0; i < 300000; ++i)
- imap.insert(make_pair(rand()%1000000, "_test_data"));
-
- for (int i = 0; i < 100000; ++i)
- imap.insert(make_pair(rand()%2000000, "_test_data"));
-
- pthread_create(&thr[0], NULL, find_proc<Alloc>, (void*)&imap);
- pthread_create(&thr[1], NULL, find_proc<Alloc>, (void*)&imap);
- pthread_create(&thr[2], NULL, find_proc<Alloc>, (void*)&imap);
-
- pthread_join(thr[0], 0);
- pthread_join(thr[1], 0);
- pthread_join(thr[2], 0);
-
- imap.clear();
- }
- return Iter;
- }
-
-template <typename Alloc>
- void
- exec_tests()
- {
- using namespace __gnu_test;
- int status;
- COMPARE_T _comp = COMPARE_F;
- map<int, string, COMPARE_T, Alloc> obj(_comp);
-
- time_counter time;
- resource_counter resource;
- clear_counters(time, resource);
- start_counters(time, resource);
- int test_iterations = do_test<Alloc>();
- stop_counters(time, resource);
-
- std::ostringstream comment;
- comment << "iterations: " << test_iterations << '\t';
- comment << "type: " << abi::__cxa_demangle(typeid(obj).name(),
- 0, 0, &status);
- report_header(__FILE__, comment.str());
- report_performance(__FILE__, string(), time, resource);
- }
-
-int main()
-{
- typedef pair<const int, string> pair_type;
-
-#ifdef TEST_T0
- exec_tests<new_allocator<pair_type> >();
-#endif
-#ifdef TEST_T1
- exec_tests<malloc_allocator<pair_type> >();
-#endif
-#ifdef TEST_T2
- exec_tests<__mt_alloc<pair_type> >();
-#endif
-#ifdef TEST_T3
- exec_tests<bitmap_allocator<pair_type> >();
-#endif
-#ifdef TEST_T4
- exec_tests<__pool_alloc<pair_type> >();
-#endif
-}
diff --git a/libstdc++-v3/testsuite/performance/20_util/allocator/map_thread.cc b/libstdc++-v3/testsuite/performance/20_util/allocator/map_thread.cc
deleted file mode 100644
index 7335254746f..00000000000
--- a/libstdc++-v3/testsuite/performance/20_util/allocator/map_thread.cc
+++ /dev/null
@@ -1,139 +0,0 @@
-// Copyright (C) 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, 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.
-
-/*
- * The goal with this application is to compare the performance
- * between different std::allocator implementations. The results are
- * influenced by the underlying allocator in the "C" library, malloc.
- */
-
-// libstdc++/13823 recast for this testing framework
-
-#include <map>
-#include <iostream>
-#include <typeinfo>
-#include <sstream>
-#include <ext/mt_allocator.h>
-#include <ext/new_allocator.h>
-#include <ext/malloc_allocator.h>
-#include <ext/bitmap_allocator.h>
-#include <ext/pool_allocator.h>
-#include <cxxabi.h>
-#include <testsuite_performance.h>
-
-using namespace std;
-using __gnu_cxx::__mt_alloc;
-using __gnu_cxx::new_allocator;
-using __gnu_cxx::malloc_allocator;
-using __gnu_cxx::bitmap_allocator;
-using __gnu_cxx::__pool_alloc;
-
-// The number of iterations to be performed.
-int iterations = 10000;
-
-template<typename Container>
- void*
- do_loop(void* p = NULL)
- {
- try
- {
- for (int c = 0; c < 10; c++)
- {
- Container m;
- for (unsigned i = 0; i < iterations; ++i)
- m[i] = i;
- }
- }
- catch(...)
- {
- // No point allocating all available memory, repeatedly.
- }
- return p;
- }
-
-template<typename Container>
- void
- test_container(Container obj)
- {
- using namespace __gnu_test;
- int status;
-
- time_counter time;
- resource_counter resource;
-
- start_counters(time, resource);
-
- pthread_t t1, t2, t3, t4;
- pthread_create(&t1, NULL, &do_loop<Container>, NULL);
- pthread_create(&t2, NULL, &do_loop<Container>, NULL);
- pthread_create(&t3, NULL, &do_loop<Container>, NULL);
- pthread_create(&t4, NULL, &do_loop<Container>, NULL);
-
- pthread_join(t1, NULL);
- pthread_join(t2, NULL);
- pthread_join(t3, NULL);
- pthread_join(t4, NULL);
-
- stop_counters(time, resource);
-
- std::ostringstream comment;
- comment << "iterations: " << iterations << '\t';
- comment << "type: " << abi::__cxa_demangle(typeid(obj).name(),
- 0, 0, &status);
- report_header(__FILE__, comment.str());
- report_performance(__FILE__, string(), time, resource);
- }
-
-int main(void)
-{
- typedef pair<const int, int> pair_type;
-
-#ifdef TEST_T0
- test_container(map<int, int>());
-#endif
-#ifdef TEST_T1
- test_container(map<int, int, less<const int>,
- new_allocator<pair_type> >());
-#endif
-#ifdef TEST_T2
- test_container(map<int, int, less<const int>,
- malloc_allocator<pair_type> >());
-#endif
-#ifdef TEST_T3
- test_container(map<int, int, less<const int>,
- __mt_alloc<pair_type> >());
-#endif
-#ifdef TEST_T4
- test_container(map<int, int, less<const int>,
- bitmap_allocator<pair_type> >());
-#endif
-#ifdef TEST_T5
- test_container(map<int, int, less<const int>,
- __pool_alloc<pair_type> >());
-#endif
- return 0;
-}
diff --git a/libstdc++-v3/testsuite/performance/23_containers/container_benchmark.cc b/libstdc++-v3/testsuite/performance/23_containers/container_benchmark.cc
deleted file mode 100644
index 4e54374575d..00000000000
--- a/libstdc++-v3/testsuite/performance/23_containers/container_benchmark.cc
+++ /dev/null
@@ -1,175 +0,0 @@
-// 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, 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 <cmath>
-#include <cstdlib>
-
-#include <vector>
-#include <algorithm>
-#include <list>
-#include <deque>
-#include <set>
-
-#include <sstream>
-#include <testsuite_performance.h>
-
-using namespace std;
-
-typedef double element_t;
-typedef void(*test)(element_t*, element_t*);
-
-void array_test(element_t* first, element_t* last)
-{
- element_t* array = new element_t[last - first];
- copy(first, last, array);
- sort(array, array + (last - first));
- unique(array, array + (last - first));
- delete [] array;
-}
-
-void vector_pointer_test(element_t* first, element_t* last)
-{
- vector<element_t> container(first, last);
- sort(&*container.begin(), &*container.end());
- unique(&*container.begin(), &*container.end());
-}
-
-void vector_iterator_test(element_t* first, element_t* last)
-{
- vector<element_t> container(first, last);
- sort(container.begin(), container.end());
- unique(container.begin(), container.end());
-}
-
-void deque_test(element_t* first, element_t* last)
-{
- deque<element_t> container(first, last);
- copy(first, last, container.begin());
- sort(container.begin(), container.end());
- unique(container.begin(), container.end());
-}
-
-void list_test(element_t* first, element_t* last)
-{
- list<element_t> container(first, last);
- container.sort();
- container.unique();
-}
-
-void set_test(element_t* first, element_t* last)
-{ set<element_t> container(first, last); }
-
-void multiset_test(element_t* first, element_t* last)
-{
- multiset<element_t> container(first, last);
- typedef multiset<element_t>::iterator iterator;
- {
- iterator first = container.begin();
- iterator last = container.end();
-
- while (first != last)
- {
- iterator next = first;
- if (++next == last) break;
- if (*first == *next)
- container.erase(next);
- else
- ++first;
- }
- }
-}
-
-double logtwo(double x)
-{ return log(x)/log(2.0); }
-
-int number_of_tests(int size)
-{
- const double n = size;
- const double largest_n = 1000000;
- return int(floor((largest_n * logtwo(largest_n))
- / (n * logtwo(n))));
-}
-
-void initialize(element_t* first, element_t* last)
-{
- element_t value = 0.0;
- while (first != last)
- {
- *first++ = value;
- value += 1.;
- }
-}
-
-void run_tests(int size, const test* tests, const char** names,
- int ntests)
-{
- using namespace __gnu_test;
- time_counter time;
- resource_counter resource;
-
- const int n = number_of_tests(size);
- const size_t length = 2 * size;
-
- // make a random test set of the chosen size:
- vector<element_t> buf(length);
- element_t* buffer = &buf[0];
- element_t* buffer_end = &buf[length];
- initialize(buffer, buffer + size); // elements
- initialize(buffer + size, buffer_end); // duplicate elements
- random_shuffle(buffer, buffer_end);
-
- // test the containers:
- ostringstream oss;
- oss << "size = " << size << " :";
- report_header(__FILE__, oss.str());
- for (int i = 0; i < ntests; ++i)
- {
- start_counters(time, resource);
- for (int j = 0; j < n; ++j)
- tests[i](buffer, buffer_end);
- stop_counters(time, resource);
- report_performance(__FILE__, names[i], time, resource);
- clear_counters(time, resource);
- }
-}
-
-int main()
-{
- const test tests[] = { &array_test, &vector_pointer_test,
- &vector_iterator_test, &deque_test,
- &list_test, &set_test, &multiset_test };
- const int ntests = sizeof(tests) / sizeof(test);
- const char* names[ntests] = { "array", "vector (pointer)",
- "vector (iterator)", "deque",
- "list", "set", "multiset" };
-
- const int sizes[] = {100, 1000, 10000, 100000};
- for (int i = 0; i < sizeof(sizes) / sizeof(int); ++i)
- run_tests(sizes[i], tests, names, ntests);
-
- return 0;
-}
diff --git a/libstdc++-v3/testsuite/performance/23_containers/create/map.cc b/libstdc++-v3/testsuite/performance/23_containers/create/map.cc
new file mode 100644
index 00000000000..0fb836710ff
--- /dev/null
+++ b/libstdc++-v3/testsuite/performance/23_containers/create/map.cc
@@ -0,0 +1,62 @@
+// 2003-03-01 gp dot bolton at computer dot org
+
+// Copyright (C) 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, 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 <testsuite_common_types.h>
+
+template<typename Container, int Iter>
+ void
+ do_loop()
+ {
+ Container obj;
+ const int iterations = 250000;
+ for (int i = 0; i < iterations; ++i)
+ obj[i] = i;
+ }
+
+int
+main()
+{
+#ifdef TEST_S1
+#define thread_type false
+#endif
+
+#ifdef TEST_T1
+#define thread_type true
+#endif
+
+ typedef __gnu_test::maps<int, thread_type>::type container_types;
+
+ typedef test_sequence<thread_type> test_type;
+ test_type test("create");
+ __gnu_cxx::apply<test_type, container_types> applier;
+ applier(test);
+
+ return 0;
+}
+
diff --git a/libstdc++-v3/testsuite/performance/23_containers/create_from_sorted/set.cc b/libstdc++-v3/testsuite/performance/23_containers/create_from_sorted/set.cc
new file mode 100644
index 00000000000..13f7e10d30b
--- /dev/null
+++ b/libstdc++-v3/testsuite/performance/23_containers/create_from_sorted/set.cc
@@ -0,0 +1,72 @@
+// Copyright (C) 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, 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 <testsuite_common_types.h>
+
+template<typename Container, int Iter>
+ void
+ do_loop()
+ {
+ typedef int test_type;
+ typedef Container container_type;
+ static const unsigned max_size = 250000; // avoid excessive swap file use!
+ static const unsigned iterations = 10; // make results less random while
+ static const unsigned step = 50000; // keeping the total time reasonable
+
+ std::vector<test_type> v(max_size, 0);
+ for (test_type i = 0; i != max_size; ++i)
+ v[i] = i; // initialize sorted array
+
+ for (test_type count = step; count <= max_size; count += step)
+ {
+ // Measure set construction time (linear in count (Table 69))
+ for (test_type i = 0; i != iterations; ++i)
+ container_type(v.begin(), v.begin() + count);
+ }
+ }
+
+int
+main()
+{
+#ifdef TEST_S1
+#define thread_type false
+#endif
+
+#ifdef TEST_T1
+#define thread_type true
+#endif
+
+ typedef __gnu_test::sets<int, thread_type>::type container_types;
+
+ typedef test_sequence<thread_type> test_type;
+ test_type test("create_from_sorted");
+ __gnu_cxx::apply<test_type, container_types> applier;
+ applier(test);
+
+ return 0;
+}
+
diff --git a/libstdc++-v3/testsuite/performance/23_containers/create_sort/list.cc b/libstdc++-v3/testsuite/performance/23_containers/create_sort/list.cc
new file mode 100644
index 00000000000..389b59b3c42
--- /dev/null
+++ b/libstdc++-v3/testsuite/performance/23_containers/create_sort/list.cc
@@ -0,0 +1,65 @@
+// Copyright (C) 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, 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 <testsuite_common_types.h>
+
+template<typename Container, int Iter>
+ void
+ do_loop()
+ {
+ typedef Container container_type;
+ container_type obj;
+ const int iterations = 1000000;
+ for (unsigned int n = 1; n <= iterations; n *= 10)
+ {
+ for (unsigned int i = 0; i < n; ++i)
+ obj.push_back(n - i);
+ }
+ obj.sort();
+ }
+
+int
+main()
+{
+#ifdef TEST_S1
+#define thread_type false
+#endif
+
+#ifdef TEST_T1
+#define thread_type true
+#endif
+
+ typedef __gnu_test::lists<int, thread_type>::type container_types;
+
+ typedef test_sequence<thread_type> test_type;
+ test_type test("create_sort");
+ __gnu_cxx::apply<test_type, container_types> applier;
+ applier(test);
+
+ return 0;
+}
+
diff --git a/libstdc++-v3/testsuite/performance/23_containers/find/map.cc b/libstdc++-v3/testsuite/performance/23_containers/find/map.cc
new file mode 100644
index 00000000000..4cf5178b7ab
--- /dev/null
+++ b/libstdc++-v3/testsuite/performance/23_containers/find/map.cc
@@ -0,0 +1,68 @@
+// Copyright (C) 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, 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.
+
+// 2004-03-11 Dhruv Matani <dhruvbird@HotPOP.com>
+
+#include <testsuite_common_types.h>
+
+template<typename Container, int Iter>
+ void
+ do_loop()
+ {
+ Container obj;
+ int x = 2;
+ while (x--)
+ {
+ for (int i = 0; i < 300000; ++i)
+ obj.insert(std::make_pair(rand()%1000000, i));
+ for (int i = 0; i < 100000; ++i)
+ obj.insert(std::make_pair(rand()%2000000, i));
+ obj.clear();
+ }
+ }
+
+int
+main()
+{
+#ifdef TEST_S1
+#define thread_type false
+#endif
+
+#ifdef TEST_T1
+#define thread_type true
+#endif
+
+ typedef __gnu_test::maps<int, thread_type>::type container_types;
+
+ typedef test_sequence<thread_type> test_type;
+ test_type test("find");
+ __gnu_cxx::apply<test_type, container_types> applier;
+ applier(test);
+
+ return 0;
+}
+
diff --git a/libstdc++-v3/testsuite/performance/23_containers/index/map.cc b/libstdc++-v3/testsuite/performance/23_containers/index/map.cc
new file mode 100644
index 00000000000..84a0fec4cf2
--- /dev/null
+++ b/libstdc++-v3/testsuite/performance/23_containers/index/map.cc
@@ -0,0 +1,71 @@
+// Copyright (C) 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, 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 <testsuite_common_types.h>
+
+// libstdc++/13823 recast for this testing framework
+template<typename Container, int Iter>
+ void
+ do_loop()
+ {
+ try
+ {
+ Container obj;
+ for (int c = 0; c < 100; c++)
+ {
+ for (unsigned i = 0; i < Iter; ++i)
+ obj[i] = i;
+ }
+ }
+ catch(...)
+ {
+ // No point allocating all available memory, repeatedly.
+ }
+ }
+
+int
+main()
+{
+#ifdef TEST_S1
+#define thread_type false
+#endif
+
+#ifdef TEST_T1
+#define thread_type true
+#endif
+
+ using __gnu_test::associative_containers;
+ typedef __gnu_test::maps<int, thread_type>::type container_types;
+
+ typedef test_sequence<thread_type> test_type;
+ test_type test("index_associative");
+ __gnu_cxx::apply<test_type, container_types> applier;
+ applier(test);
+
+ return 0;
+}
+
diff --git a/libstdc++-v3/testsuite/performance/23_containers/insert/associative.cc b/libstdc++-v3/testsuite/performance/23_containers/insert/associative.cc
new file mode 100644
index 00000000000..180fe6afd91
--- /dev/null
+++ b/libstdc++-v3/testsuite/performance/23_containers/insert/associative.cc
@@ -0,0 +1,73 @@
+// Copyright (C) 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, 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 <testsuite_common_types.h>
+
+template<typename Container, int Iter>
+ void
+ do_loop()
+ {
+ Container obj; // XXX
+ int insert_values = 128; // XXX
+
+ int test_iterations = 0;
+
+ // XXX
+ // typedef typename Container::value_type test_type;
+ typedef int test_type;
+
+ value_type<test_type> test_value;
+ while (test_iterations < Iter)
+ {
+ for (int j = 0; j < insert_values; ++j)
+ obj.insert(++test_value);
+ ++test_iterations;
+ }
+ }
+
+int
+main()
+{
+#ifdef TEST_S1
+#define thread_type false
+#endif
+
+#ifdef TEST_T1
+#define thread_type true
+#endif
+
+ using __gnu_test::associative_containers;
+ typedef associative_containers<int, thread_type>::type container_types;
+
+ typedef test_sequence<thread_type> test_type;
+ test_type test("insert_associative");
+ __gnu_cxx::apply<test_type, container_types> applier;
+ applier(test);
+
+ return 0;
+}
+
diff --git a/libstdc++-v3/testsuite/performance/23_containers/insert/sequence.cc b/libstdc++-v3/testsuite/performance/23_containers/insert/sequence.cc
new file mode 100644
index 00000000000..851f3ba4430
--- /dev/null
+++ b/libstdc++-v3/testsuite/performance/23_containers/insert/sequence.cc
@@ -0,0 +1,69 @@
+// Copyright (C) 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, 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 <testsuite_common_types.h>
+
+template<typename Container, int Iter>
+ void
+ do_loop()
+ {
+ Container obj; // XXX
+ int insert_values = 128; // XXX
+
+ int test_iterations = 0;
+ typedef typename Container::value_type test_type;
+ value_type<test_type> test_value;
+ while (test_iterations < Iter)
+ {
+ for (int j = 0; j < insert_values; ++j)
+ obj.insert(obj.end(), ++test_value);
+ ++test_iterations;
+ }
+ }
+
+int
+main()
+{
+#ifdef TEST_S1
+#define thread_type false
+#endif
+
+#ifdef TEST_T1
+#define thread_type true
+#endif
+
+ using __gnu_test::sequence_containers;
+ typedef sequence_containers<int, thread_type>::type container_types;
+
+ typedef test_sequence<thread_type> test_type;
+ test_type test("insert_sequence");
+ __gnu_cxx::apply<test_type, container_types> applier;
+ applier(test);
+
+ return 0;
+}
+
diff --git a/libstdc++-v3/testsuite/performance/23_containers/insert_erase/associative.cc b/libstdc++-v3/testsuite/performance/23_containers/insert_erase/associative.cc
new file mode 100644
index 00000000000..0da9e345c0a
--- /dev/null
+++ b/libstdc++-v3/testsuite/performance/23_containers/insert_erase/associative.cc
@@ -0,0 +1,76 @@
+// Copyright (C) 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, 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 <testsuite_common_types.h>
+
+template<typename Container, int Iter>
+ void
+ do_loop()
+ {
+ // XXX
+ // typedef typename Container::value_type test_type;
+ typedef int test_type;
+ value_type<test_type> test_value;
+
+ const int insert_values = 128; // XXX
+ Container obj; // XXX
+ for (int i = 0; i < Iter; ++i)
+ {
+ for (int j = 0; j < insert_values; ++j)
+ obj.insert(++test_value);
+ }
+
+ const int erasei = static_cast<int>(Iter / 4);
+ for (int i = 0; i < erasei; ++i)
+ {
+ int key = i * 2;
+ obj.erase(key);
+ }
+ }
+
+int
+main()
+{
+#ifdef TEST_S1
+#define thread_type false
+#endif
+
+#ifdef TEST_T1
+#define thread_type true
+#endif
+
+ using __gnu_test::associative_containers;
+ typedef associative_containers<int, thread_type>::type container_types;
+
+ typedef test_sequence<thread_type> test_type;
+ test_type test("insert_erase_associative");
+ __gnu_cxx::apply<test_type, container_types> applier;
+ applier(test);
+
+ return 0;
+}
+
diff --git a/libstdc++-v3/testsuite/performance/23_containers/insert_from_sorted/set.cc b/libstdc++-v3/testsuite/performance/23_containers/insert_from_sorted/set.cc
new file mode 100644
index 00000000000..03f75281861
--- /dev/null
+++ b/libstdc++-v3/testsuite/performance/23_containers/insert_from_sorted/set.cc
@@ -0,0 +1,89 @@
+// Copyright (C) 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, 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 <testsuite_common_types.h>
+
+template<typename Container, int Iter>
+ void
+ do_loop()
+ {
+ // avoid excessive swap file use!
+ static const unsigned max_size = 250000;
+
+ // make results less random while
+ static const unsigned iterations = 10;
+
+ // keeping the total time reasonable
+ static const unsigned step = 50000;
+
+ using namespace std;
+ typedef int test_type;
+ typedef Container container_type;
+ typedef vector<test_type> vector_type;
+
+ // Initialize sorted array.
+ vector_type v(max_size, 0);
+ for (unsigned int i = 0; i != max_size; ++i)
+ v[i] = i;
+
+ for (unsigned int count = step; count <= max_size; count += step)
+ {
+ for (unsigned i = 0; i != iterations; ++i)
+ {
+ container_type test_set;
+ typename container_type::iterator iter = test_set.end();
+
+ // Each insert in amortized constant time (Table 69)
+ for (unsigned j = 0; j != count; ++j)
+ iter = test_set.insert(iter, v[j]);
+ }
+ }
+
+ }
+
+int
+main()
+{
+#ifdef TEST_S1
+#define thread_type false
+#endif
+
+#ifdef TEST_T1
+#define thread_type true
+#endif
+
+ using __gnu_test::associative_containers;
+ typedef __gnu_test::sets<int, thread_type>::type container_types;
+
+ typedef test_sequence<thread_type> test_type;
+ test_type test("insert_from_sorted");
+ __gnu_cxx::apply<test_type, container_types> applier;
+ applier(test);
+
+ return 0;
+}
+
diff --git a/libstdc++-v3/testsuite/performance/23_containers/list_create_fill_sort.cc b/libstdc++-v3/testsuite/performance/23_containers/list_create_fill_sort.cc
deleted file mode 100644
index 8999b43c53f..00000000000
--- a/libstdc++-v3/testsuite/performance/23_containers/list_create_fill_sort.cc
+++ /dev/null
@@ -1,64 +0,0 @@
-// 2003-07-07 gp dot bolton at computer dot org
-
-// 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, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
-// USA.
-
-#include <list>
-#include <testsuite_hooks.h>
-#include <testsuite_performance.h>
-
-
-static void create_and_fill_and_sort(const unsigned int n)
-{
- typedef std::list<int> List;
- List l;
-
- for (unsigned int i = 0; i < n; ++i)
- {
- l.push_back(n - i);
- }
- l.sort();
-}
-
-
-int main()
-{
- using namespace std;
- using namespace __gnu_test;
-
- time_counter time;
- resource_counter resource;
- char comment[80];
-
- for (unsigned int n = 1; n <= 1000; n *= 10)
- {
- const unsigned int iterations = 10000000/n;
-
- start_counters(time, resource);
-
- for (unsigned int i = 0; i < iterations; ++i)
- {
- create_and_fill_and_sort( n );
- }
- stop_counters(time, resource);
-
- sprintf(comment,"Iters: %8u Size: %4u", iterations, n);
- report_performance(__FILE__, comment, time, resource);
- }
- return 0;
-}
diff --git a/libstdc++-v3/testsuite/performance/23_containers/map_create_fill.cc b/libstdc++-v3/testsuite/performance/23_containers/map_create_fill.cc
deleted file mode 100644
index 0e675d00ffb..00000000000
--- a/libstdc++-v3/testsuite/performance/23_containers/map_create_fill.cc
+++ /dev/null
@@ -1,53 +0,0 @@
-// 2003-03-01 gp dot bolton at computer dot org
-
-// 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, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
-// USA.
-
-#include <map>
-#include <testsuite_hooks.h>
-#include <testsuite_performance.h>
-
-static void create_and_fill(const unsigned int n)
-{
- typedef std::map<int, int> Map;
- Map m;
- bool test __attribute__((unused)) = true;
-
- for (unsigned int i = 0; i < n; ++i)
- m[i] = i;
- VERIFY( m.size() == n );
-}
-
-// http://gcc.gnu.org/ml/libstdc++/2003-03/msg00000.html
-int main()
-{
- using namespace std;
- using namespace __gnu_test;
-
- time_counter time;
- resource_counter resource;
- const int iterations = 100000000;
-
- start_counters(time, resource);
- for (int i = 0; i < iterations; ++i)
- create_and_fill( 0 );
- stop_counters(time, resource);
- report_performance(__FILE__, "", time, resource);
-
- return 0;
-}
diff --git a/libstdc++-v3/testsuite/performance/20_util/allocator/producer_consumer.cc b/libstdc++-v3/testsuite/performance/23_containers/producer_consumer/associative.cc
index dd277a95fb1..3c2bc5d5a87 100644
--- a/libstdc++-v3/testsuite/performance/20_util/allocator/producer_consumer.cc
+++ b/libstdc++-v3/testsuite/performance/23_containers/producer_consumer/associative.cc
@@ -1,4 +1,4 @@
-// Copyright (C) 2004 Free Software Foundation, Inc.
+// Copyright (C) 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
@@ -25,53 +25,12 @@
// invalidate any other reasons why the executable file might be covered by
// the GNU General Public License.
-/*
- * The goal with this application is to compare the performance of
- * different allocators in a simple producer-consumer scenario.
- */
-
-// 2004-02-04 Felix Yen <fwy@alumni.brown.edu>
-
-#include <vector>
-#include <list>
-#include <map>
-#include <typeinfo>
-#include <sstream>
-#include <pthread.h>
-#include <ext/mt_allocator.h>
-#include <ext/new_allocator.h>
-#include <ext/malloc_allocator.h>
-#include <ext/bitmap_allocator.h>
-#include <ext/pool_allocator.h>
-#include <cxxabi.h>
-#include <testsuite_performance.h>
-
-
-using namespace std;
-using __gnu_cxx::__mt_alloc;
-using __gnu_cxx::new_allocator;
-using __gnu_cxx::malloc_allocator;
-using __gnu_cxx::bitmap_allocator;
-using __gnu_cxx::__pool_alloc;
-using abi::__cxa_demangle;
+#include <testsuite_common_types.h>
typedef int test_type;
-typedef less<test_type> compare_type;
-typedef malloc_allocator<test_type> malloc_alloc_type;
-typedef new_allocator<test_type> new_alloc_type;
-typedef __mt_alloc<test_type> so_alloc_type;
-typedef bitmap_allocator<test_type> bit_alloc_type;
-typedef __pool_alloc<test_type> po_alloc_type;
-
-typedef pair<const test_type, test_type> pair_type;
-typedef malloc_allocator<pair_type> malloc_pair_alloc_type;
-typedef new_allocator<pair_type> new_pair_alloc_type;
-typedef __mt_alloc<pair_type> so_pair_alloc_type;
-typedef bitmap_allocator<pair_type> bit_pair_alloc_type;
-typedef __pool_alloc<pair_type> po_pair_alloc_type;
// The number of iterations to be performed.
-int iterations = 10000;
+int iterations = 1000;
// TODO - restore Stefan's comment? i don't understand it. -- fwy
int insert_values = 128;
@@ -237,10 +196,10 @@ template<typename Container>
}
template<typename TestType>
- struct Value : public pair<TestType, TestType>
+ struct Value : public std::pair<TestType, TestType>
{
Value()
- : pair<TestType, TestType>(0, 0)
+ : std::pair<TestType, TestType>(0, 0)
{ }
inline Value operator++() {return ++this->first, *this;}
@@ -270,85 +229,29 @@ template<typename Container>
this->push_back(++test_value);
}
-template<typename Container>
+template<typename Container, int Iter>
void
- test_container(Container obj)
+ do_loop()
{
- using namespace __gnu_test;
- int status;
-
- time_counter time;
- resource_counter resource;
+ ProducerConsumer<Container> pc1;
+ ProducerConsumer<Container> pc2;
+ }
- clear_counters(time, resource);
- start_counters(time, resource);
- {
- ProducerConsumer<Container> pc1;
- ProducerConsumer<Container> pc2;
- }
- stop_counters(time, resource);
+int
+main()
+{
+#ifdef TEST_T1
+#define thread_type true
+#endif
- std::ostringstream comment;
- comment << "iterations: " << iterations << '\t';
- comment << "type: " << __cxa_demangle(typeid(obj).name(), 0, 0, &status);
- report_header(__FILE__, comment.str());
- report_performance(__FILE__, string(), time, resource);
- }
+ typedef __gnu_test::maps<test_type, thread_type>::type map_typelist;
+ typedef __gnu_test::sets<test_type, thread_type>::type set_typelist;
+ typedef __gnu_cxx::append<map_typelist, set_typelist>::type container_types;
-int main(void)
-{
-#ifdef TEST_T0
- test_container(vector<test_type, malloc_alloc_type>());
-#endif
-#ifdef TEST_T1
- test_container(vector<test_type, new_alloc_type>());
-#endif
-#ifdef TEST_T2
- test_container(vector<test_type, so_alloc_type>());
-#endif
-#ifdef TEST_T3
- test_container(vector<test_type, bit_alloc_type>());
-#endif
-#ifdef TEST_T4
- test_container(vector<test_type, po_alloc_type>());
-#endif
-
-#ifdef TEST_T5
- test_container(list<test_type, malloc_alloc_type>());
-#endif
-#ifdef TEST_T6
- test_container(list<test_type, new_alloc_type>());
-#endif
-#ifdef TEST_T7
- test_container(list<test_type, so_alloc_type>());
-#endif
-#ifdef TEST_T8
- test_container(list<test_type, bit_alloc_type>());
-#endif
-#ifdef TEST_T9
- test_container(list<test_type, po_alloc_type>());
-#endif
-
-#ifdef TEST_T10
- test_container(map<test_type, test_type, compare_type,
- malloc_pair_alloc_type>());
-#endif
-#ifdef TEST_T11
- test_container(map<test_type, test_type, compare_type,
- new_pair_alloc_type>());
-#endif
-#ifdef TEST_T12
- test_container(map<test_type, test_type, compare_type,
- so_pair_alloc_type>());
-#endif
-#ifdef TEST_T13
- test_container(map<test_type, test_type, compare_type,
- bit_pair_alloc_type>());
-#endif
-#ifdef TEST_T14
- test_container(map<test_type, test_type, compare_type,
- po_pair_alloc_type>());
-#endif
+ typedef test_sequence<thread_type> test_type;
+ test_type test("producer_consumer_associative");
+ __gnu_cxx::apply<test_type, container_types> applier;
+ applier(test);
return 0;
}
diff --git a/libstdc++-v3/testsuite/performance/23_containers/producer_consumer/sequence.cc b/libstdc++-v3/testsuite/performance/23_containers/producer_consumer/sequence.cc
new file mode 100644
index 00000000000..93284f89d39
--- /dev/null
+++ b/libstdc++-v3/testsuite/performance/23_containers/producer_consumer/sequence.cc
@@ -0,0 +1,257 @@
+// Copyright (C) 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, 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 <testsuite_common_types.h>
+
+typedef int test_type;
+
+// The number of iterations to be performed.
+int iterations = 1000;
+
+// TODO - restore Stefan's comment? i don't understand it. -- fwy
+int insert_values = 128;
+
+class Lock
+{
+public:
+ Lock() {pthread_mutex_init(&mutex, 0);}
+ ~Lock() {pthread_mutex_destroy(&mutex);}
+
+public:
+ inline pthread_mutex_t* operator&() {return &mutex;}
+
+public:
+ inline void lock() {pthread_mutex_lock(&mutex);}
+ inline void unlock() {pthread_mutex_unlock(&mutex);}
+
+private:
+ Lock(const Lock&);
+ Lock& operator=(Lock&);
+
+private:
+ pthread_mutex_t mutex;
+};
+
+class AutoLock
+{
+public:
+ AutoLock(Lock& _lock)
+ : lock(_lock)
+ {lock.lock();}
+
+ ~AutoLock() {lock.unlock();}
+
+private:
+ AutoLock(AutoLock&);
+ AutoLock& operator=(AutoLock&);
+
+private:
+ Lock& lock;
+};
+
+template<typename Container>
+ class Queue
+ {
+ public:
+ Queue() {pthread_cond_init(&condition, 0);}
+ ~Queue() {pthread_cond_destroy(&condition);}
+
+ public:
+ void push_back(const typename Container::value_type& x);
+ void swap(Container& container);
+
+ private:
+ pthread_cond_t condition;
+ Lock lock;
+ Container queue;
+ };
+
+template<typename Container>
+ void
+ Queue<Container>::push_back(const typename Container::value_type& value)
+ {
+ AutoLock auto_lock(lock);
+ const bool signal = queue.empty();
+ queue.insert(queue.end(), value);
+ if (signal) pthread_cond_signal(&condition);
+ }
+
+template<typename Container>
+ void
+ Queue<Container>::swap(Container& container)
+ {
+ AutoLock auto_lock(lock);
+ while (queue.empty()) pthread_cond_wait(&condition, &lock);
+ queue.swap(container);
+ }
+
+class Thread
+{
+ // NB: Make this the last data member of an object defining operator()().
+public:
+ class Attributes
+ {
+ public:
+ Attributes(int state = PTHREAD_CREATE_JOINABLE);
+ ~Attributes() {pthread_attr_destroy(&attributes);}
+
+ public:
+ inline pthread_attr_t* operator&() {return &attributes;}
+
+ private:
+ pthread_attr_t attributes;
+ };
+
+public:
+ Thread() {thread = pthread_self();}
+ ~Thread();
+
+public:
+ template <typename ThreadOwner>
+ void create(ThreadOwner* owner);
+
+private:
+ pthread_t thread;
+};
+
+Thread::Attributes::Attributes(int state)
+{
+ pthread_attr_init(&attributes);
+ pthread_attr_setdetachstate(&attributes, state);
+}
+
+Thread::~Thread()
+{
+ if (!pthread_equal(thread, pthread_self()))
+ pthread_join(thread, 0);
+}
+
+template<typename ThreadOwner>
+ void*
+ create_thread(void* _this)
+ {
+ ThreadOwner* owner = static_cast<ThreadOwner*>(_this);
+ (*owner)();
+ return 0;
+ }
+
+template<typename ThreadOwner>
+ void
+ Thread::create(ThreadOwner* owner)
+ {
+ Thread::Attributes attributes;
+ pthread_create(&thread, &attributes, create_thread<ThreadOwner>, owner);
+ }
+
+template<typename Container>
+ class Consumer
+ {
+ public:
+ Consumer(Queue<Container>& _queue)
+ : queue(_queue)
+ {thread.create(this);}
+
+ public:
+ void operator()();
+
+ private:
+ Queue<Container>& queue;
+ Thread thread;
+ };
+
+template<typename Container>
+ void
+ Consumer<Container>::operator()()
+ {
+ for (int j = insert_values * iterations; j > 0;)
+ {
+ Container container;
+ queue.swap(container);
+ j -= container.size();
+ }
+ }
+
+template<typename TestType>
+ struct Value : public std::pair<TestType, TestType>
+ {
+ Value()
+ : std::pair<TestType, TestType>(0, 0)
+ { }
+
+ inline Value operator++() {return ++this->first, *this;}
+ inline operator TestType() const {return this->first;}
+ };
+
+template<typename Container>
+ class ProducerConsumer : private Queue<Container>
+ {
+ public:
+ ProducerConsumer() {thread.create(this);}
+
+ public:
+ void operator()();
+
+ private:
+ Thread thread;
+ };
+
+template<typename Container>
+ void
+ ProducerConsumer<Container>::operator()()
+ {
+ Consumer<Container> consumer(*this);
+ Value<test_type> test_value;
+ for (int j = insert_values * iterations; j-- > 0;)
+ this->push_back(++test_value);
+ }
+
+template<typename Container, int Iter>
+ void
+ do_loop()
+ {
+ ProducerConsumer<Container> pc1;
+ ProducerConsumer<Container> pc2;
+ }
+
+int
+main()
+{
+#ifdef TEST_T1
+#define thread_type true
+#endif
+
+ using __gnu_test::sequence_containers;
+ typedef sequence_containers<test_type, thread_type>::type container_types;
+
+ typedef test_sequence<thread_type> test_type;
+ test_type test("producer_consumer_sequence");
+ __gnu_cxx::apply<test_type, container_types> applier;
+ applier(test);
+
+ return 0;
+}
+
diff --git a/libstdc++-v3/testsuite/performance/23_containers/sort_search/list.cc b/libstdc++-v3/testsuite/performance/23_containers/sort_search/list.cc
new file mode 100644
index 00000000000..5d2cda7930c
--- /dev/null
+++ b/libstdc++-v3/testsuite/performance/23_containers/sort_search/list.cc
@@ -0,0 +1,84 @@
+// Copyright (C) 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, 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 <testsuite_common_types.h>
+
+template<typename Container, int Iter>
+ void
+ do_loop()
+ {
+ // XXX
+ const int iter = 150000;
+ typedef Container container_type;
+ container_type obj;
+ int ctr = 3;
+ while (ctr--)
+ {
+ for (int i = 0; i < iter; ++i)
+ obj.push_back(rand()%500001);
+
+ //Search for random values that may or may not belong to the list.
+ for (int i = 0; i < 50; ++i)
+ std::find(obj.begin(), obj.end(), rand() % 100001);
+
+ obj.sort();
+
+ //Search for random values that may or may not belong to the list.
+ for (int i = 0; i < 50; ++i)
+ {
+ typedef typename container_type::iterator iterator_type;
+ iterator_type _liter = std::find(obj.begin(), obj.end(),
+ rand() % 100001);
+ if (_liter != obj.end())
+ obj.erase(_liter);
+ }
+ obj.clear();
+ }
+ }
+
+int
+main()
+{
+#ifdef TEST_S1
+#define thread_type false
+#endif
+
+#ifdef TEST_T1
+#define thread_type true
+#endif
+
+ using __gnu_test::sequence_containers;
+ typedef __gnu_test::lists<int, thread_type>::type container_types;
+
+ typedef test_sequence<thread_type> test_type;
+ test_type test("sort_search");
+ __gnu_cxx::apply<test_type, container_types> applier;
+ applier(test);
+
+ return 0;
+}
+
diff --git a/libstdc++-v3/testsuite/testsuite_common_types.h b/libstdc++-v3/testsuite/testsuite_common_types.h
new file mode 100644
index 00000000000..48a8b5f9d39
--- /dev/null
+++ b/libstdc++-v3/testsuite/testsuite_common_types.h
@@ -0,0 +1,425 @@
+// -*- C++ -*-
+// typelist for the C++ library testsuite.
+//
+// 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.
+//
+// As a special exception, you may use this file as part of a free software
+// library without restriction. Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General 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 _TESTSUITE_COMMON_TYPES_H
+#define _TESTSUITE_COMMON_TYPES_H 1
+
+#include <testsuite_visualization.h>
+#include <ext/typelist.h>
+
+#include <ext/new_allocator.h>
+#include <ext/malloc_allocator.h>
+#include <ext/mt_allocator.h>
+#include <ext/bitmap_allocator.h>
+#include <ext/pool_allocator.h>
+
+#include <vector>
+#include <list>
+#include <deque>
+#include <string>
+
+#include <map>
+#include <set>
+#include <ext/hash_map>
+#include <ext/hash_set>
+#include <tr1/unordered_map>
+#include <tr1/unordered_set>
+
+namespace __gnu_test
+{
+ using __gnu_cxx::typelist;
+ using __gnu_cxx::transform;
+ using __gnu_cxx::append;
+
+ // All the allocators to test.
+ template<typename Tp, bool Thread>
+ struct allocator_policies
+ {
+ typedef Tp value_type;
+ typedef __gnu_cxx::new_allocator<Tp> a1;
+ typedef __gnu_cxx::malloc_allocator<Tp> a2;
+ typedef __gnu_cxx::__common_pool_policy<__gnu_cxx::__pool, Thread> pool_policy;
+ typedef __gnu_cxx::__mt_alloc<Tp, pool_policy> a3;
+ typedef __gnu_cxx::bitmap_allocator<Tp> a4;
+ typedef __gnu_cxx::__pool_alloc<Tp> a5;
+ typedef typelist<_GLIBCXX_TYPELIST_CHAIN5(a1, a2, a3, a4, a5)> type;
+ };
+
+ // Typelists for vector, string, list, deque.
+ // XXX should just use template templates
+ template<typename Tp, bool Thread>
+ struct vectors
+ {
+ typedef Tp value_type;
+
+ template<typename Tl>
+ struct vector_shell
+ {
+ typedef Tl allocator_type;
+ typedef std::vector<value_type, allocator_type> type;
+ };
+
+ typedef allocator_policies<value_type, Thread> allocator_types;
+ typedef typename allocator_types::type allocator_typelist;
+ typedef typename transform<allocator_typelist, vector_shell>::type type;
+ };
+
+ template<typename Tp, bool Thread>
+ struct lists
+ {
+ typedef Tp value_type;
+
+ template<typename Tl>
+ struct list_shell
+ {
+ typedef Tl allocator_type;
+ typedef std::list<value_type, allocator_type> type;
+ };
+
+ typedef allocator_policies<value_type, Thread> allocator_types;
+ typedef typename allocator_types::type allocator_typelist;
+ typedef typename transform<allocator_typelist, list_shell>::type type;
+ };
+
+ template<typename Tp, bool Thread>
+ struct deques
+ {
+ typedef Tp value_type;
+
+ template<typename Tl>
+ struct deque_shell
+ {
+ typedef Tl allocator_type;
+ typedef std::deque<value_type, allocator_type> type;
+ };
+
+ typedef allocator_policies<value_type, Thread> allocator_types;
+ typedef typename allocator_types::type allocator_typelist;
+ typedef typename transform<allocator_typelist, deque_shell>::type type;
+ };
+
+ template<typename Tp, bool Thread>
+ struct strings
+ {
+ typedef Tp value_type;
+
+ template<typename Tl>
+ struct string_shell
+ {
+ typedef Tl allocator_type;
+ typedef std::char_traits<value_type> traits_type;
+ typedef std::basic_string<value_type, traits_type, allocator_type> type;
+ };
+
+ typedef allocator_policies<value_type, Thread> allocator_types;
+ typedef typename allocator_types::type allocator_typelist;
+ typedef typename transform<allocator_typelist, string_shell>::type type;
+ };
+
+ // A typelist of vector, list, deque, and string all instantiated
+ // with each of the allocator policies.
+ template<typename Tp, bool Thread>
+ struct sequence_containers
+ {
+ typedef Tp value_type;
+
+ typedef typename vectors<value_type, Thread>::type vector_typelist;
+ typedef typename lists<value_type, Thread>::type list_typelist;
+ typedef typename deques<value_type, Thread>::type deque_typelist;
+ typedef typename strings<value_type, Thread>::type string_typelist;
+
+ typedef typename append<vector_typelist, list_typelist>::type a1;
+ typedef typename append<deque_typelist, string_typelist>::type a2;
+ typedef typename append<a1, a2>::type type;
+ };
+
+ // Typelists for map, set, hash_map, hash_set, unordered_set, unordered_map.
+ template<typename Tp, bool Thread>
+ struct maps
+ {
+ typedef Tp value_type;
+ typedef Tp key_type;
+ typedef std::pair<const key_type, value_type> pair_type;
+ typedef std::less<key_type> compare_function;
+
+ template<typename Tl>
+ struct container
+ {
+ typedef Tl allocator_type;
+ typedef std::map<key_type, value_type, compare_function, allocator_type> type;
+ };
+
+ typedef allocator_policies<pair_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 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;
+ typedef Tp key_type;
+ typedef std::pair<const key_type, value_type> pair_type;
+ typedef std::tr1::hash<key_type> hash_function;
+ typedef std::equal_to<key_type> equality_function;
+
+ template<typename Tl>
+ struct container
+ {
+ typedef Tl allocator_type;
+ typedef std::tr1::unordered_map<key_type, value_type, hash_function, equality_function, allocator_type> type;
+ };
+
+ typedef allocator_policies<pair_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 sets
+ {
+ typedef Tp value_type;
+ typedef Tp key_type;
+ typedef std::less<key_type> compare_function;
+
+ template<typename Tl>
+ struct container
+ {
+ typedef Tl allocator_type;
+ typedef std::set<key_type, compare_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 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;
+ typedef Tp key_type;
+ typedef std::tr1::hash<key_type> hash_function;
+ typedef std::equal_to<key_type> equality_function;
+
+ template<typename Tl>
+ struct container
+ {
+ typedef Tl allocator_type;
+ typedef std::tr1::unordered_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;
+ };
+
+
+ // A typelist of all associated container types, with each of the
+ // allocator policies.
+ template<typename Tp, bool Thread>
+ struct associative_containers
+ {
+ typedef Tp value_type;
+
+ 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;
+ };
+
+} // namespace __gnu_test
+
+
+// Function template, function objects for the tests.
+template<typename TestType>
+ struct value_type : public std::pair<const TestType, TestType>
+ {
+ inline value_type& operator++()
+ {
+ ++this->second;
+ return *this;
+ }
+
+ inline operator TestType() const { return this->second; }
+ };
+
+template<typename Container, int Iter>
+ void
+ do_loop();
+
+template<typename Container, int Iter>
+ void*
+ do_thread(void* p = NULL)
+ {
+ do_loop<Container, Iter>();
+ return p;
+ }
+
+template<typename Container, int Iter, bool Thread>
+ void
+ test_container(const char* filename)
+ {
+ using namespace __gnu_test;
+ time_counter time;
+ resource_counter resource;
+ {
+ start_counters(time, resource);
+ if (!Thread)
+ {
+ // No threads, so run 4x.
+ do_loop<Container, Iter * 4>();
+ }
+ else
+ {
+#if defined (_GLIBCXX_GCC_GTHR_POSIX_H) && !defined (NOTHREAD)
+ pthread_t t1, t2, t3, t4;
+ pthread_create(&t1, 0, &do_thread<Container, Iter>, 0);
+ pthread_create(&t2, 0, &do_thread<Container, Iter>, 0);
+ pthread_create(&t3, 0, &do_thread<Container, Iter>, 0);
+ pthread_create(&t4, 0, &do_thread<Container, Iter>, 0);
+
+ pthread_join(t1, NULL);
+ pthread_join(t2, NULL);
+ pthread_join(t3, NULL);
+ pthread_join(t4, NULL);
+#endif
+ }
+ stop_counters(time, resource);
+
+ // Detailed text data.
+ Container obj;
+ int status;
+ std::ostringstream comment;
+ comment << "type: " << abi::__cxa_demangle(typeid(obj).name(),
+ 0, 0, &status);
+ report_header(filename, comment.str());
+ report_performance("", "", time, resource);
+
+ // Detailed data for visualization.
+ std::string vizfilename(filename);
+ vizfilename += ".dat";
+ write_viz_data(time, vizfilename.c_str());
+ }
+ }
+
+template<bool Thread>
+ struct test_sequence
+ {
+ test_sequence(const char* filename) : _M_filename(filename) { }
+
+ template<class Container>
+ void
+ operator()(__gnu_cxx::detail::type_to_type<Container>)
+ {
+ const int i = 20000;
+ test_container<Container, i, Thread>(_M_filename);
+ }
+
+ private:
+ const char* _M_filename;
+ };
+
+
+inline std::string::size_type
+sequence_find_container(std::string& type)
+{
+ const std::string::size_type npos = std::string::npos;
+ std::string::size_type n1 = type.find("vector");
+ std::string::size_type n2 = type.find("list");
+ std::string::size_type n3 = type.find("deque");
+ std::string::size_type n4 = type.find("string");
+
+ if (n1 != npos || n2 != npos || n3 != npos || n4 != npos)
+ return std::min(std::min(n1, n2), std::min(n3, n4));
+ else
+ throw std::runtime_error("sequence_find_container not found");
+}
+
+inline std::string::size_type
+associative_find_container(std::string& type)
+{
+ using std::string;
+ string::size_type n1 = type.find("map");
+ string::size_type n2 = type.find("set");
+ if (n1 != string::npos || n2 != string::npos)
+ return std::min(n1, n2);
+ else
+ throw std::runtime_error("associative_find_container not found");
+}
+#endif
diff --git a/libstdc++-v3/testsuite/testsuite_visualization.h b/libstdc++-v3/testsuite/testsuite_visualization.h
new file mode 100644
index 00000000000..0d249897f83
--- /dev/null
+++ b/libstdc++-v3/testsuite/testsuite_visualization.h
@@ -0,0 +1,150 @@
+// 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.
+
+// As a special exception, you may use this file as part of a free software
+// library without restriction. Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General 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 <typeinfo>
+#include <stdexcept>
+#include <sstream>
+#include <fstream>
+#include <cxxabi.h>
+#include <testsuite_performance.h>
+
+// Ah, we wish it wasn't so...
+bool first_container = false;
+extern const char* filename;
+
+typedef std::string::size_type (*callback_type) (std::string&);
+
+template<typename Container, int Iter, bool Thread>
+ void
+ write_viz_container(callback_type find_container, const char* filename)
+ {
+ typedef std::string string;
+
+ // Create title.
+ {
+ const char ws(' ');
+ std::ostringstream title;
+
+ std::string titlename(filename);
+ std::string::size_type n = titlename.find('.');
+ if (n != string::npos)
+ titlename = std::string(titlename.begin(), titlename.begin() + n);
+
+ title << titlename;
+ title << ws;
+ title << Iter;
+ title << ws;
+#if 0
+ title << "thread<";
+ std::boolalpha(title);
+ title << Thread;
+ title << '>';
+#endif
+
+ titlename += ".title";
+ std::ofstream titlefile(titlename.c_str());
+ if (!titlefile.good())
+ throw std::runtime_error("write_viz_data cannot open titlename");
+ titlefile << title.str() << std::endl;
+ }
+
+ // Create compressed type name.
+ Container obj;
+ int status;
+ std::string type(abi::__cxa_demangle(typeid(obj).name(), 0, 0, &status));
+
+ // Extract fully-qualified typename.
+ // Assumes "set" or "map" are uniquely determinate.
+ string::iterator beg = type.begin();
+ string::iterator end;
+ string::size_type n = (*find_container)(type);
+
+ // Find start of fully-qualified name.
+ // Assume map, find end.
+ string::size_type nend = type.find('<', n);
+ if (nend != string::npos)
+ end = type.begin() + nend;
+
+ string compressed_type;
+ compressed_type += '"';
+ compressed_type += string(beg, end);
+ compressed_type += '<';
+#if 0
+ typename Container::key_type v;
+ compressed_type += typeid(v).name();
+#else
+ compressed_type += "int";
+#endif
+ compressed_type += ", A>";
+
+ // XXX
+ if (Thread == true)
+ compressed_type += " thread";
+ compressed_type += '"';
+
+ std::ofstream file(filename, std::ios_base::app);
+ if (!file.good())
+ throw std::runtime_error("write_viz_data cannot open filename");
+
+ file << compressed_type;
+ first_container = false;
+ }
+
+
+void
+write_viz_data(__gnu_test::time_counter& time, const char* filename)
+{
+ std::ofstream file(filename, std::ios_base::app);
+ if (!file.good())
+ throw std::runtime_error("write_viz_data cannot open filename");
+
+ // Print out score in appropriate column.
+ const char tab('\t');
+ int score = time.real_time();
+ file << tab << score;
+}
+
+void
+write_viz_endl(const char* filename)
+{
+ std::ofstream file(filename, std::ios_base::app);
+ if (!file.good())
+ throw std::runtime_error("write_viz_endl cannot open filename");
+ file << std::endl;
+}
+
+
+#if 0
+// cons
+write_viz_container<container_type, Iter, Thread>(&sequence_find_container,
+ filename);
+#endif
+
+#if 0
+// dtor
+write_viz_endl(filename)
+#endif