diff --git a/include/boost/unordered/unordered_map.hpp b/include/boost/unordered/unordered_map.hpp index f1d5b0df..aa3913ae 100644 --- a/include/boost/unordered/unordered_map.hpp +++ b/include/boost/unordered/unordered_map.hpp @@ -17,6 +17,7 @@ #include #include #include +#include #include #if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST) @@ -545,6 +546,15 @@ template class unordered_map return this->emplace(boost::move(x)); } + template + std::pair insert(BOOST_RV_REF(P2) obj, + typename boost::enable_if_c< + boost::is_constructible::value, + void*>::type = 0) + { + return this->emplace(boost::forward(obj)); + } + iterator insert(const_iterator hint, value_type const& x) { return this->emplace_hint(hint, x); @@ -555,6 +565,15 @@ template class unordered_map return this->emplace_hint(hint, boost::move(x)); } + template + iterator insert(const_iterator hint, BOOST_RV_REF(P2) obj, + typename boost::enable_if_c< + boost::is_constructible::value, + void*>::type = 0) + { + return this->emplace_hint(hint, boost::forward(obj)); + } + template std::pair insert_or_assign( key_type const& k, BOOST_FWD_REF(M) obj) @@ -1037,6 +1056,15 @@ template class unordered_multimap return this->emplace(boost::move(x)); } + template + iterator insert(BOOST_RV_REF(P2) obj, + typename boost::enable_if_c< + boost::is_constructible::value, + void*>::type = 0) + { + return this->emplace(boost::forward(obj)); + } + iterator insert(const_iterator hint, value_type const& x) { return this->emplace_hint(hint, x); @@ -1047,6 +1075,15 @@ template class unordered_multimap return this->emplace_hint(hint, boost::move(x)); } + template + iterator insert(const_iterator hint, BOOST_RV_REF(P2) obj, + typename boost::enable_if_c< + boost::is_constructible::value, + void*>::type = 0) + { + return this->emplace_hint(hint, boost::forward(obj)); + } + template void insert(InputIt, InputIt); #if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST)