From 27f5496a656f2f4a630f5f7703606f0ed0cf7bb4 Mon Sep 17 00:00:00 2001 From: Daniel James Date: Sun, 29 Jul 2012 07:17:57 +0000 Subject: [PATCH] Unordered: Fix some uses of rvalues refs/move. [SVN r79792] --- include/boost/unordered/detail/allocate.hpp | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/include/boost/unordered/detail/allocate.hpp b/include/boost/unordered/detail/allocate.hpp index 11bfa4e5..5574c158 100644 --- a/include/boost/unordered/detail/allocate.hpp +++ b/include/boost/unordered/detail/allocate.hpp @@ -346,19 +346,20 @@ BOOST_UNORDERED_CONSTRUCT_FROM_TUPLE(10, boost::) template inline typename enable_if, void>::type - construct_impl(std::pair* address, A0&&, A1&& a1, A2&& a2) + construct_impl(std::pair* address, + BOOST_FWD_REF(A0), BOOST_FWD_REF(A1) a1, BOOST_FWD_REF(A2) a2) { boost::unordered::detail::construct_from_tuple( - boost::addressof(address->first), a1); + boost::addressof(address->first), boost::forward(a1)); boost::unordered::detail::construct_from_tuple( - boost::addressof(address->second), a2); + boost::addressof(address->second), boost::forward(a2)); } #if defined(BOOST_UNORDERED_DEPRECATED_PAIR_CONSTRUCT) template inline typename enable_if, void>::type - construct_impl(std::pair* address, A0&& a0) + construct_impl(std::pair* address, BOOST_FWD_REF(A0) a0) { new((void*) boost::addressof(address->first)) A(boost::forward(a0)); new((void*) boost::addressof(address->second)) B(); @@ -366,7 +367,8 @@ BOOST_UNORDERED_CONSTRUCT_FROM_TUPLE(10, boost::) template inline typename enable_if, void>::type - construct_impl(std::pair* address, A0&& a0, A1&& a1, A2&& a2) + construct_impl(std::pair* address, + BOOST_FWD_REF(A0) a0, BOOST_FWD_REF(A1) a1, BOOST_FWD_REF(A2) a2) { new((void*) boost::addressof(address->first)) A(boost::forward(a0)); new((void*) boost::addressof(address->second)) B( @@ -378,7 +380,8 @@ BOOST_UNORDERED_CONSTRUCT_FROM_TUPLE(10, boost::) typename A0, typename A1, typename A2, typename A3, typename... Args> inline void construct_impl(std::pair* address, - A0&& a0, A1&& a1, A2&& a2, A3&& a3, Args&&... args) + BOOST_FWD_REF(A0) a0, BOOST_FWD_REF(A1) a1, BOOST_FWD_REF(A2) a2, + BOOST_FWD_REF(A3) a3, BOOST_FWD_REF(Args)... args) { new((void*) boost::addressof(address->first)) A(boost::forward(a0));