/* 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 ACTIV_BOOST_SMART_PTR_MAKE_LOCAL_SHARED_ARRAY_HPP #define ACTIV_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