Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r81752 - trunk/boost/smart_ptr/detail
From: glenfe_at_[hidden]
Date: 2012-12-07 02:42:49


Author: glenfe
Date: 2012-12-07 02:42:42 EST (Fri, 07 Dec 2012)
New Revision: 81752
URL: http://svn.boost.org/trac/boost/changeset/81752

Log:
Correctly use r-value reference semantics for Args and T in array utilities
Text files modified:
   trunk/boost/smart_ptr/detail/array_deleter.hpp | 8 ++++----
   trunk/boost/smart_ptr/detail/array_utility.hpp | 4 ++--
   2 files changed, 6 insertions(+), 6 deletions(-)

Modified: trunk/boost/smart_ptr/detail/array_deleter.hpp
==============================================================================
--- trunk/boost/smart_ptr/detail/array_deleter.hpp (original)
+++ trunk/boost/smart_ptr/detail/array_deleter.hpp 2012-12-07 02:42:42 EST (Fri, 07 Dec 2012)
@@ -34,13 +34,13 @@
             }
 #if defined(BOOST_HAS_RVALUE_REFS)
             void construct(T* memory, T&& value) {
- array_construct(memory, size, value);
+ array_construct_value(memory, size, sp_forward<T>(value));
                 object = memory;
             }
 #if defined(BOOST_HAS_VARIADIC_TMPL)
             template<typename... Args>
             void construct(T* memory, Args&&... args) {
- array_construct(memory, size, args...);
+ array_construct_args(memory, size, sp_forward<Args>(args)...);
                 object = memory;
             }
 #endif
@@ -84,13 +84,13 @@
             }
 #if defined(BOOST_HAS_RVALUE_REFS)
             void construct(T* memory, T&& value) {
- array_construct(memory, N, value);
+ array_construct_value(memory, N, sp_forward<T>(value));
                 object = memory;
             }
 #if defined(BOOST_HAS_VARIADIC_TMPL)
             template<typename... Args>
             void construct(T* memory, Args&&... args) {
- array_construct(memory, N, args...);
+ array_construct_args(memory, N, sp_forward<Args>(args)...);
                 object = memory;
             }
 #endif

Modified: trunk/boost/smart_ptr/detail/array_utility.hpp
==============================================================================
--- trunk/boost/smart_ptr/detail/array_utility.hpp (original)
+++ trunk/boost/smart_ptr/detail/array_utility.hpp 2012-12-07 02:42:42 EST (Fri, 07 Dec 2012)
@@ -55,7 +55,7 @@
         }
 #if defined(BOOST_HAS_RVALUE_REFS)
         template<typename T>
- inline void array_construct(T* memory, std::size_t size, T value) {
+ inline void array_construct_value(T* memory, std::size_t size, T&& value) {
             std::size_t i = 0;
             try {
                 for (; i < size; i++) {
@@ -69,7 +69,7 @@
         }
 #if defined(BOOST_HAS_VARIADIC_TMPL)
         template<typename T, typename... Args>
- inline void array_construct(T* memory, std::size_t size, Args... args) {
+ inline void array_construct_args(T* memory, std::size_t size, Args&&... args) {
             std::size_t i = 0;
             try {
                 for (; i < size; i++) {


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