Remove uses of boost::is_bounded_array

This commit is contained in:
Peter Dimov
2024-10-06 20:04:34 +03:00
parent 7f880bc205
commit b12e342c52
5 changed files with 20 additions and 17 deletions

View File

@@ -10,6 +10,7 @@ Distributed under the Boost Software License, Version 1.0.
#include <boost/smart_ptr/allocate_shared_array.hpp>
#include <boost/smart_ptr/local_shared_ptr.hpp>
#include <boost/smart_ptr/detail/sp_type_traits.hpp>
#include <type_traits>
namespace boost {
@@ -90,7 +91,7 @@ allocate_local_shared(const A& allocator, std::size_t count)
}
template<class T, class A>
inline typename std::enable_if<is_bounded_array<T>::value,
inline typename std::enable_if<detail::sp_is_bounded_array<T>::value,
local_shared_ptr<T> >::type
allocate_local_shared(const A& allocator)
{
@@ -134,7 +135,7 @@ allocate_local_shared(const A& allocator, std::size_t count,
}
template<class T, class A>
inline typename std::enable_if<is_bounded_array<T>::value,
inline typename std::enable_if<detail::sp_is_bounded_array<T>::value,
local_shared_ptr<T> >::type
allocate_local_shared(const A& allocator,
const typename std::remove_extent<T>::type& value)
@@ -167,7 +168,7 @@ allocate_local_shared_noinit(const A& allocator, std::size_t count)
}
template<class T, class A>
inline typename std::enable_if<is_bounded_array<T>::value,
inline typename std::enable_if<detail::sp_is_bounded_array<T>::value,
local_shared_ptr<T> >::type
allocate_local_shared_noinit(const A& allocator)
{

View File

@@ -12,7 +12,7 @@ Distributed under the Boost Software License, Version 1.0.
#include <boost/core/alloc_construct.hpp>
#include <boost/core/first_scalar.hpp>
#include <boost/smart_ptr/shared_ptr.hpp>
#include <boost/type_traits/is_bounded_array.hpp>
#include <boost/smart_ptr/detail/sp_type_traits.hpp>
#include <boost/type_traits/is_unbounded_array.hpp>
#include <boost/type_traits/type_with_alignment.hpp>
#include <type_traits>
@@ -271,7 +271,7 @@ allocate_shared(const A& allocator, std::size_t count)
}
template<class T, class A>
inline typename std::enable_if<is_bounded_array<T>::value, shared_ptr<T> >::type
inline typename std::enable_if<detail::sp_is_bounded_array<T>::value, shared_ptr<T> >::type
allocate_shared(const A& allocator)
{
enum {
@@ -309,7 +309,7 @@ allocate_shared(const A& allocator, std::size_t count,
}
template<class T, class A>
inline typename std::enable_if<is_bounded_array<T>::value, shared_ptr<T> >::type
inline typename std::enable_if<detail::sp_is_bounded_array<T>::value, shared_ptr<T> >::type
allocate_shared(const A& allocator,
const typename std::remove_extent<T>::type& value)
{
@@ -337,7 +337,7 @@ allocate_shared_noinit(const A& allocator, std::size_t count)
}
template<class T, class A>
inline typename std::enable_if<is_bounded_array<T>::value, shared_ptr<T> >::type
inline typename std::enable_if<detail::sp_is_bounded_array<T>::value, shared_ptr<T> >::type
allocate_shared_noinit(const A& allocator)
{
return boost::allocate_shared<T>(boost::noinit_adapt(allocator));

View File

@@ -14,7 +14,7 @@ Distributed under the Boost Software License, Version 1.0.
#include <boost/core/first_scalar.hpp>
#include <boost/core/noinit_adaptor.hpp>
#include <boost/core/pointer_traits.hpp>
#include <boost/type_traits/is_bounded_array.hpp>
#include <boost/smart_ptr/detail/sp_type_traits.hpp>
#include <boost/type_traits/is_unbounded_array.hpp>
#include <boost/type_traits/type_identity.hpp>
#include <boost/config.hpp>
@@ -399,7 +399,7 @@ allocate_unique(const A& alloc, std::size_t size)
}
template<class T, class A>
inline typename std::enable_if<is_bounded_array<T>::value,
inline typename std::enable_if<detail::sp_is_bounded_array<T>::value,
std::unique_ptr<typename detail::sp_alloc_result<T>::type,
alloc_deleter<T, A> > >::type
allocate_unique(const A& alloc)
@@ -419,7 +419,7 @@ allocate_unique_noinit(const A& alloc, std::size_t size)
}
template<class T, class A>
inline typename std::enable_if<is_bounded_array<T>::value,
inline typename std::enable_if<detail::sp_is_bounded_array<T>::value,
std::unique_ptr<typename detail::sp_alloc_result<T>::type,
alloc_deleter<T, noinit_adaptor<A> > > >::type
allocate_unique_noinit(const A& alloc)
@@ -441,7 +441,7 @@ allocate_unique(const A& alloc, std::size_t size,
}
template<class T, class A>
inline typename std::enable_if<is_bounded_array<T>::value,
inline typename std::enable_if<detail::sp_is_bounded_array<T>::value,
std::unique_ptr<typename detail::sp_alloc_result<T>::type,
alloc_deleter<T, A> > >::type
allocate_unique(const A& alloc,

View File

@@ -11,12 +11,13 @@ Distributed under the Boost Software License, Version 1.0.
#include <boost/core/default_allocator.hpp>
#include <boost/smart_ptr/allocate_local_shared_array.hpp>
#include <boost/smart_ptr/detail/sp_type_traits.hpp>
#include <type_traits>
namespace boost {
template<class T>
inline typename std::enable_if<is_bounded_array<T>::value,
inline typename std::enable_if<detail::sp_is_bounded_array<T>::value,
local_shared_ptr<T> >::type
make_local_shared()
{
@@ -25,7 +26,7 @@ make_local_shared()
}
template<class T>
inline typename std::enable_if<is_bounded_array<T>::value,
inline typename std::enable_if<detail::sp_is_bounded_array<T>::value,
local_shared_ptr<T> >::type
make_local_shared(const typename std::remove_extent<T>::type& value)
{
@@ -53,7 +54,7 @@ make_local_shared(std::size_t size,
}
template<class T>
inline typename std::enable_if<is_bounded_array<T>::value,
inline typename std::enable_if<detail::sp_is_bounded_array<T>::value,
local_shared_ptr<T> >::type
make_local_shared_noinit()
{

View File

@@ -10,12 +10,13 @@ Distributed under the Boost Software License, Version 1.0.
#include <boost/core/default_allocator.hpp>
#include <boost/smart_ptr/allocate_shared_array.hpp>
#include <boost/smart_ptr/detail/sp_type_traits.hpp>
#include <type_traits>
namespace boost {
template<class T>
inline typename std::enable_if<is_bounded_array<T>::value, shared_ptr<T> >::type
inline typename std::enable_if<detail::sp_is_bounded_array<T>::value, shared_ptr<T> >::type
make_shared()
{
return boost::allocate_shared<T>(boost::default_allocator<typename
@@ -23,7 +24,7 @@ make_shared()
}
template<class T>
inline typename std::enable_if<is_bounded_array<T>::value, shared_ptr<T> >::type
inline typename std::enable_if<detail::sp_is_bounded_array<T>::value, shared_ptr<T> >::type
make_shared(const typename std::remove_extent<T>::type& value)
{
return boost::allocate_shared<T>(boost::default_allocator<typename
@@ -47,7 +48,7 @@ make_shared(std::size_t size, const typename std::remove_extent<T>::type& value)
}
template<class T>
inline typename std::enable_if<is_bounded_array<T>::value, shared_ptr<T> >::type
inline typename std::enable_if<detail::sp_is_bounded_array<T>::value, shared_ptr<T> >::type
make_shared_noinit()
{
return boost::allocate_shared_noinit<T>(boost::default_allocator<typename