forked from boostorg/unordered
Implement transparent bucket()
This commit is contained in:
@ -802,8 +802,7 @@ namespace boost {
|
||||
}
|
||||
|
||||
template <class Key, class M>
|
||||
typename boost::enable_if_c<
|
||||
detail::are_transparent<Key, hasher, key_equal>::value,
|
||||
typename boost::enable_if_c<detail::are_transparent<Key, H, P>::value,
|
||||
std::pair<iterator, bool> >::type
|
||||
insert_or_assign(BOOST_FWD_REF(Key) k, BOOST_FWD_REF(M) obj)
|
||||
{
|
||||
@ -828,8 +827,8 @@ namespace boost {
|
||||
}
|
||||
|
||||
template <class Key, class M>
|
||||
typename boost::enable_if_c<
|
||||
detail::are_transparent<Key, hasher, key_equal>::value, iterator>::type
|
||||
typename boost::enable_if_c<detail::are_transparent<Key, H, P>::value,
|
||||
iterator>::type
|
||||
insert_or_assign(
|
||||
const_iterator, BOOST_FWD_REF(Key) k, BOOST_FWD_REF(M) obj)
|
||||
{
|
||||
@ -1009,6 +1008,14 @@ namespace boost {
|
||||
return table_.hash_to_bucket(table_.hash(k));
|
||||
}
|
||||
|
||||
template <class Key>
|
||||
typename boost::enable_if_c<detail::are_transparent<Key, H, P>::value,
|
||||
size_type>::type
|
||||
bucket(BOOST_FWD_REF(Key) k) const
|
||||
{
|
||||
return table_.hash_to_bucket(table_.hash(boost::forward<Key>(k)));
|
||||
}
|
||||
|
||||
local_iterator begin(size_type n)
|
||||
{
|
||||
return table_.begin(n);
|
||||
@ -1715,6 +1722,14 @@ namespace boost {
|
||||
return table_.hash_to_bucket(table_.hash(k));
|
||||
}
|
||||
|
||||
template <class Key>
|
||||
typename boost::enable_if_c<detail::are_transparent<Key, H, P>::value,
|
||||
size_type>::type
|
||||
bucket(BOOST_FWD_REF(Key) k) const
|
||||
{
|
||||
return table_.hash_to_bucket(table_.hash(boost::forward<Key>(k)));
|
||||
}
|
||||
|
||||
local_iterator begin(size_type n)
|
||||
{
|
||||
return local_iterator(table_.begin(n));
|
||||
|
@ -571,6 +571,14 @@ namespace boost {
|
||||
return table_.hash_to_bucket(table_.hash(k));
|
||||
}
|
||||
|
||||
template <class Key>
|
||||
typename boost::enable_if_c<detail::are_transparent<Key, H, P>::value,
|
||||
size_type>::type
|
||||
bucket(BOOST_FWD_REF(Key) k) const
|
||||
{
|
||||
return table_.hash_to_bucket(table_.hash(boost::forward<Key>(k)));
|
||||
}
|
||||
|
||||
local_iterator begin(size_type n)
|
||||
{
|
||||
return local_iterator(table_.begin(n));
|
||||
@ -1212,6 +1220,14 @@ namespace boost {
|
||||
return table_.hash_to_bucket(table_.hash(k));
|
||||
}
|
||||
|
||||
template <class Key>
|
||||
typename boost::enable_if_c<detail::are_transparent<Key, H, P>::value,
|
||||
size_type>::type
|
||||
bucket(BOOST_FWD_REF(Key) k) const
|
||||
{
|
||||
return table_.hash_to_bucket(table_.hash(boost::forward<Key>(k)));
|
||||
}
|
||||
|
||||
local_iterator begin(size_type n)
|
||||
{
|
||||
return local_iterator(table_.begin(n));
|
||||
|
Reference in New Issue
Block a user