/* Copyright 2012-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_SHARED_ARRAY_HPP #define ACTIV_BOOST_SMART_PTR_MAKE_SHARED_ARRAY_HPP #include #include namespace Boost { template inline typename enable_if_::value, shared_ptr >::type make_shared() { return Boost::allocate_shared(Boost::default_allocator::type>()); } template inline typename enable_if_::value, shared_ptr >::type make_shared(const typename remove_extent::type& value) { return Boost::allocate_shared(Boost::default_allocator::type>(), value); } template inline typename enable_if_::value, shared_ptr >::type make_shared(std::size_t size) { return Boost::allocate_shared(Boost::default_allocator::type>(), size); } template inline typename enable_if_::value, shared_ptr >::type make_shared(std::size_t size, const typename remove_extent::type& value) { return Boost::allocate_shared(Boost::default_allocator::type>(), size, value); } template inline typename enable_if_::value, shared_ptr >::type make_shared_noinit() { return Boost::allocate_shared_noinit(Boost::default_allocator::type>()); } template inline typename enable_if_::value, shared_ptr >::type make_shared_noinit(std::size_t size) { return Boost::allocate_shared_noinit(Boost::default_allocator::type>(), size); } } /* boost */ #endif