From f390d9e265d93daf259ef9dccab4c461996de415 Mon Sep 17 00:00:00 2001 From: Glen Fernandes Date: Fri, 7 Dec 2012 16:40:20 +0000 Subject: [PATCH] Change ordering of overload definitions in array_utility.hpp [SVN r81759] --- .../boost/smart_ptr/detail/array_utility.hpp | 28 ++++++++++--------- 1 file changed, 15 insertions(+), 13 deletions(-) diff --git a/include/boost/smart_ptr/detail/array_utility.hpp b/include/boost/smart_ptr/detail/array_utility.hpp index d60c867..633be02 100644 --- a/include/boost/smart_ptr/detail/array_utility.hpp +++ b/include/boost/smart_ptr/detail/array_utility.hpp @@ -15,13 +15,9 @@ namespace boost { namespace detail { - template - inline void array_destroy(T* memory, std::size_t size) { - boost::has_trivial_destructor type; - array_destroy(memory, size, type); - } template inline void array_destroy(T*, std::size_t, boost::true_type) { + // do nothing } template inline void array_destroy(T* memory, std::size_t size, boost::false_type) { @@ -30,9 +26,9 @@ namespace boost { } } template - inline void array_construct(T* memory, std::size_t size) { - boost::has_trivial_default_constructor type; - array_construct(memory, size, type); + inline void array_destroy(T* memory, std::size_t size) { + boost::has_trivial_destructor type; + array_destroy(memory, size, type); } template inline void array_construct(T* memory, std::size_t size, boost::true_type) { @@ -53,6 +49,11 @@ namespace boost { throw; } } + template + inline void array_construct(T* memory, std::size_t size) { + boost::has_trivial_default_constructor type; + array_construct(memory, size, type); + } #if defined(BOOST_HAS_RVALUE_REFS) template inline void array_construct_value(T* memory, std::size_t size, T&& value) { @@ -110,12 +111,8 @@ namespace boost { } } template - inline void array_construct_noinit(T* memory, std::size_t size) { - boost::has_trivial_default_constructor type; - array_construct_noinit(memory, size, type); - } - template inline void array_construct_noinit(T*, std::size_t, boost::true_type) { + // do nothing } template inline void array_construct_noinit(T* memory, std::size_t size, boost::false_type) { @@ -130,6 +127,11 @@ namespace boost { throw; } } + template + inline void array_construct_noinit(T* memory, std::size_t size) { + boost::has_trivial_default_constructor type; + array_construct_noinit(memory, size, type); + } } }