Change ordering of overload definitions in array_utility.hpp

[SVN r81759]
This commit is contained in:
Glen Fernandes
2012-12-07 16:40:20 +00:00
parent ea22982865
commit f390d9e265

View File

@ -15,13 +15,9 @@
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 @@ namespace boost {
}
}
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 @@ namespace boost {
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 @@ namespace boost {
}
}
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 @@ namespace boost {
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);
}
}
}