/* Copyright 2017 Peter Dimov Copyright 2017-2019 Glen Joseph Fernandes (glenjofe@gmail.com) Distributed under the Boost Software License, Version 1.0. (http://www.boost.org/LICENSE_1_0.txt) */ #ifndef BOOST_SMART_PTR_MAKE_LOCAL_SHARED_ARRAY_HPP #define BOOST_SMART_PTR_MAKE_LOCAL_SHARED_ARRAY_HPP #include #include namespace boost { template inline typename enable_if_::value, local_shared_ptr >::type make_local_shared() { return boost::allocate_local_shared(boost::default_allocator::type>()); } template inline typename enable_if_::value, local_shared_ptr >::type make_local_shared(const typename remove_extent::type& value) { return boost::allocate_local_shared(boost::default_allocator::type>(), value); } template inline typename enable_if_::value, local_shared_ptr >::type make_local_shared(std::size_t size) { return boost::allocate_local_shared(boost::default_allocator::type>(), size); } template inline typename enable_if_::value, local_shared_ptr >::type make_local_shared(std::size_t size, const typename remove_extent::type& value) { return boost::allocate_local_shared(boost::default_allocator::type>(), size, value); } template inline typename enable_if_::value, local_shared_ptr >::type make_local_shared_noinit() { return boost::allocate_local_shared_noinit(boost:: default_allocator::type>()); } template inline typename enable_if_::value, local_shared_ptr >::type make_local_shared_noinit(std::size_t size) { return boost::allocate_local_shared_noinit(boost:: default_allocator::type>(), size); } } /* boost */ #endif