Remove uses of boost::is_unbounded_array

This commit is contained in:
Peter Dimov
2024-10-06 20:08:02 +03:00
parent b12e342c52
commit 9466e73cbe
6 changed files with 19 additions and 21 deletions

View File

@ -71,7 +71,7 @@ private:
} /* detail */
template<class T, class A>
inline typename std::enable_if<is_unbounded_array<T>::value,
inline typename std::enable_if<detail::sp_is_unbounded_array<T>::value,
local_shared_ptr<T> >::type
allocate_local_shared(const A& allocator, std::size_t count)
{
@ -114,7 +114,7 @@ allocate_local_shared(const A& allocator)
}
template<class T, class A>
inline typename std::enable_if<is_unbounded_array<T>::value,
inline typename std::enable_if<detail::sp_is_unbounded_array<T>::value,
local_shared_ptr<T> >::type
allocate_local_shared(const A& allocator, std::size_t count,
const typename std::remove_extent<T>::type& value)
@ -159,7 +159,7 @@ allocate_local_shared(const A& allocator,
}
template<class T, class A>
inline typename std::enable_if<is_unbounded_array<T>::value,
inline typename std::enable_if<detail::sp_is_unbounded_array<T>::value,
local_shared_ptr<T> >::type
allocate_local_shared_noinit(const A& allocator, std::size_t count)
{

View File

@ -13,7 +13,6 @@ Distributed under the Boost Software License, Version 1.0.
#include <boost/core/first_scalar.hpp>
#include <boost/smart_ptr/shared_ptr.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>
@ -254,7 +253,7 @@ private:
} /* detail */
template<class T, class A>
inline typename std::enable_if<is_unbounded_array<T>::value, shared_ptr<T> >::type
inline typename std::enable_if<detail::sp_is_unbounded_array<T>::value, shared_ptr<T> >::type
allocate_shared(const A& allocator, std::size_t count)
{
typedef typename detail::sp_array_element<T>::type element;
@ -291,7 +290,7 @@ allocate_shared(const A& allocator)
}
template<class T, class A>
inline typename std::enable_if<is_unbounded_array<T>::value, shared_ptr<T> >::type
inline typename std::enable_if<detail::sp_is_unbounded_array<T>::value, shared_ptr<T> >::type
allocate_shared(const A& allocator, std::size_t count,
const typename std::remove_extent<T>::type& value)
{
@ -330,7 +329,7 @@ allocate_shared(const A& allocator,
}
template<class T, class A>
inline typename std::enable_if<is_unbounded_array<T>::value, shared_ptr<T> >::type
inline typename std::enable_if<detail::sp_is_unbounded_array<T>::value, shared_ptr<T> >::type
allocate_shared_noinit(const A& allocator, std::size_t count)
{
return boost::allocate_shared<T>(boost::noinit_adapt(allocator), count);

View File

@ -15,7 +15,6 @@ Distributed under the Boost Software License, Version 1.0.
#include <boost/core/noinit_adaptor.hpp>
#include <boost/core/pointer_traits.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>
#include <memory>
@ -388,7 +387,7 @@ allocate_unique_noinit(const A& alloc)
}
template<class T, class A>
inline typename std::enable_if<is_unbounded_array<T>::value,
inline typename std::enable_if<detail::sp_is_unbounded_array<T>::value,
std::unique_ptr<T, alloc_deleter<T, A> > >::type
allocate_unique(const A& alloc, std::size_t size)
{
@ -411,7 +410,7 @@ allocate_unique(const A& alloc)
}
template<class T, class A>
inline typename std::enable_if<is_unbounded_array<T>::value,
inline typename std::enable_if<detail::sp_is_unbounded_array<T>::value,
std::unique_ptr<T, alloc_deleter<T, noinit_adaptor<A> > > >::type
allocate_unique_noinit(const A& alloc, std::size_t size)
{
@ -428,7 +427,7 @@ allocate_unique_noinit(const A& alloc)
}
template<class T, class A>
inline typename std::enable_if<is_unbounded_array<T>::value,
inline typename std::enable_if<detail::sp_is_unbounded_array<T>::value,
std::unique_ptr<T, alloc_deleter<T, A> > >::type
allocate_unique(const A& alloc, std::size_t size,
const typename std::remove_extent<T>::type& value)

View File

@ -35,7 +35,7 @@ make_local_shared(const typename std::remove_extent<T>::type& value)
}
template<class T>
inline typename std::enable_if<is_unbounded_array<T>::value,
inline typename std::enable_if<detail::sp_is_unbounded_array<T>::value,
local_shared_ptr<T> >::type
make_local_shared(std::size_t size)
{
@ -44,7 +44,7 @@ make_local_shared(std::size_t size)
}
template<class T>
inline typename std::enable_if<is_unbounded_array<T>::value,
inline typename std::enable_if<detail::sp_is_unbounded_array<T>::value,
local_shared_ptr<T> >::type
make_local_shared(std::size_t size,
const typename std::remove_extent<T>::type& value)
@ -63,7 +63,7 @@ make_local_shared_noinit()
}
template<class T>
inline typename std::enable_if<is_unbounded_array<T>::value,
inline typename std::enable_if<detail::sp_is_unbounded_array<T>::value,
local_shared_ptr<T> >::type
make_local_shared_noinit(std::size_t size)
{

View File

@ -32,7 +32,7 @@ make_shared(const typename std::remove_extent<T>::type& value)
}
template<class T>
inline typename std::enable_if<is_unbounded_array<T>::value, shared_ptr<T> >::type
inline typename std::enable_if<detail::sp_is_unbounded_array<T>::value, shared_ptr<T> >::type
make_shared(std::size_t size)
{
return boost::allocate_shared<T>(boost::default_allocator<typename
@ -40,7 +40,7 @@ make_shared(std::size_t size)
}
template<class T>
inline typename std::enable_if<is_unbounded_array<T>::value, shared_ptr<T> >::type
inline typename std::enable_if<detail::sp_is_unbounded_array<T>::value, shared_ptr<T> >::type
make_shared(std::size_t size, const typename std::remove_extent<T>::type& value)
{
return boost::allocate_shared<T>(boost::default_allocator<typename
@ -56,7 +56,7 @@ make_shared_noinit()
}
template<class T>
inline typename std::enable_if<is_unbounded_array<T>::value, shared_ptr<T> >::type
inline typename std::enable_if<detail::sp_is_unbounded_array<T>::value, shared_ptr<T> >::type
make_shared_noinit(std::size_t size)
{
return boost::allocate_shared_noinit<T>(boost::default_allocator<typename

View File

@ -8,10 +8,10 @@ Distributed under the Boost Software License, Version 1.0.
#ifndef BOOST_SMART_PTR_MAKE_UNIQUE_HPP
#define BOOST_SMART_PTR_MAKE_UNIQUE_HPP
#include <boost/type_traits/is_unbounded_array.hpp>
#include <boost/smart_ptr/detail/sp_type_traits.hpp>
#include <memory>
#include <utility>
#include <type_traits>
#include <utility>
namespace boost {
@ -44,7 +44,7 @@ make_unique_noinit()
}
template<class T>
inline typename std::enable_if<is_unbounded_array<T>::value,
inline typename std::enable_if<detail::sp_is_unbounded_array<T>::value,
std::unique_ptr<T> >::type
make_unique(std::size_t size)
{
@ -52,7 +52,7 @@ make_unique(std::size_t size)
}
template<class T>
inline typename std::enable_if<is_unbounded_array<T>::value,
inline typename std::enable_if<detail::sp_is_unbounded_array<T>::value,
std::unique_ptr<T> >::type
make_unique_noinit(std::size_t size)
{