2 Copyright 2017 Peter Dimov
3 Copyright 2017 Glen Joseph Fernandes
6 Distributed under the Boost Software License, Version 1.0.
7 (http://www.boost.org/LICENSE_1_0.txt)
9 #ifndef BOOST_SMART_PTR_MAKE_LOCAL_SHARED_ARRAY_HPP
10 #define BOOST_SMART_PTR_MAKE_LOCAL_SHARED_ARRAY_HPP
12 #include <boost/smart_ptr/allocate_local_shared_array.hpp>
17 inline typename detail::lsp_if_size_array<T>::type
20 return boost::allocate_local_shared<T>(std::allocator<typename
21 detail::sp_array_scalar<T>::type>());
25 inline typename detail::lsp_if_size_array<T>::type
26 make_local_shared(const typename detail::sp_array_element<T>::type& value)
28 return boost::allocate_local_shared<T>(std::allocator<typename
29 detail::sp_array_scalar<T>::type>(), value);
33 inline typename detail::lsp_if_array<T>::type
34 make_local_shared(std::size_t size)
36 return boost::allocate_local_shared<T>(std::allocator<typename
37 detail::sp_array_scalar<T>::type>(), size);
41 inline typename detail::lsp_if_array<T>::type
42 make_local_shared(std::size_t size,
43 const typename detail::sp_array_element<T>::type& value)
45 return boost::allocate_local_shared<T>(std::allocator<typename
46 detail::sp_array_scalar<T>::type>(), size, value);
50 inline typename detail::lsp_if_size_array<T>::type
51 make_local_shared_noinit()
53 return allocate_local_shared_noinit<T>(std::allocator<typename
54 detail::sp_array_scalar<T>::type>());
58 inline typename detail::lsp_if_array<T>::type
59 make_local_shared_noinit(std::size_t size)
61 return allocate_local_shared_noinit<T>(std::allocator<typename
62 detail::sp_array_scalar<T>::type>(), size);