From 97b68ea05e6c87a6e8d8eca1011ba66d27ab7f10 Mon Sep 17 00:00:00 2001 From: Daniel James Date: Sat, 15 Apr 2017 17:35:08 +0100 Subject: [PATCH] Rename (grouped_)table_impl to table_unique/equiv The old names don't make sense any more as either style can be used for containers with equivalent keys, due to the use of node_algo. --- .../boost/unordered/detail/implementation.hpp | 48 +++++++++---------- include/boost/unordered/detail/map.hpp | 4 +- include/boost/unordered/detail/set.hpp | 4 +- include/boost/unordered/unordered_map.hpp | 4 +- include/boost/unordered/unordered_set.hpp | 4 +- 5 files changed, 30 insertions(+), 34 deletions(-) diff --git a/include/boost/unordered/detail/implementation.hpp b/include/boost/unordered/detail/implementation.hpp index c293ae2f..4c482d78 100644 --- a/include/boost/unordered/detail/implementation.hpp +++ b/include/boost/unordered/detail/implementation.hpp @@ -122,16 +122,16 @@ namespace detail { template struct table; template struct bucket; struct ptr_bucket; -template struct table_impl; -template struct grouped_table_impl; +template struct table_unique; +template struct table_equiv; template struct unique_node; template struct ptr_node; -template struct table_impl; +template struct table_unique; template struct grouped_node; template struct grouped_ptr_node; -template struct grouped_table_impl; +template struct table_equiv; template struct node_algo; template struct grouped_node_algo; @@ -1921,9 +1921,8 @@ struct iterator : public std::iterator friend struct boost::unordered::iterator_detail::c_iterator; template friend struct boost::unordered::detail::table; - template friend struct boost::unordered::detail::table_impl; - template - friend struct boost::unordered::detail::grouped_table_impl; + template friend struct boost::unordered::detail::table_unique; + template friend struct boost::unordered::detail::table_equiv; private: #endif @@ -1978,9 +1977,8 @@ struct c_iterator #if !defined(BOOST_NO_MEMBER_TEMPLATE_FRIENDS) template friend struct boost::unordered::detail::table; - template friend struct boost::unordered::detail::table_impl; - template - friend struct boost::unordered::detail::grouped_table_impl; + template friend struct boost::unordered::detail::table_unique; + template friend struct boost::unordered::detail::table_equiv; private: #endif @@ -3607,7 +3605,7 @@ template struct pick_node }; template -struct table_impl : boost::unordered::detail::table +struct table_unique : boost::unordered::detail::table { typedef boost::unordered::detail::table table; typedef typename table::value_type value_type; @@ -3633,30 +3631,30 @@ struct table_impl : boost::unordered::detail::table // Constructors - table_impl(std::size_t n, hasher const& hf, key_equal const& eq, + table_unique(std::size_t n, hasher const& hf, key_equal const& eq, node_allocator const& a) : table(n, hf, eq, a) { } - table_impl(table_impl const& x) + table_unique(table_unique const& x) : table(x, node_allocator_traits::select_on_container_copy_construction( x.node_alloc())) { this->init(x); } - table_impl(table_impl const& x, node_allocator const& a) : table(x, a) + table_unique(table_unique const& x, node_allocator const& a) : table(x, a) { this->init(x); } - table_impl(table_impl& x, boost::unordered::detail::move_tag m) + table_unique(table_unique& x, boost::unordered::detail::move_tag m) : table(x, m) { } - table_impl(table_impl& x, node_allocator const& a, + table_unique(table_unique& x, node_allocator const& a, boost::unordered::detail::move_tag m) : table(x, a, m) { @@ -3691,7 +3689,7 @@ struct table_impl : boost::unordered::detail::table // equals - bool equals(table_impl const& other) const + bool equals(table_unique const& other) const { if (this->size_ != other.size_) return false; @@ -4431,7 +4429,7 @@ template struct pick_grouped_node }; template -struct grouped_table_impl : boost::unordered::detail::table +struct table_equiv : boost::unordered::detail::table { typedef boost::unordered::detail::table table; typedef typename table::value_type value_type; @@ -4454,32 +4452,30 @@ struct grouped_table_impl : boost::unordered::detail::table // Constructors - grouped_table_impl(std::size_t n, hasher const& hf, key_equal const& eq, + table_equiv(std::size_t n, hasher const& hf, key_equal const& eq, node_allocator const& a) : table(n, hf, eq, a) { } - grouped_table_impl(grouped_table_impl const& x) + table_equiv(table_equiv const& x) : table(x, node_allocator_traits::select_on_container_copy_construction( x.node_alloc())) { this->init(x); } - grouped_table_impl(grouped_table_impl const& x, node_allocator const& a) - : table(x, a) + table_equiv(table_equiv const& x, node_allocator const& a) : table(x, a) { this->init(x); } - grouped_table_impl( - grouped_table_impl& x, boost::unordered::detail::move_tag m) + table_equiv(table_equiv& x, boost::unordered::detail::move_tag m) : table(x, m) { } - grouped_table_impl(grouped_table_impl& x, node_allocator const& a, + table_equiv(table_equiv& x, node_allocator const& a, boost::unordered::detail::move_tag m) : table(x, a, m) { @@ -4503,7 +4499,7 @@ struct grouped_table_impl : boost::unordered::detail::table // Equality - bool equals(grouped_table_impl const& other) const + bool equals(table_equiv const& other) const { if (this->size_ != other.size_) return false; diff --git a/include/boost/unordered/detail/map.hpp b/include/boost/unordered/detail/map.hpp index cb9a954b..a8bf9f3a 100644 --- a/include/boost/unordered/detail/map.hpp +++ b/include/boost/unordered/detail/map.hpp @@ -29,7 +29,7 @@ template struct map typedef typename pick::link_pointer link_pointer; typedef typename pick::node_algo node_algo; - typedef boost::unordered::detail::table_impl table; + typedef boost::unordered::detail::table_unique table; typedef boost::unordered::detail::map_extractor extractor; typedef typename boost::unordered::detail::pick_policy::type policy; @@ -71,7 +71,7 @@ struct multimap typedef typename pick::link_pointer link_pointer; typedef typename pick::node_algo node_algo; - typedef boost::unordered::detail::grouped_table_impl table; + typedef boost::unordered::detail::table_equiv table; typedef boost::unordered::detail::map_extractor extractor; typedef typename boost::unordered::detail::pick_policy::type policy; diff --git a/include/boost/unordered/detail/set.hpp b/include/boost/unordered/detail/set.hpp index 42e9cad7..2e7d6ef5 100644 --- a/include/boost/unordered/detail/set.hpp +++ b/include/boost/unordered/detail/set.hpp @@ -29,7 +29,7 @@ template struct set typedef typename pick::link_pointer link_pointer; typedef typename pick::node_algo node_algo; - typedef boost::unordered::detail::table_impl table; + typedef boost::unordered::detail::table_unique table; typedef boost::unordered::detail::set_extractor extractor; typedef typename boost::unordered::detail::pick_policy::type policy; @@ -70,7 +70,7 @@ template struct multiset typedef typename pick::link_pointer link_pointer; typedef typename pick::node_algo node_algo; - typedef boost::unordered::detail::grouped_table_impl table; + typedef boost::unordered::detail::table_equiv table; typedef boost::unordered::detail::set_extractor extractor; typedef typename boost::unordered::detail::pick_policy::type policy; diff --git a/include/boost/unordered/unordered_map.hpp b/include/boost/unordered/unordered_map.hpp index aa3913ae..f4dbeaf5 100644 --- a/include/boost/unordered/unordered_map.hpp +++ b/include/boost/unordered/unordered_map.hpp @@ -2057,9 +2057,9 @@ template class node_handle_map BOOST_MOVABLE_BUT_NOT_COPYABLE(node_handle_map) template - friend struct ::boost::unordered::detail::table_impl; + friend struct ::boost::unordered::detail::table_unique; template - friend struct ::boost::unordered::detail::grouped_table_impl; + friend struct ::boost::unordered::detail::table_equiv; typedef typename boost::unordered::detail::rebind_wrap >::type value_allocator; diff --git a/include/boost/unordered/unordered_set.hpp b/include/boost/unordered/unordered_set.hpp index fc35503d..fe1f2196 100644 --- a/include/boost/unordered/unordered_set.hpp +++ b/include/boost/unordered/unordered_set.hpp @@ -1698,9 +1698,9 @@ template class node_handle_set BOOST_MOVABLE_BUT_NOT_COPYABLE(node_handle_set) template - friend struct ::boost::unordered::detail::table_impl; + friend struct ::boost::unordered::detail::table_unique; template - friend struct ::boost::unordered::detail::grouped_table_impl; + friend struct ::boost::unordered::detail::table_equiv; typedef typename boost::unordered::detail::rebind_wrap::type value_allocator;