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.
This commit is contained in:
Daniel James
2017-04-15 17:35:08 +01:00
parent 972ac220f5
commit 97b68ea05e
5 changed files with 30 additions and 34 deletions

View File

@ -122,16 +122,16 @@ namespace detail {
template <typename Types> struct table; template <typename Types> struct table;
template <typename NodePointer> struct bucket; template <typename NodePointer> struct bucket;
struct ptr_bucket; struct ptr_bucket;
template <typename Types> struct table_impl; template <typename Types> struct table_unique;
template <typename Types> struct grouped_table_impl; template <typename Types> struct table_equiv;
template <typename A, typename T> struct unique_node; template <typename A, typename T> struct unique_node;
template <typename T> struct ptr_node; template <typename T> struct ptr_node;
template <typename Types> struct table_impl; template <typename Types> struct table_unique;
template <typename A, typename T> struct grouped_node; template <typename A, typename T> struct grouped_node;
template <typename T> struct grouped_ptr_node; template <typename T> struct grouped_ptr_node;
template <typename Types> struct grouped_table_impl; template <typename Types> struct table_equiv;
template <typename N> struct node_algo; template <typename N> struct node_algo;
template <typename N> struct grouped_node_algo; template <typename N> struct grouped_node_algo;
@ -1921,9 +1921,8 @@ struct iterator : public std::iterator<std::forward_iterator_tag,
template <typename> template <typename>
friend struct boost::unordered::iterator_detail::c_iterator; friend struct boost::unordered::iterator_detail::c_iterator;
template <typename> friend struct boost::unordered::detail::table; template <typename> friend struct boost::unordered::detail::table;
template <typename> friend struct boost::unordered::detail::table_impl; template <typename> friend struct boost::unordered::detail::table_unique;
template <typename> template <typename> friend struct boost::unordered::detail::table_equiv;
friend struct boost::unordered::detail::grouped_table_impl;
private: private:
#endif #endif
@ -1978,9 +1977,8 @@ struct c_iterator
#if !defined(BOOST_NO_MEMBER_TEMPLATE_FRIENDS) #if !defined(BOOST_NO_MEMBER_TEMPLATE_FRIENDS)
template <typename> friend struct boost::unordered::detail::table; template <typename> friend struct boost::unordered::detail::table;
template <typename> friend struct boost::unordered::detail::table_impl; template <typename> friend struct boost::unordered::detail::table_unique;
template <typename> template <typename> friend struct boost::unordered::detail::table_equiv;
friend struct boost::unordered::detail::grouped_table_impl;
private: private:
#endif #endif
@ -3607,7 +3605,7 @@ template <typename A, typename T> struct pick_node
}; };
template <typename Types> template <typename Types>
struct table_impl : boost::unordered::detail::table<Types> struct table_unique : boost::unordered::detail::table<Types>
{ {
typedef boost::unordered::detail::table<Types> table; typedef boost::unordered::detail::table<Types> table;
typedef typename table::value_type value_type; typedef typename table::value_type value_type;
@ -3633,30 +3631,30 @@ struct table_impl : boost::unordered::detail::table<Types>
// Constructors // 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) node_allocator const& a)
: table(n, hf, eq, 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( : table(x, node_allocator_traits::select_on_container_copy_construction(
x.node_alloc())) x.node_alloc()))
{ {
this->init(x); 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); 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(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) boost::unordered::detail::move_tag m)
: table(x, a, m) : table(x, a, m)
{ {
@ -3691,7 +3689,7 @@ struct table_impl : boost::unordered::detail::table<Types>
// equals // equals
bool equals(table_impl const& other) const bool equals(table_unique const& other) const
{ {
if (this->size_ != other.size_) if (this->size_ != other.size_)
return false; return false;
@ -4431,7 +4429,7 @@ template <typename A, typename T> struct pick_grouped_node
}; };
template <typename Types> template <typename Types>
struct grouped_table_impl : boost::unordered::detail::table<Types> struct table_equiv : boost::unordered::detail::table<Types>
{ {
typedef boost::unordered::detail::table<Types> table; typedef boost::unordered::detail::table<Types> table;
typedef typename table::value_type value_type; typedef typename table::value_type value_type;
@ -4454,32 +4452,30 @@ struct grouped_table_impl : boost::unordered::detail::table<Types>
// Constructors // 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) node_allocator const& a)
: table(n, hf, eq, 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( : table(x, node_allocator_traits::select_on_container_copy_construction(
x.node_alloc())) x.node_alloc()))
{ {
this->init(x); this->init(x);
} }
grouped_table_impl(grouped_table_impl const& x, node_allocator const& a) table_equiv(table_equiv const& x, node_allocator const& a) : table(x, a)
: table(x, a)
{ {
this->init(x); this->init(x);
} }
grouped_table_impl( table_equiv(table_equiv& x, boost::unordered::detail::move_tag m)
grouped_table_impl& x, boost::unordered::detail::move_tag m)
: table(x, 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) boost::unordered::detail::move_tag m)
: table(x, a, m) : table(x, a, m)
{ {
@ -4503,7 +4499,7 @@ struct grouped_table_impl : boost::unordered::detail::table<Types>
// Equality // Equality
bool equals(grouped_table_impl const& other) const bool equals(table_equiv const& other) const
{ {
if (this->size_ != other.size_) if (this->size_ != other.size_)
return false; return false;

View File

@ -29,7 +29,7 @@ template <typename A, typename K, typename M, typename H, typename P> struct map
typedef typename pick::link_pointer link_pointer; typedef typename pick::link_pointer link_pointer;
typedef typename pick::node_algo node_algo; typedef typename pick::node_algo node_algo;
typedef boost::unordered::detail::table_impl<types> table; typedef boost::unordered::detail::table_unique<types> table;
typedef boost::unordered::detail::map_extractor<value_type> extractor; typedef boost::unordered::detail::map_extractor<value_type> extractor;
typedef typename boost::unordered::detail::pick_policy<K>::type policy; typedef typename boost::unordered::detail::pick_policy<K>::type policy;
@ -71,7 +71,7 @@ struct multimap
typedef typename pick::link_pointer link_pointer; typedef typename pick::link_pointer link_pointer;
typedef typename pick::node_algo node_algo; typedef typename pick::node_algo node_algo;
typedef boost::unordered::detail::grouped_table_impl<types> table; typedef boost::unordered::detail::table_equiv<types> table;
typedef boost::unordered::detail::map_extractor<value_type> extractor; typedef boost::unordered::detail::map_extractor<value_type> extractor;
typedef typename boost::unordered::detail::pick_policy<K>::type policy; typedef typename boost::unordered::detail::pick_policy<K>::type policy;

View File

@ -29,7 +29,7 @@ template <typename A, typename T, typename H, typename P> struct set
typedef typename pick::link_pointer link_pointer; typedef typename pick::link_pointer link_pointer;
typedef typename pick::node_algo node_algo; typedef typename pick::node_algo node_algo;
typedef boost::unordered::detail::table_impl<types> table; typedef boost::unordered::detail::table_unique<types> table;
typedef boost::unordered::detail::set_extractor<value_type> extractor; typedef boost::unordered::detail::set_extractor<value_type> extractor;
typedef typename boost::unordered::detail::pick_policy<T>::type policy; typedef typename boost::unordered::detail::pick_policy<T>::type policy;
@ -70,7 +70,7 @@ template <typename A, typename T, typename H, typename P> struct multiset
typedef typename pick::link_pointer link_pointer; typedef typename pick::link_pointer link_pointer;
typedef typename pick::node_algo node_algo; typedef typename pick::node_algo node_algo;
typedef boost::unordered::detail::grouped_table_impl<types> table; typedef boost::unordered::detail::table_equiv<types> table;
typedef boost::unordered::detail::set_extractor<value_type> extractor; typedef boost::unordered::detail::set_extractor<value_type> extractor;
typedef typename boost::unordered::detail::pick_policy<T>::type policy; typedef typename boost::unordered::detail::pick_policy<T>::type policy;

View File

@ -2057,9 +2057,9 @@ template <typename N, class K, class T, class A> class node_handle_map
BOOST_MOVABLE_BUT_NOT_COPYABLE(node_handle_map) BOOST_MOVABLE_BUT_NOT_COPYABLE(node_handle_map)
template <typename Types> template <typename Types>
friend struct ::boost::unordered::detail::table_impl; friend struct ::boost::unordered::detail::table_unique;
template <typename Types> template <typename Types>
friend struct ::boost::unordered::detail::grouped_table_impl; friend struct ::boost::unordered::detail::table_equiv;
typedef typename boost::unordered::detail::rebind_wrap<A, typedef typename boost::unordered::detail::rebind_wrap<A,
std::pair<K const, T> >::type value_allocator; std::pair<K const, T> >::type value_allocator;

View File

@ -1698,9 +1698,9 @@ template <typename N, typename T, typename A> class node_handle_set
BOOST_MOVABLE_BUT_NOT_COPYABLE(node_handle_set) BOOST_MOVABLE_BUT_NOT_COPYABLE(node_handle_set)
template <typename Types> template <typename Types>
friend struct ::boost::unordered::detail::table_impl; friend struct ::boost::unordered::detail::table_unique;
template <typename Types> template <typename Types>
friend struct ::boost::unordered::detail::grouped_table_impl; friend struct ::boost::unordered::detail::table_equiv;
typedef typename boost::unordered::detail::rebind_wrap<A, T>::type typedef typename boost::unordered::detail::rebind_wrap<A, T>::type
value_allocator; value_allocator;