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