diff --git a/include/boost/unordered/detail/foa.hpp b/include/boost/unordered/detail/foa.hpp index f379e80e..64699571 100644 --- a/include/boost/unordered/detail/foa.hpp +++ b/include/boost/unordered/detail/foa.hpp @@ -1375,10 +1375,9 @@ private: template BOOST_FORCEINLINE std::pair emplace_impl(Args&&... args) { - const auto &k=key_from(std::forward(args)...); - auto hash=hash_for(k); - auto pos0=position_for(hash); - auto it=find_impl(k,pos0,hash); + auto hash=hash_for(key_from(args...)); + auto pos0=position_for(hash); + auto it=find_impl(key_from(args...),pos0,hash); if(it!=end()){ return {it,false};