From b86143de4649f81a9f333d183a92bbfd58377200 Mon Sep 17 00:00:00 2001 From: joaquintides Date: Wed, 5 Oct 2022 20:38:51 +0200 Subject: [PATCH] made one overload of insert generic so that value_type is accepted --- include/boost/unordered/detail/foa.hpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/include/boost/unordered/detail/foa.hpp b/include/boost/unordered/detail/foa.hpp index abcf800a..209f063b 100644 --- a/include/boost/unordered/detail/foa.hpp +++ b/include/boost/unordered/detail/foa.hpp @@ -1045,9 +1045,10 @@ public: std::forward_as_tuple(std::forward(args)...)); } - BOOST_FORCEINLINE std::pair insert(const init_type& x) + template + BOOST_FORCEINLINE std::pair insert(T&& x) { - return emplace_impl(x); + return emplace_impl(std::forward(x)); } BOOST_FORCEINLINE std::pair insert(init_type&& x)