Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r79792 - trunk/boost/unordered/detail
From: dnljms_at_[hidden]
Date: 2012-07-29 03:17:58


Author: danieljames
Date: 2012-07-29 03:17:57 EDT (Sun, 29 Jul 2012)
New Revision: 79792
URL: http://svn.boost.org/trac/boost/changeset/79792

Log:
Unordered: Fix some uses of rvalues refs/move.
Text files modified:
   trunk/boost/unordered/detail/allocate.hpp | 15 +++++++++------
   1 files changed, 9 insertions(+), 6 deletions(-)

Modified: trunk/boost/unordered/detail/allocate.hpp
==============================================================================
--- trunk/boost/unordered/detail/allocate.hpp (original)
+++ trunk/boost/unordered/detail/allocate.hpp 2012-07-29 03:17:57 EDT (Sun, 29 Jul 2012)
@@ -346,19 +346,20 @@
 
     template <typename A, typename B, typename A0, typename A1, typename A2>
     inline typename enable_if<piecewise3<A, B, A0>, void>::type
- construct_impl(std::pair<A, B>* address, A0&&, A1&& a1, A2&& a2)
+ construct_impl(std::pair<A, B>* 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>(a1));
         boost::unordered::detail::construct_from_tuple(
- boost::addressof(address->second), a2);
+ boost::addressof(address->second), boost::forward<A2>(a2));
     }
 
 #if defined(BOOST_UNORDERED_DEPRECATED_PAIR_CONSTRUCT)
 
     template <typename A, typename B, typename A0>
     inline typename enable_if<emulation1<A, B, A0>, void>::type
- construct_impl(std::pair<A, B>* address, A0&& a0)
+ construct_impl(std::pair<A, B>* address, BOOST_FWD_REF(A0) a0)
     {
         new((void*) boost::addressof(address->first)) A(boost::forward<A0>(a0));
         new((void*) boost::addressof(address->second)) B();
@@ -366,7 +367,8 @@
 
     template <typename A, typename B, typename A0, typename A1, typename A2>
     inline typename enable_if<emulation3<A, B, A0>, void>::type
- construct_impl(std::pair<A, B>* address, A0&& a0, A1&& a1, A2&& a2)
+ construct_impl(std::pair<A, B>* 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>(a0));
         new((void*) boost::addressof(address->second)) B(
@@ -378,7 +380,8 @@
             typename A0, typename A1, typename A2, typename A3,
             typename... Args>
     inline void construct_impl(std::pair<A, B>* 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>(a0));
 


Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk