From 093490090d44401d9dfd0782398fc0bc79a7a54b Mon Sep 17 00:00:00 2001 From: bkoz Date: Wed, 4 Jun 2008 15:53:09 +0000 Subject: [PATCH] 2008-06-04 Benjamin Kosnik * include/ext/pb_ds/assoc_container.hpp: Change allocator typedef to allocator_type, as per existing conventions. * include/ext/pb_ds/detail/binomial_heap_base_/ binomial_heap_base_.hpp: Same. * include/ext/pb_ds/detail/cc_hash_table_map_/cc_ht_map_.hpp: Same. * include/ext/pb_ds/detail/pat_trie_/pat_trie_.hpp: Same. * include/ext/pb_ds/detail/bin_search_tree_/bin_search_tree_.hpp: Same. * include/ext/pb_ds/detail/gp_hash_table_map_/gp_ht_map_.hpp: Same. * include/ext/pb_ds/detail/binary_heap_/binary_heap_.hpp: Same. * include/ext/pb_ds/detail/trie_policy/trie_policy_base.hpp: Same. * include/ext/pb_ds/detail/pairing_heap_/pairing_heap_.hpp: Same. * include/ext/pb_ds/detail/binomial_heap_/binomial_heap_.hpp: Same. * include/ext/pb_ds/detail/left_child_next_sibling_heap_/ left_child_next_sibling_heap_.hpp: Same. * include/ext/pb_ds/detail/thin_heap_/thin_heap_.hpp: Same. * include/ext/pb_ds/detail/ov_tree_map_/ov_tree_map_.hpp: Same. * include/ext/pb_ds/detail/splay_tree_/splay_tree_.hpp: Same. * include/ext/pb_ds/detail/list_update_map_/lu_map_.hpp: Same. * include/ext/pb_ds/detail/rc_binomial_heap_/ rc_binomial_heap_.hpp: Same. * include/ext/pb_ds/detail/rc_binomial_heap_/rc.hpp: Same. * include/ext/pb_ds/detail/rb_tree_map_/rb_tree_.hpp: Same. * include/ext/pb_ds/list_update_policy.hpp: Same. * include/ext/pb_ds/exception.hpp: Same. * include/ext/pb_ds/tree_policy.hpp: Same. * include/ext/pb_ds/trie_policy.hpp: Same. * include/ext/pb_ds/priority_queue.hpp: Same. * testsuite/util/regression/trait/assoc/trait.hpp: Same. * testsuite/util/regression/trait/assoc/type_trait.hpp: Same. * testsuite/util/regression/rand/priority_queue/detail/ defs_fn_imps.hpp: Same. * testsuite/util/regression/rand/priority_queue/detail/ operator_fn_imps.hpp: Same. * testsuite/util/regression/rand/priority_queue/ container_rand_regression_test.hpp: Same. * testsuite/util/regression/rand/assoc/detail/defs_fn_imps.hpp: Same. * testsuite/util/regression/rand/assoc/detail/ operator_fn_imps.hpp: Same. * testsuite/util/regression/rand/assoc/ container_rand_regression_test.hpp: Same. * testsuite/util/native_type/assoc/native_multimap.hpp: Same. * testsuite/util/native_type/assoc/native_hash_multimap.hpp: Same. * testsuite/util/common_type/assoc/detail/ tree_supports_order_statistics.hpp: Same. * testsuite/util/common_type/assoc/detail/ trie_supports_prefix_search.hpp: Same. * testsuite/util/common_type/assoc/detail/ trie_supports_order_statistics.hpp: Same. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@136359 138bc75d-0d04-0410-961f-82ee72b054a4 --- libstdc++-v3/ChangeLog | 51 ++++++++++++++++++++++ libstdc++-v3/include/ext/pb_ds/assoc_container.hpp | 14 +++--- .../detail/bin_search_tree_/bin_search_tree_.hpp | 2 +- .../ext/pb_ds/detail/binary_heap_/binary_heap_.hpp | 2 +- .../pb_ds/detail/binomial_heap_/binomial_heap_.hpp | 2 +- .../binomial_heap_base_/binomial_heap_base_.hpp | 2 +- .../pb_ds/detail/cc_hash_table_map_/cc_ht_map_.hpp | 2 +- .../pb_ds/detail/gp_hash_table_map_/gp_ht_map_.hpp | 2 +- .../left_child_next_sibling_heap_.hpp | 2 +- .../ext/pb_ds/detail/list_update_map_/lu_map_.hpp | 2 +- .../ext/pb_ds/detail/ov_tree_map_/ov_tree_map_.hpp | 2 +- .../pb_ds/detail/pairing_heap_/pairing_heap_.hpp | 2 +- .../ext/pb_ds/detail/pat_trie_/pat_trie_.hpp | 2 +- .../ext/pb_ds/detail/rb_tree_map_/rb_tree_.hpp | 2 +- .../ext/pb_ds/detail/rc_binomial_heap_/rc.hpp | 10 ++--- .../detail/rc_binomial_heap_/rc_binomial_heap_.hpp | 2 +- .../ext/pb_ds/detail/splay_tree_/splay_tree_.hpp | 2 +- .../ext/pb_ds/detail/thin_heap_/thin_heap_.hpp | 2 +- .../pb_ds/detail/trie_policy/trie_policy_base.hpp | 4 +- libstdc++-v3/include/ext/pb_ds/exception.hpp | 2 +- .../include/ext/pb_ds/list_update_policy.hpp | 8 ++-- libstdc++-v3/include/ext/pb_ds/priority_queue.hpp | 8 ++-- libstdc++-v3/include/ext/pb_ds/tree_policy.hpp | 6 +-- libstdc++-v3/include/ext/pb_ds/trie_policy.hpp | 8 ++-- .../detail/tree_supports_order_statistics.hpp | 2 +- .../detail/trie_supports_order_statistics.hpp | 2 +- .../assoc/detail/trie_supports_prefix_search.hpp | 2 +- .../native_type/assoc/native_hash_multimap.hpp | 4 +- .../util/native_type/assoc/native_multimap.hpp | 2 +- .../rand/assoc/container_rand_regression_test.hpp | 2 +- .../regression/rand/assoc/detail/defs_fn_imps.hpp | 2 +- .../rand/assoc/detail/operator_fn_imps.hpp | 2 +- .../container_rand_regression_test.hpp | 2 +- .../rand/priority_queue/detail/defs_fn_imps.hpp | 15 +------ .../priority_queue/detail/operator_fn_imps.hpp | 2 +- .../util/regression/trait/assoc/trait.hpp | 2 +- .../util/regression/trait/assoc/type_trait.hpp | 4 +- 37 files changed, 111 insertions(+), 73 deletions(-) diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog index 1132ddd..d06e303 100644 --- a/libstdc++-v3/ChangeLog +++ b/libstdc++-v3/ChangeLog @@ -1,3 +1,54 @@ +2008-06-04 Benjamin Kosnik + + * include/ext/pb_ds/assoc_container.hpp: Change allocator typedef + to allocator_type, as per existing conventions. + * include/ext/pb_ds/detail/binomial_heap_base_/ + binomial_heap_base_.hpp: Same. + * include/ext/pb_ds/detail/cc_hash_table_map_/cc_ht_map_.hpp: Same. + * include/ext/pb_ds/detail/pat_trie_/pat_trie_.hpp: Same. + * include/ext/pb_ds/detail/bin_search_tree_/bin_search_tree_.hpp: Same. + * include/ext/pb_ds/detail/gp_hash_table_map_/gp_ht_map_.hpp: Same. + * include/ext/pb_ds/detail/binary_heap_/binary_heap_.hpp: Same. + * include/ext/pb_ds/detail/trie_policy/trie_policy_base.hpp: Same. + * include/ext/pb_ds/detail/pairing_heap_/pairing_heap_.hpp: Same. + * include/ext/pb_ds/detail/binomial_heap_/binomial_heap_.hpp: Same. + * include/ext/pb_ds/detail/left_child_next_sibling_heap_/ + left_child_next_sibling_heap_.hpp: Same. + * include/ext/pb_ds/detail/thin_heap_/thin_heap_.hpp: Same. + * include/ext/pb_ds/detail/ov_tree_map_/ov_tree_map_.hpp: Same. + * include/ext/pb_ds/detail/splay_tree_/splay_tree_.hpp: Same. + * include/ext/pb_ds/detail/list_update_map_/lu_map_.hpp: Same. + * include/ext/pb_ds/detail/rc_binomial_heap_/ + rc_binomial_heap_.hpp: Same. + * include/ext/pb_ds/detail/rc_binomial_heap_/rc.hpp: Same. + * include/ext/pb_ds/detail/rb_tree_map_/rb_tree_.hpp: Same. + * include/ext/pb_ds/list_update_policy.hpp: Same. + * include/ext/pb_ds/exception.hpp: Same. + * include/ext/pb_ds/tree_policy.hpp: Same. + * include/ext/pb_ds/trie_policy.hpp: Same. + * include/ext/pb_ds/priority_queue.hpp: Same. + * testsuite/util/regression/trait/assoc/trait.hpp: Same. + * testsuite/util/regression/trait/assoc/type_trait.hpp: Same. + * testsuite/util/regression/rand/priority_queue/detail/ + defs_fn_imps.hpp: Same. + * testsuite/util/regression/rand/priority_queue/detail/ + operator_fn_imps.hpp: Same. + * testsuite/util/regression/rand/priority_queue/ + container_rand_regression_test.hpp: Same. + * testsuite/util/regression/rand/assoc/detail/defs_fn_imps.hpp: Same. + * testsuite/util/regression/rand/assoc/detail/ + operator_fn_imps.hpp: Same. + * testsuite/util/regression/rand/assoc/ + container_rand_regression_test.hpp: Same. + * testsuite/util/native_type/assoc/native_multimap.hpp: Same. + * testsuite/util/native_type/assoc/native_hash_multimap.hpp: Same. + * testsuite/util/common_type/assoc/detail/ + tree_supports_order_statistics.hpp: Same. + * testsuite/util/common_type/assoc/detail/ + trie_supports_prefix_search.hpp: Same. + * testsuite/util/common_type/assoc/detail/ + trie_supports_order_statistics.hpp: Same. + 2008-06-02 Sandra Loosemore Daniel Jacobowitz diff --git a/libstdc++-v3/include/ext/pb_ds/assoc_container.hpp b/libstdc++-v3/include/ext/pb_ds/assoc_container.hpp index e2ac37c..8dbb43a 100644 --- a/libstdc++-v3/include/ext/pb_ds/assoc_container.hpp +++ b/libstdc++-v3/include/ext/pb_ds/assoc_container.hpp @@ -71,13 +71,13 @@ namespace __gnu_pbds public: typedef Tag container_category; - typedef Allocator allocator; - typedef typename allocator::size_type size_type; - typedef typename allocator::difference_type difference_type; + typedef Allocator allocator_type; + typedef typename allocator_type::size_type size_type; + typedef typename allocator_type::difference_type difference_type; // key_type - typedef typename allocator::template rebind::other::value_type key_type; - typedef typename allocator::template rebind::other key_rebind; + typedef typename allocator_type::template rebind::other::value_type key_type; + typedef typename allocator_type::template rebind::other key_rebind; typedef typename key_rebind::reference key_reference; typedef typename key_rebind::const_reference const_key_reference; typedef typename key_rebind::pointer key_pointer; @@ -85,7 +85,7 @@ namespace __gnu_pbds // mapped_type typedef Mapped mapped_type; - typedef typename allocator::template rebind::other mapped_rebind; + typedef typename allocator_type::template rebind::other mapped_rebind; typedef typename mapped_rebind::reference mapped_reference; typedef typename mapped_rebind::const_reference const_mapped_reference; typedef typename mapped_rebind::pointer mapped_pointer; @@ -93,7 +93,7 @@ namespace __gnu_pbds // value_type typedef typename base_type::value_type value_type; - typedef typename allocator::template rebind::other value_rebind; + typedef typename allocator_type::template rebind::other value_rebind; typedef typename value_rebind::reference reference; typedef typename value_rebind::const_reference const_reference; typedef typename value_rebind::pointer pointer; diff --git a/libstdc++-v3/include/ext/pb_ds/detail/bin_search_tree_/bin_search_tree_.hpp b/libstdc++-v3/include/ext/pb_ds/detail/bin_search_tree_/bin_search_tree_.hpp index 6e46ced..587cfe0 100644 --- a/libstdc++-v3/include/ext/pb_ds/detail/bin_search_tree_/bin_search_tree_.hpp +++ b/libstdc++-v3/include/ext/pb_ds/detail/bin_search_tree_/bin_search_tree_.hpp @@ -241,7 +241,7 @@ namespace __gnu_pbds typedef Cmp_Fn cmp_fn; - typedef Allocator allocator; + typedef Allocator allocator_type; typedef typename Node_And_It_Traits::node_update node_update; diff --git a/libstdc++-v3/include/ext/pb_ds/detail/binary_heap_/binary_heap_.hpp b/libstdc++-v3/include/ext/pb_ds/detail/binary_heap_/binary_heap_.hpp index cf10195..310ddad 100644 --- a/libstdc++-v3/include/ext/pb_ds/detail/binary_heap_/binary_heap_.hpp +++ b/libstdc++-v3/include/ext/pb_ds/detail/binary_heap_/binary_heap_.hpp @@ -178,7 +178,7 @@ namespace __gnu_pbds typedef Cmp_Fn cmp_fn; - typedef Allocator allocator; + typedef Allocator allocator_type; public: diff --git a/libstdc++-v3/include/ext/pb_ds/detail/binomial_heap_/binomial_heap_.hpp b/libstdc++-v3/include/ext/pb_ds/detail/binomial_heap_/binomial_heap_.hpp index 8f1826e..3641faa 100644 --- a/libstdc++-v3/include/ext/pb_ds/detail/binomial_heap_/binomial_heap_.hpp +++ b/libstdc++-v3/include/ext/pb_ds/detail/binomial_heap_/binomial_heap_.hpp @@ -93,7 +93,7 @@ namespace __gnu_pbds typedef typename base_type::const_iterator const_iterator; typedef typename base_type::iterator iterator; typedef typename base_type::cmp_fn cmp_fn; - typedef typename base_type::allocator allocator; + typedef typename base_type::allocator_type allocator_type; binomial_heap_(); diff --git a/libstdc++-v3/include/ext/pb_ds/detail/binomial_heap_base_/binomial_heap_base_.hpp b/libstdc++-v3/include/ext/pb_ds/detail/binomial_heap_base_/binomial_heap_base_.hpp index acd1c3c..c770636 100644 --- a/libstdc++-v3/include/ext/pb_ds/detail/binomial_heap_base_/binomial_heap_base_.hpp +++ b/libstdc++-v3/include/ext/pb_ds/detail/binomial_heap_base_/binomial_heap_base_.hpp @@ -138,7 +138,7 @@ namespace __gnu_pbds typedef Cmp_Fn cmp_fn; - typedef Allocator allocator; + typedef Allocator allocator_type; public: diff --git a/libstdc++-v3/include/ext/pb_ds/detail/cc_hash_table_map_/cc_ht_map_.hpp b/libstdc++-v3/include/ext/pb_ds/detail/cc_hash_table_map_/cc_ht_map_.hpp index 3a772fa..71c7327 100644 --- a/libstdc++-v3/include/ext/pb_ds/detail/cc_hash_table_map_/cc_ht_map_.hpp +++ b/libstdc++-v3/include/ext/pb_ds/detail/cc_hash_table_map_/cc_ht_map_.hpp @@ -167,7 +167,7 @@ namespace __gnu_pbds #undef PB_DS_GEN_POS public: - typedef Allocator allocator; + typedef Allocator allocator_type; typedef typename Allocator::size_type size_type; typedef typename Allocator::difference_type difference_type; typedef Hash_Fn hash_fn; diff --git a/libstdc++-v3/include/ext/pb_ds/detail/gp_hash_table_map_/gp_ht_map_.hpp b/libstdc++-v3/include/ext/pb_ds/detail/gp_hash_table_map_/gp_ht_map_.hpp index 8da31e7..2fcb25c 100644 --- a/libstdc++-v3/include/ext/pb_ds/detail/gp_hash_table_map_/gp_ht_map_.hpp +++ b/libstdc++-v3/include/ext/pb_ds/detail/gp_hash_table_map_/gp_ht_map_.hpp @@ -168,7 +168,7 @@ namespace __gnu_pbds #undef PB_DS_GEN_POS public: - typedef Allocator allocator; + typedef Allocator allocator_type; typedef typename Allocator::size_type size_type; typedef typename Allocator::difference_type difference_type; typedef Hash_Fn hash_fn; diff --git a/libstdc++-v3/include/ext/pb_ds/detail/left_child_next_sibling_heap_/left_child_next_sibling_heap_.hpp b/libstdc++-v3/include/ext/pb_ds/detail/left_child_next_sibling_heap_/left_child_next_sibling_heap_.hpp index 196ae30..a200b7e 100644 --- a/libstdc++-v3/include/ext/pb_ds/detail/left_child_next_sibling_heap_/left_child_next_sibling_heap_.hpp +++ b/libstdc++-v3/include/ext/pb_ds/detail/left_child_next_sibling_heap_/left_child_next_sibling_heap_.hpp @@ -194,7 +194,7 @@ namespace __gnu_pbds typedef Cmp_Fn cmp_fn; - typedef Allocator allocator; + typedef Allocator allocator_type; public: diff --git a/libstdc++-v3/include/ext/pb_ds/detail/list_update_map_/lu_map_.hpp b/libstdc++-v3/include/ext/pb_ds/detail/list_update_map_/lu_map_.hpp index 267becc..8b8b1cf 100644 --- a/libstdc++-v3/include/ext/pb_ds/detail/list_update_map_/lu_map_.hpp +++ b/libstdc++-v3/include/ext/pb_ds/detail/list_update_map_/lu_map_.hpp @@ -154,7 +154,7 @@ namespace __gnu_pbds typedef cond_dealtor cond_dealtor_t; public: - typedef Allocator allocator; + typedef Allocator allocator_type; typedef typename Allocator::size_type size_type; typedef typename Allocator::difference_type difference_type; typedef Eq_Fn eq_fn; diff --git a/libstdc++-v3/include/ext/pb_ds/detail/ov_tree_map_/ov_tree_map_.hpp b/libstdc++-v3/include/ext/pb_ds/detail/ov_tree_map_/ov_tree_map_.hpp index 421a6be..3abb259 100644 --- a/libstdc++-v3/include/ext/pb_ds/detail/ov_tree_map_/ov_tree_map_.hpp +++ b/libstdc++-v3/include/ext/pb_ds/detail/ov_tree_map_/ov_tree_map_.hpp @@ -158,7 +158,7 @@ namespace __gnu_pbds public: - typedef Allocator allocator; + typedef Allocator allocator_type; typedef typename Allocator::size_type size_type; typedef typename Allocator::difference_type difference_type; diff --git a/libstdc++-v3/include/ext/pb_ds/detail/pairing_heap_/pairing_heap_.hpp b/libstdc++-v3/include/ext/pb_ds/detail/pairing_heap_/pairing_heap_.hpp index 6d37906..4ad1e41 100644 --- a/libstdc++-v3/include/ext/pb_ds/detail/pairing_heap_/pairing_heap_.hpp +++ b/libstdc++-v3/include/ext/pb_ds/detail/pairing_heap_/pairing_heap_.hpp @@ -137,7 +137,7 @@ namespace __gnu_pbds typedef Cmp_Fn cmp_fn; - typedef Allocator allocator; + typedef Allocator allocator_type; pairing_heap_(); diff --git a/libstdc++-v3/include/ext/pb_ds/detail/pat_trie_/pat_trie_.hpp b/libstdc++-v3/include/ext/pb_ds/detail/pat_trie_/pat_trie_.hpp index 00a00d3..eb55ea5 100644 --- a/libstdc++-v3/include/ext/pb_ds/detail/pat_trie_/pat_trie_.hpp +++ b/libstdc++-v3/include/ext/pb_ds/detail/pat_trie_/pat_trie_.hpp @@ -164,7 +164,7 @@ namespace __gnu_pbds public: typedef pat_trie_tag container_category; - typedef Allocator allocator; + typedef Allocator allocator_type; typedef typename Allocator::size_type size_type; typedef typename Allocator::difference_type difference_type; diff --git a/libstdc++-v3/include/ext/pb_ds/detail/rb_tree_map_/rb_tree_.hpp b/libstdc++-v3/include/ext/pb_ds/detail/rb_tree_map_/rb_tree_.hpp index b5d50a9..6d63839 100644 --- a/libstdc++-v3/include/ext/pb_ds/detail/rb_tree_map_/rb_tree_.hpp +++ b/libstdc++-v3/include/ext/pb_ds/detail/rb_tree_map_/rb_tree_.hpp @@ -124,7 +124,7 @@ namespace __gnu_pbds public: typedef Cmp_Fn cmp_fn; - typedef Allocator allocator; + typedef Allocator allocator_type; typedef typename Allocator::size_type size_type; typedef typename Allocator::difference_type difference_type; typedef typename base_type::key_type key_type; diff --git a/libstdc++-v3/include/ext/pb_ds/detail/rc_binomial_heap_/rc.hpp b/libstdc++-v3/include/ext/pb_ds/detail/rc_binomial_heap_/rc.hpp index fc90ea7..a0832bf9 100644 --- a/libstdc++-v3/include/ext/pb_ds/detail/rc_binomial_heap_/rc.hpp +++ b/libstdc++-v3/include/ext/pb_ds/detail/rc_binomial_heap_/rc.hpp @@ -62,24 +62,24 @@ namespace __gnu_pbds class rc { private: - typedef Allocator allocator; + typedef Allocator allocator_type; - typedef typename allocator::size_type size_type; + typedef typename allocator_type::size_type size_type; typedef Node node; typedef - typename allocator::template rebind< + typename allocator_type::template rebind< node>::other::pointer node_pointer; typedef - typename allocator::template rebind< + typename allocator_type::template rebind< node_pointer>::other::pointer entry_pointer; typedef - typename allocator::template rebind< + typename allocator_type::template rebind< node_pointer>::other::const_pointer const_entry_pointer; diff --git a/libstdc++-v3/include/ext/pb_ds/detail/rc_binomial_heap_/rc_binomial_heap_.hpp b/libstdc++-v3/include/ext/pb_ds/detail/rc_binomial_heap_/rc_binomial_heap_.hpp index 5b4a3b4..729dccf 100644 --- a/libstdc++-v3/include/ext/pb_ds/detail/rc_binomial_heap_/rc_binomial_heap_.hpp +++ b/libstdc++-v3/include/ext/pb_ds/detail/rc_binomial_heap_/rc_binomial_heap_.hpp @@ -112,7 +112,7 @@ namespace __gnu_pbds typedef typename base_type::cmp_fn cmp_fn; - typedef typename base_type::allocator allocator; + typedef typename base_type::allocator_type allocator_type; public: diff --git a/libstdc++-v3/include/ext/pb_ds/detail/splay_tree_/splay_tree_.hpp b/libstdc++-v3/include/ext/pb_ds/detail/splay_tree_/splay_tree_.hpp index 1642abb..10be0c2 100644 --- a/libstdc++-v3/include/ext/pb_ds/detail/splay_tree_/splay_tree_.hpp +++ b/libstdc++-v3/include/ext/pb_ds/detail/splay_tree_/splay_tree_.hpp @@ -145,7 +145,7 @@ namespace __gnu_pbds typedef typename base_type::node_pointer node_pointer; public: - typedef Allocator allocator; + typedef Allocator allocator_type; typedef typename Allocator::size_type size_type; typedef typename Allocator::difference_type difference_type; typedef Cmp_Fn cmp_fn; diff --git a/libstdc++-v3/include/ext/pb_ds/detail/thin_heap_/thin_heap_.hpp b/libstdc++-v3/include/ext/pb_ds/detail/thin_heap_/thin_heap_.hpp index ee874e8..9eb617d 100644 --- a/libstdc++-v3/include/ext/pb_ds/detail/thin_heap_/thin_heap_.hpp +++ b/libstdc++-v3/include/ext/pb_ds/detail/thin_heap_/thin_heap_.hpp @@ -137,7 +137,7 @@ namespace __gnu_pbds typedef Cmp_Fn cmp_fn; - typedef Allocator allocator; + typedef Allocator allocator_type; public: diff --git a/libstdc++-v3/include/ext/pb_ds/detail/trie_policy/trie_policy_base.hpp b/libstdc++-v3/include/ext/pb_ds/detail/trie_policy/trie_policy_base.hpp index 2a1319a..c114630 100644 --- a/libstdc++-v3/include/ext/pb_ds/detail/trie_policy/trie_policy_base.hpp +++ b/libstdc++-v3/include/ext/pb_ds/detail/trie_policy/trie_policy_base.hpp @@ -85,9 +85,9 @@ namespace __gnu_pbds typedef E_Access_Traits e_access_traits; - typedef Allocator allocator; + typedef Allocator allocator_type; - typedef typename allocator::size_type size_type; + typedef typename allocator_type::size_type size_type; typedef null_node_metadata metadata_type; diff --git a/libstdc++-v3/include/ext/pb_ds/exception.hpp b/libstdc++-v3/include/ext/pb_ds/exception.hpp index 77d3f2d..4a35931 100644 --- a/libstdc++-v3/include/ext/pb_ds/exception.hpp +++ b/libstdc++-v3/include/ext/pb_ds/exception.hpp @@ -61,7 +61,7 @@ namespace __gnu_pbds // An entry cannot be inserted into a container object for logical // reasons (not, e.g., if memory is unabvailable, in which case - // the allocator's exception will be thrown). + // the allocator_type's exception will be thrown). struct insert_error : public container_error { }; // A join cannot be performed logical reasons (i.e., the ranges of diff --git a/libstdc++-v3/include/ext/pb_ds/list_update_policy.hpp b/libstdc++-v3/include/ext/pb_ds/list_update_policy.hpp index 5a63a3e..67a4e88 100644 --- a/libstdc++-v3/include/ext/pb_ds/list_update_policy.hpp +++ b/libstdc++-v3/include/ext/pb_ds/list_update_policy.hpp @@ -66,13 +66,13 @@ namespace __gnu_pbds class move_to_front_lu_policy { public: - typedef Allocator allocator; + typedef Allocator allocator_type; // Metadata on which this functor operates. typedef null_lu_metadata metadata_type; // Reference to metadata on which this functor operates. - typedef typename allocator::template rebind::other metadata_rebind; + typedef typename allocator_type::template rebind::other metadata_rebind; typedef typename metadata_rebind::reference metadata_reference; // Creates a metadata object. @@ -103,14 +103,14 @@ namespace __gnu_pbds : private detail::counter_lu_policy_base { public: - typedef Allocator allocator; + typedef Allocator allocator_type; enum { max_count = Max_Count }; - typedef typename allocator::size_type size_type; + typedef typename allocator_type::size_type size_type; // Metadata on which this functor operates. typedef detail::counter_lu_metadata metadata_type; diff --git a/libstdc++-v3/include/ext/pb_ds/priority_queue.hpp b/libstdc++-v3/include/ext/pb_ds/priority_queue.hpp index 90ffaff..3433f51 100644 --- a/libstdc++-v3/include/ext/pb_ds/priority_queue.hpp +++ b/libstdc++-v3/include/ext/pb_ds/priority_queue.hpp @@ -68,11 +68,11 @@ namespace __gnu_pbds typedef Value_Type value_type; typedef Cmp_Fn cmp_fn; typedef Tag container_category; - typedef Allocator allocator; - typedef typename allocator::size_type size_type; - typedef typename allocator::difference_type difference_type; + typedef Allocator allocator_type; + typedef typename allocator_type::size_type size_type; + typedef typename allocator_type::difference_type difference_type; - typedef typename allocator::template rebind::other value_rebind; + typedef typename allocator_type::template rebind::other value_rebind; typedef typename value_rebind::reference reference; typedef typename value_rebind::const_reference const_reference; typedef typename value_rebind::pointer pointer; diff --git a/libstdc++-v3/include/ext/pb_ds/tree_policy.hpp b/libstdc++-v3/include/ext/pb_ds/tree_policy.hpp index dedabec..1f3da0e 100644 --- a/libstdc++-v3/include/ext/pb_ds/tree_policy.hpp +++ b/libstdc++-v3/include/ext/pb_ds/tree_policy.hpp @@ -80,8 +80,8 @@ namespace __gnu_pbds public: typedef Cmp_Fn cmp_fn; - typedef Allocator allocator; - typedef typename allocator::size_type size_type; + typedef Allocator allocator_type; + typedef typename allocator_type::size_type size_type; typedef typename base_type::key_type key_type; typedef typename base_type::const_key_reference const_key_reference; @@ -120,7 +120,7 @@ namespace __gnu_pbds // Const pointer to the container's value-type. typedef typename base_type::const_pointer const_pointer; - typedef typename allocator::template rebind::other metadata_rebind; + typedef typename allocator_type::template rebind::other metadata_rebind; // Const metadata reference. typedef typename metadata_rebind::const_reference const_metadata_reference; diff --git a/libstdc++-v3/include/ext/pb_ds/trie_policy.hpp b/libstdc++-v3/include/ext/pb_ds/trie_policy.hpp index b18de19..642c530 100644 --- a/libstdc++-v3/include/ext/pb_ds/trie_policy.hpp +++ b/libstdc++-v3/include/ext/pb_ds/trie_policy.hpp @@ -167,10 +167,10 @@ namespace __gnu_pbds typedef typename e_access_traits::const_iterator const_e_iterator; // Allocator type. - typedef Allocator allocator; + typedef Allocator allocator_type; // Size type. - typedef typename allocator::size_type size_type; + typedef typename allocator_type::size_type size_type; typedef detail::null_node_metadata metadata_type; typedef Const_Node_Iterator const_node_iterator; typedef Node_Iterator node_iterator; @@ -256,8 +256,8 @@ namespace __gnu_pbds public: typedef E_Access_Traits e_access_traits; typedef typename e_access_traits::const_iterator const_e_iterator; - typedef Allocator allocator; - typedef typename allocator::size_type size_type; + typedef Allocator allocator_type; + typedef typename allocator_type::size_type size_type; typedef typename base_type::key_type key_type; typedef typename base_type::const_key_reference const_key_reference; diff --git a/libstdc++-v3/testsuite/util/common_type/assoc/detail/tree_supports_order_statistics.hpp b/libstdc++-v3/testsuite/util/common_type/assoc/detail/tree_supports_order_statistics.hpp index f4b2311..c219271 100644 --- a/libstdc++-v3/testsuite/util/common_type/assoc/detail/tree_supports_order_statistics.hpp +++ b/libstdc++-v3/testsuite/util/common_type/assoc/detail/tree_supports_order_statistics.hpp @@ -69,7 +69,7 @@ namespace __gnu_pbds typename Tree_Cntnr::const_node_iterator, typename Tree_Cntnr::node_iterator, typename Tree_Cntnr::cmp_fn, - typename Tree_Cntnr::allocator> >::value + typename Tree_Cntnr::allocator_type> >::value }; }; diff --git a/libstdc++-v3/testsuite/util/common_type/assoc/detail/trie_supports_order_statistics.hpp b/libstdc++-v3/testsuite/util/common_type/assoc/detail/trie_supports_order_statistics.hpp index c23708f..82d4780 100644 --- a/libstdc++-v3/testsuite/util/common_type/assoc/detail/trie_supports_order_statistics.hpp +++ b/libstdc++-v3/testsuite/util/common_type/assoc/detail/trie_supports_order_statistics.hpp @@ -69,7 +69,7 @@ namespace __gnu_pbds typename Tree_Cntnr::const_node_iterator, typename Tree_Cntnr::node_iterator, typename Tree_Cntnr::e_access_traits, - typename Tree_Cntnr::allocator> >::value + typename Tree_Cntnr::allocator_type> >::value }; }; diff --git a/libstdc++-v3/testsuite/util/common_type/assoc/detail/trie_supports_prefix_search.hpp b/libstdc++-v3/testsuite/util/common_type/assoc/detail/trie_supports_prefix_search.hpp index 0adf029..5b8c4f3 100644 --- a/libstdc++-v3/testsuite/util/common_type/assoc/detail/trie_supports_prefix_search.hpp +++ b/libstdc++-v3/testsuite/util/common_type/assoc/detail/trie_supports_prefix_search.hpp @@ -69,7 +69,7 @@ namespace __gnu_pbds typename Tree_Cntnr::const_node_iterator, typename Tree_Cntnr::node_iterator, typename Tree_Cntnr::e_access_traits, - typename Tree_Cntnr::allocator> >::value + typename Tree_Cntnr::allocator_type> >::value }; }; diff --git a/libstdc++-v3/testsuite/util/native_type/assoc/native_hash_multimap.hpp b/libstdc++-v3/testsuite/util/native_type/assoc/native_hash_multimap.hpp index a3f82ba..f644ae2 100644 --- a/libstdc++-v3/testsuite/util/native_type/assoc/native_hash_multimap.hpp +++ b/libstdc++-v3/testsuite/util/native_type/assoc/native_hash_multimap.hpp @@ -76,12 +76,12 @@ namespace __gnu_pbds public: typedef native_hash_tag container_category; - typedef Allocator allocator; + typedef Allocator allocator_type; typedef typename base_type::iterator iterator; typedef typename base_type::const_iterator const_iterator; typedef - typename allocator::template rebind::other::const_reference + typename allocator_type::template rebind::other::const_reference const_reference; native_hash_multimap() : base_type(Init_Size) diff --git a/libstdc++-v3/testsuite/util/native_type/assoc/native_multimap.hpp b/libstdc++-v3/testsuite/util/native_type/assoc/native_multimap.hpp index 906fca3..c9e1211 100644 --- a/libstdc++-v3/testsuite/util/native_type/assoc/native_multimap.hpp +++ b/libstdc++-v3/testsuite/util/native_type/assoc/native_multimap.hpp @@ -70,7 +70,7 @@ namespace __gnu_pbds public: typedef native_tree_tag container_category; - typedef Allocator allocator; + typedef Allocator allocator_type; typedef typename Allocator::template rebind< diff --git a/libstdc++-v3/testsuite/util/regression/rand/assoc/container_rand_regression_test.hpp b/libstdc++-v3/testsuite/util/regression/rand/assoc/container_rand_regression_test.hpp index 7eaa396..af0a8e1 100644 --- a/libstdc++-v3/testsuite/util/regression/rand/assoc/container_rand_regression_test.hpp +++ b/libstdc++-v3/testsuite/util/regression/rand/assoc/container_rand_regression_test.hpp @@ -129,7 +129,7 @@ namespace detail private: typedef Cntnr cntnr; - typedef typename cntnr::allocator allocator; + typedef typename cntnr::allocator_type allocator_type; typedef typename cntnr::size_type size_type; typedef regression_test_traits test_traits; typedef typename test_traits::key_type key_type; diff --git a/libstdc++-v3/testsuite/util/regression/rand/assoc/detail/defs_fn_imps.hpp b/libstdc++-v3/testsuite/util/regression/rand/assoc/detail/defs_fn_imps.hpp index 0acb20c..f3e01d9 100644 --- a/libstdc++-v3/testsuite/util/regression/rand/assoc/detail/defs_fn_imps.hpp +++ b/libstdc++-v3/testsuite/util/regression/rand/assoc/detail/defs_fn_imps.hpp @@ -180,7 +180,7 @@ void PB_DS_CLASS_C_DEC:: policy_defs() { - typedef typename Cntnr::allocator test_allocator; + typedef typename Cntnr::allocator_type test_allocator; policy_defs(typename Cntnr::container_category()); } diff --git a/libstdc++-v3/testsuite/util/regression/rand/assoc/detail/operator_fn_imps.hpp b/libstdc++-v3/testsuite/util/regression/rand/assoc/detail/operator_fn_imps.hpp index 3233764..8c11f76 100644 --- a/libstdc++-v3/testsuite/util/regression/rand/assoc/detail/operator_fn_imps.hpp +++ b/libstdc++-v3/testsuite/util/regression/rand/assoc/detail/operator_fn_imps.hpp @@ -71,7 +71,7 @@ operator()() for (m_i = 0; m_i < m_n; ++m_i) { PB_DS_TRACE("Op #" << static_cast(m_i)); - allocator::set_label(m_i); + allocator_type::set_label(m_i); switch (m_i) { case 0: diff --git a/libstdc++-v3/testsuite/util/regression/rand/priority_queue/container_rand_regression_test.hpp b/libstdc++-v3/testsuite/util/regression/rand/priority_queue/container_rand_regression_test.hpp index eeedc27..dadf8b4 100644 --- a/libstdc++-v3/testsuite/util/regression/rand/priority_queue/container_rand_regression_test.hpp +++ b/libstdc++-v3/testsuite/util/regression/rand/priority_queue/container_rand_regression_test.hpp @@ -141,7 +141,7 @@ namespace __gnu_pbds private: typedef Cntnr cntnr; - typedef typename cntnr::allocator allocator; + typedef typename cntnr::allocator_type allocator_type; typedef typename cntnr::size_type size_type; diff --git a/libstdc++-v3/testsuite/util/regression/rand/priority_queue/detail/defs_fn_imps.hpp b/libstdc++-v3/testsuite/util/regression/rand/priority_queue/detail/defs_fn_imps.hpp index 85bc6b0..ae40693 100644 --- a/libstdc++-v3/testsuite/util/regression/rand/priority_queue/detail/defs_fn_imps.hpp +++ b/libstdc++-v3/testsuite/util/regression/rand/priority_queue/detail/defs_fn_imps.hpp @@ -50,15 +50,10 @@ PB_DS_CLASS_C_DEC:: defs() { // General container types. - typedef typename Cntnr::size_type test_size_type; - typedef typename Cntnr::difference_type difference_type; - value_defs(); - iterator_defs(); - policy_defs(); } @@ -68,13 +63,9 @@ PB_DS_CLASS_C_DEC:: value_defs() { typedef typename Cntnr::value_type test_value_type; - typedef typename Cntnr::reference test_reference; - typedef typename Cntnr::const_reference test_const_reference; - typedef typename Cntnr::pointer test_pointer; - typedef typename Cntnr::const_pointer test_const_pointer; } @@ -92,11 +83,8 @@ PB_DS_CLASS_C_DEC:: iterator_defs() { typedef typename Cntnr::point_iterator test_point_iterator; - typedef typename Cntnr::const_point_iterator const_test_point_iterator; - typedef typename Cntnr::iterator test_iterator; - typedef typename Cntnr::const_iterator const_test_iterator; } @@ -105,7 +93,6 @@ void PB_DS_CLASS_C_DEC:: policy_defs() { - typedef typename Cntnr::allocator test_allocator; - + typedef typename Cntnr::allocator_type test_allocator; typedef typename Cntnr::cmp_fn test_cmp_fn; } diff --git a/libstdc++-v3/testsuite/util/regression/rand/priority_queue/detail/operator_fn_imps.hpp b/libstdc++-v3/testsuite/util/regression/rand/priority_queue/detail/operator_fn_imps.hpp index 7a34b81..6186991 100644 --- a/libstdc++-v3/testsuite/util/regression/rand/priority_queue/detail/operator_fn_imps.hpp +++ b/libstdc++-v3/testsuite/util/regression/rand/priority_queue/detail/operator_fn_imps.hpp @@ -71,7 +71,7 @@ operator()() for (m_i = 0; m_i < m_n; ++m_i) { PB_DS_TRACE("Op #" << static_cast(m_i)); - allocator::set_label(m_i); + allocator_type::set_label(m_i); switch(m_i) { case 0: diff --git a/libstdc++-v3/testsuite/util/regression/trait/assoc/trait.hpp b/libstdc++-v3/testsuite/util/regression/trait/assoc/trait.hpp index e8791a4..5e97aea 100644 --- a/libstdc++-v3/testsuite/util/regression/trait/assoc/trait.hpp +++ b/libstdc++-v3/testsuite/util/regression/trait/assoc/trait.hpp @@ -76,7 +76,7 @@ namespace detail #define PB_DS_NATIVE_TYPE_TRAITS_C_DEC \ native_type_traits + typename Cntnr::allocator_type> #define PB_DS_RESIZE_TRAITS_C_DEC \ regression_test_resize_traits diff --git a/libstdc++-v3/testsuite/util/regression/trait/assoc/type_trait.hpp b/libstdc++-v3/testsuite/util/regression/trait/assoc/type_trait.hpp index 5c0682d..b9db4a7 100644 --- a/libstdc++-v3/testsuite/util/regression/trait/assoc/type_trait.hpp +++ b/libstdc++-v3/testsuite/util/regression/trait/assoc/type_trait.hpp @@ -82,12 +82,12 @@ namespace __gnu_pbds { return extract_key_imp(r_val); } private: - typedef typename cntnr::allocator::template rebind::other + typedef typename cntnr::allocator_type::template rebind::other basic_type_rebind; typedef typename basic_type_rebind::const_reference basic_type_const_reference; - typedef typename cntnr::allocator::template rebind >::other pair_type_rebind; + typedef typename cntnr::allocator_type::template rebind >::other pair_type_rebind; typedef typename pair_type_rebind::const_reference pair_type_const_reference; template -- 2.7.4