forked from boostorg/unordered
reverted 7caab66011
and f776ffa008
This commit is contained in:
@ -1315,7 +1315,7 @@ private:
|
|||||||
}
|
}
|
||||||
|
|
||||||
template<typename Key>
|
template<typename Key>
|
||||||
std::size_t hash_for(const Key& x)const
|
inline std::size_t hash_for(const Key& x)const
|
||||||
{
|
{
|
||||||
return mix_policy::mix(h()(x));
|
return mix_policy::mix(h()(x));
|
||||||
}
|
}
|
||||||
@ -1375,9 +1375,10 @@ private:
|
|||||||
template<typename... Args>
|
template<typename... Args>
|
||||||
BOOST_FORCEINLINE std::pair<iterator,bool> emplace_impl(Args&&... args)
|
BOOST_FORCEINLINE std::pair<iterator,bool> emplace_impl(Args&&... args)
|
||||||
{
|
{
|
||||||
auto hash=hash_for(key_from(args...));
|
const auto &k=key_from(std::forward<Args>(args)...);
|
||||||
auto pos0=position_for(hash);
|
auto hash=hash_for(k);
|
||||||
auto it=find_impl(key_from(args...),pos0,hash);
|
auto pos0=position_for(hash);
|
||||||
|
auto it=find_impl(k,pos0,hash);
|
||||||
|
|
||||||
if(it!=end()){
|
if(it!=end()){
|
||||||
return {it,false};
|
return {it,false};
|
||||||
|
Reference in New Issue
Block a user