removed temporary const ref in emplace_impl

This commit is contained in:
joaquintides
2022-10-10 18:02:57 +02:00
parent a4c38c02c8
commit f776ffa008

View File

@ -1375,10 +1375,9 @@ 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)
{ {
const auto &k=key_from(std::forward<Args>(args)...); auto hash=hash_for(key_from(args...));
auto hash=hash_for(k); auto pos0=position_for(hash);
auto pos0=position_for(hash); auto it=find_impl(key_from(args...),pos0,hash);
auto it=find_impl(k,pos0,hash);
if(it!=end()){ if(it!=end()){
return {it,false}; return {it,false};