forked from boostorg/smart_ptr
Change ordering of overload definitions in array_utility.hpp
[SVN r81759]
This commit is contained in:
@ -15,13 +15,9 @@
|
|||||||
|
|
||||||
namespace boost {
|
namespace boost {
|
||||||
namespace detail {
|
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>
|
template<typename T>
|
||||||
inline void array_destroy(T*, std::size_t, boost::true_type) {
|
inline void array_destroy(T*, std::size_t, boost::true_type) {
|
||||||
|
// do nothing
|
||||||
}
|
}
|
||||||
template<typename T>
|
template<typename T>
|
||||||
inline void array_destroy(T* memory, std::size_t size, boost::false_type) {
|
inline void array_destroy(T* memory, std::size_t size, boost::false_type) {
|
||||||
@ -30,9 +26,9 @@ namespace boost {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
template<typename T>
|
template<typename T>
|
||||||
inline void array_construct(T* memory, std::size_t size) {
|
inline void array_destroy(T* memory, std::size_t size) {
|
||||||
boost::has_trivial_default_constructor<T> type;
|
boost::has_trivial_destructor<T> type;
|
||||||
array_construct(memory, size, type);
|
array_destroy(memory, size, type);
|
||||||
}
|
}
|
||||||
template<typename T>
|
template<typename T>
|
||||||
inline void array_construct(T* memory, std::size_t size, boost::true_type) {
|
inline void array_construct(T* memory, std::size_t size, boost::true_type) {
|
||||||
@ -53,6 +49,11 @@ namespace boost {
|
|||||||
throw;
|
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)
|
#if defined(BOOST_HAS_RVALUE_REFS)
|
||||||
template<typename T>
|
template<typename T>
|
||||||
inline void array_construct_value(T* memory, std::size_t size, T&& value) {
|
inline void array_construct_value(T* memory, std::size_t size, T&& value) {
|
||||||
@ -110,12 +111,8 @@ namespace boost {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
template<typename T>
|
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) {
|
inline void array_construct_noinit(T*, std::size_t, boost::true_type) {
|
||||||
|
// do nothing
|
||||||
}
|
}
|
||||||
template<typename T>
|
template<typename T>
|
||||||
inline void array_construct_noinit(T* memory, std::size_t size, boost::false_type) {
|
inline void array_construct_noinit(T* memory, std::size_t size, boost::false_type) {
|
||||||
@ -130,6 +127,11 @@ namespace boost {
|
|||||||
throw;
|
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);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user