diff options
Diffstat (limited to 'boost/smart_ptr/make_shared_array.hpp')
-rw-r--r-- | boost/smart_ptr/make_shared_array.hpp | 25 |
1 files changed, 13 insertions, 12 deletions
diff --git a/boost/smart_ptr/make_shared_array.hpp b/boost/smart_ptr/make_shared_array.hpp index 1b40c4d6a8..785eb875fc 100644 --- a/boost/smart_ptr/make_shared_array.hpp +++ b/boost/smart_ptr/make_shared_array.hpp @@ -8,6 +8,7 @@ Distributed under the Boost Software License, Version 1.0. #ifndef BOOST_SMART_PTR_MAKE_SHARED_ARRAY_HPP #define BOOST_SMART_PTR_MAKE_SHARED_ARRAY_HPP +#include <boost/core/default_allocator.hpp> #include <boost/smart_ptr/allocate_shared_array.hpp> namespace boost { @@ -16,48 +17,48 @@ template<class T> inline typename enable_if_<is_bounded_array<T>::value, shared_ptr<T> >::type make_shared() { - return boost::allocate_shared<T>(std::allocator<typename - detail::sp_array_scalar<T>::type>()); + return boost::allocate_shared<T>(boost::default_allocator<typename + detail::sp_array_element<T>::type>()); } template<class T> inline typename enable_if_<is_bounded_array<T>::value, shared_ptr<T> >::type make_shared(const typename remove_extent<T>::type& value) { - return boost::allocate_shared<T>(std::allocator<typename - detail::sp_array_scalar<T>::type>(), value); + return boost::allocate_shared<T>(boost::default_allocator<typename + detail::sp_array_element<T>::type>(), value); } template<class T> inline typename enable_if_<is_unbounded_array<T>::value, shared_ptr<T> >::type make_shared(std::size_t size) { - return boost::allocate_shared<T>(std::allocator<typename - detail::sp_array_scalar<T>::type>(), size); + return boost::allocate_shared<T>(boost::default_allocator<typename + detail::sp_array_element<T>::type>(), size); } template<class T> inline typename enable_if_<is_unbounded_array<T>::value, shared_ptr<T> >::type make_shared(std::size_t size, const typename remove_extent<T>::type& value) { - return boost::allocate_shared<T>(std::allocator<typename - detail::sp_array_scalar<T>::type>(), size, value); + return boost::allocate_shared<T>(boost::default_allocator<typename + detail::sp_array_element<T>::type>(), size, value); } template<class T> inline typename enable_if_<is_bounded_array<T>::value, shared_ptr<T> >::type make_shared_noinit() { - return boost::allocate_shared_noinit<T>(std::allocator<typename - detail::sp_array_scalar<T>::type>()); + return boost::allocate_shared_noinit<T>(boost::default_allocator<typename + detail::sp_array_element<T>::type>()); } template<class T> inline typename enable_if_<is_unbounded_array<T>::value, shared_ptr<T> >::type make_shared_noinit(std::size_t size) { - return boost::allocate_shared_noinit<T>(std::allocator<typename - detail::sp_array_scalar<T>::type>(), size); + return boost::allocate_shared_noinit<T>(boost::default_allocator<typename + detail::sp_array_element<T>::type>(), size); } } /* boost */ |