From b12e342c52751988450fd33ce4a62ac3736423a8 Mon Sep 17 00:00:00 2001 From: Peter Dimov Date: Sun, 6 Oct 2024 20:04:34 +0300 Subject: [PATCH] Remove uses of boost::is_bounded_array --- include/boost/smart_ptr/allocate_local_shared_array.hpp | 7 ++++--- include/boost/smart_ptr/allocate_shared_array.hpp | 8 ++++---- include/boost/smart_ptr/allocate_unique.hpp | 8 ++++---- include/boost/smart_ptr/make_local_shared_array.hpp | 7 ++++--- include/boost/smart_ptr/make_shared_array.hpp | 7 ++++--- 5 files changed, 20 insertions(+), 17 deletions(-) diff --git a/include/boost/smart_ptr/allocate_local_shared_array.hpp b/include/boost/smart_ptr/allocate_local_shared_array.hpp index 56b1797..688626e 100644 --- a/include/boost/smart_ptr/allocate_local_shared_array.hpp +++ b/include/boost/smart_ptr/allocate_local_shared_array.hpp @@ -10,6 +10,7 @@ Distributed under the Boost Software License, Version 1.0. #include #include +#include #include namespace boost { @@ -90,7 +91,7 @@ allocate_local_shared(const A& allocator, std::size_t count) } template -inline typename std::enable_if::value, +inline typename std::enable_if::value, local_shared_ptr >::type allocate_local_shared(const A& allocator) { @@ -134,7 +135,7 @@ allocate_local_shared(const A& allocator, std::size_t count, } template -inline typename std::enable_if::value, +inline typename std::enable_if::value, local_shared_ptr >::type allocate_local_shared(const A& allocator, const typename std::remove_extent::type& value) @@ -167,7 +168,7 @@ allocate_local_shared_noinit(const A& allocator, std::size_t count) } template -inline typename std::enable_if::value, +inline typename std::enable_if::value, local_shared_ptr >::type allocate_local_shared_noinit(const A& allocator) { diff --git a/include/boost/smart_ptr/allocate_shared_array.hpp b/include/boost/smart_ptr/allocate_shared_array.hpp index ca6cc15..ea100d0 100644 --- a/include/boost/smart_ptr/allocate_shared_array.hpp +++ b/include/boost/smart_ptr/allocate_shared_array.hpp @@ -12,7 +12,7 @@ Distributed under the Boost Software License, Version 1.0. #include #include #include -#include +#include #include #include #include @@ -271,7 +271,7 @@ allocate_shared(const A& allocator, std::size_t count) } template -inline typename std::enable_if::value, shared_ptr >::type +inline typename std::enable_if::value, shared_ptr >::type allocate_shared(const A& allocator) { enum { @@ -309,7 +309,7 @@ allocate_shared(const A& allocator, std::size_t count, } template -inline typename std::enable_if::value, shared_ptr >::type +inline typename std::enable_if::value, shared_ptr >::type allocate_shared(const A& allocator, const typename std::remove_extent::type& value) { @@ -337,7 +337,7 @@ allocate_shared_noinit(const A& allocator, std::size_t count) } template -inline typename std::enable_if::value, shared_ptr >::type +inline typename std::enable_if::value, shared_ptr >::type allocate_shared_noinit(const A& allocator) { return boost::allocate_shared(boost::noinit_adapt(allocator)); diff --git a/include/boost/smart_ptr/allocate_unique.hpp b/include/boost/smart_ptr/allocate_unique.hpp index 560a3a1..6e0d72b 100644 --- a/include/boost/smart_ptr/allocate_unique.hpp +++ b/include/boost/smart_ptr/allocate_unique.hpp @@ -14,7 +14,7 @@ Distributed under the Boost Software License, Version 1.0. #include #include #include -#include +#include #include #include #include @@ -399,7 +399,7 @@ allocate_unique(const A& alloc, std::size_t size) } template -inline typename std::enable_if::value, +inline typename std::enable_if::value, std::unique_ptr::type, alloc_deleter > >::type allocate_unique(const A& alloc) @@ -419,7 +419,7 @@ allocate_unique_noinit(const A& alloc, std::size_t size) } template -inline typename std::enable_if::value, +inline typename std::enable_if::value, std::unique_ptr::type, alloc_deleter > > >::type allocate_unique_noinit(const A& alloc) @@ -441,7 +441,7 @@ allocate_unique(const A& alloc, std::size_t size, } template -inline typename std::enable_if::value, +inline typename std::enable_if::value, std::unique_ptr::type, alloc_deleter > >::type allocate_unique(const A& alloc, diff --git a/include/boost/smart_ptr/make_local_shared_array.hpp b/include/boost/smart_ptr/make_local_shared_array.hpp index 28c16cf..fd14d77 100644 --- a/include/boost/smart_ptr/make_local_shared_array.hpp +++ b/include/boost/smart_ptr/make_local_shared_array.hpp @@ -11,12 +11,13 @@ Distributed under the Boost Software License, Version 1.0. #include #include +#include #include namespace boost { template -inline typename std::enable_if::value, +inline typename std::enable_if::value, local_shared_ptr >::type make_local_shared() { @@ -25,7 +26,7 @@ make_local_shared() } template -inline typename std::enable_if::value, +inline typename std::enable_if::value, local_shared_ptr >::type make_local_shared(const typename std::remove_extent::type& value) { @@ -53,7 +54,7 @@ make_local_shared(std::size_t size, } template -inline typename std::enable_if::value, +inline typename std::enable_if::value, local_shared_ptr >::type make_local_shared_noinit() { diff --git a/include/boost/smart_ptr/make_shared_array.hpp b/include/boost/smart_ptr/make_shared_array.hpp index 3da37cc..1ee9dcd 100644 --- a/include/boost/smart_ptr/make_shared_array.hpp +++ b/include/boost/smart_ptr/make_shared_array.hpp @@ -10,12 +10,13 @@ Distributed under the Boost Software License, Version 1.0. #include #include +#include #include namespace boost { template -inline typename std::enable_if::value, shared_ptr >::type +inline typename std::enable_if::value, shared_ptr >::type make_shared() { return boost::allocate_shared(boost::default_allocator -inline typename std::enable_if::value, shared_ptr >::type +inline typename std::enable_if::value, shared_ptr >::type make_shared(const typename std::remove_extent::type& value) { return boost::allocate_shared(boost::default_allocator::type& value) } template -inline typename std::enable_if::value, shared_ptr >::type +inline typename std::enable_if::value, shared_ptr >::type make_shared_noinit() { return boost::allocate_shared_noinit(boost::default_allocator