Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r81759 - trunk/boost/smart_ptr/detail
From: glenfe_at_[hidden]
Date: 2012-12-07 11:40:21


Author: glenfe
Date: 2012-12-07 11:40:20 EST (Fri, 07 Dec 2012)
New Revision: 81759
URL: http://svn.boost.org/trac/boost/changeset/81759

Log:
Change ordering of overload definitions in array_utility.hpp
Text files modified:
   trunk/boost/smart_ptr/detail/array_utility.hpp | 28 +++++++++++++++-------------
   1 files changed, 15 insertions(+), 13 deletions(-)

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 11:40:20 EST (Fri, 07 Dec 2012)
@@ -16,12 +16,8 @@
 namespace boost {
     namespace detail {
         template<typename T>
- inline void array_destroy(T* memory, std::size_t size) {
- boost::has_trivial_destructor<T> type;
- array_destroy(memory, size, type);
- }
- template<typename T>
         inline void array_destroy(T*, std::size_t, boost::true_type) {
+ // do nothing
         }
         template<typename T>
         inline void array_destroy(T* memory, std::size_t size, boost::false_type) {
@@ -30,9 +26,9 @@
             }
         }
         template<typename T>
- inline void array_construct(T* memory, std::size_t size) {
- boost::has_trivial_default_constructor<T> type;
- array_construct(memory, size, type);
+ inline void array_destroy(T* memory, std::size_t size) {
+ boost::has_trivial_destructor<T> type;
+ array_destroy(memory, size, type);
         }
         template<typename T>
         inline void array_construct(T* memory, std::size_t size, boost::true_type) {
@@ -53,6 +49,11 @@
                 throw;
             }
         }
+ template<typename T>
+ inline void array_construct(T* memory, std::size_t size) {
+ boost::has_trivial_default_constructor<T> type;
+ array_construct(memory, size, type);
+ }
 #if defined(BOOST_HAS_RVALUE_REFS)
         template<typename T>
         inline void array_construct_value(T* memory, std::size_t size, T&& value) {
@@ -110,12 +111,8 @@
             }
         }
         template<typename T>
- inline void array_construct_noinit(T* memory, std::size_t size) {
- boost::has_trivial_default_constructor<T> type;
- array_construct_noinit(memory, size, type);
- }
- template<typename T>
         inline void array_construct_noinit(T*, std::size_t, boost::true_type) {
+ // do nothing
         }
         template<typename T>
         inline void array_construct_noinit(T* memory, std::size_t size, boost::false_type) {
@@ -130,6 +127,11 @@
                 throw;
             }
         }
+ template<typename T>
+ inline void array_construct_noinit(T* memory, std::size_t size) {
+ boost::has_trivial_default_constructor<T> type;
+ array_construct_noinit(memory, size, type);
+ }
     }
 }
 


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