Fix try_emplace overload

This commit is contained in:
Daniel James
2017-04-28 09:53:50 +01:00
parent 10b736d407
commit bfcdd51b4a
2 changed files with 21 additions and 6 deletions

View File

@@ -563,12 +563,10 @@ template <class K, class T, class H, class P, class A> class unordered_map
iterator try_emplace(const_iterator hint, key_type const& k,
BOOST_FWD_REF(A0) a0, BOOST_FWD_REF(A1) a1, BOOST_FWD_REF(A2) a2)
{
return table_
.try_emplace_unique(
hint, k, boost::unordered::detail::create_emplace_args(
boost::forward<A0>(a0), boost::forward<A1>(a1),
boost::forward<A2>(a2)))
.first;
return table_.try_emplace_hint_unique(
hint, k, boost::unordered::detail::create_emplace_args(
boost::forward<A0>(a0), boost::forward<A1>(a1),
boost::forward<A2>(a2)));
}
// try_emplace(key&&, Args&&...)