forked from boostorg/unordered
@@ -1477,7 +1477,22 @@ namespace boost {
|
||||
}
|
||||
|
||||
#endif
|
||||
}
|
||||
|
||||
template <typename T, typename Alloc, typename Key>
|
||||
inline typename boost::allocator_pointer<Alloc>::type
|
||||
construct_node_from_key(T*, Alloc& alloc, BOOST_FWD_REF(Key) k)
|
||||
{
|
||||
return construct_node(alloc, boost::forward<Key>(k));
|
||||
}
|
||||
|
||||
template <typename T, typename V, typename Alloc, typename Key>
|
||||
inline typename boost::allocator_pointer<Alloc>::type
|
||||
construct_node_from_key(
|
||||
std::pair<T const, V>*, Alloc& alloc, BOOST_FWD_REF(Key) k)
|
||||
{
|
||||
return construct_node_pair(alloc, boost::forward<Key>(k));
|
||||
}
|
||||
} // namespace func
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -2640,8 +2655,10 @@ namespace boost {
|
||||
} else {
|
||||
node_allocator_type alloc = node_alloc();
|
||||
|
||||
node_tmp tmp(
|
||||
detail::func::construct_node_pair(alloc, boost::forward<Key>(k)),
|
||||
value_type* dispatch = BOOST_NULLPTR;
|
||||
|
||||
node_tmp tmp(detail::func::construct_node_from_key(
|
||||
dispatch, alloc, boost::forward<Key>(k)),
|
||||
alloc);
|
||||
|
||||
if (size_ + 1 > max_load_) {
|
||||
@@ -2660,7 +2677,7 @@ namespace boost {
|
||||
template <typename Key>
|
||||
iterator try_emplace_hint_unique(c_iterator hint, BOOST_FWD_REF(Key) k)
|
||||
{
|
||||
if (hint.p && this->key_eq()(hint->first, k)) {
|
||||
if (hint.p && this->key_eq()(extractor::extract(*hint), k)) {
|
||||
return iterator(hint.p, hint.itb);
|
||||
} else {
|
||||
return try_emplace_unique(k).first;
|
||||
|
||||
@@ -53,10 +53,10 @@ namespace boost {
|
||||
{
|
||||
};
|
||||
|
||||
template <class, class A, class B> struct are_transparent
|
||||
template <class, class Hash, class KeyEqual> struct are_transparent
|
||||
{
|
||||
static bool const value =
|
||||
is_transparent<A>::value && is_transparent<B>::value;
|
||||
is_transparent<Hash>::value && is_transparent<KeyEqual>::value;
|
||||
};
|
||||
|
||||
template <class Key, class UnorderedMap> struct transparent_non_iterable
|
||||
|
||||
Reference in New Issue
Block a user