forked from boostorg/smart_ptr
Remove uses of boost::is_bounded_array
This commit is contained in:
@@ -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/allocate_shared_array.hpp>
|
||||||
#include <boost/smart_ptr/local_shared_ptr.hpp>
|
#include <boost/smart_ptr/local_shared_ptr.hpp>
|
||||||
|
#include <boost/smart_ptr/detail/sp_type_traits.hpp>
|
||||||
#include <type_traits>
|
#include <type_traits>
|
||||||
|
|
||||||
namespace boost {
|
namespace boost {
|
||||||
@@ -90,7 +91,7 @@ allocate_local_shared(const A& allocator, std::size_t count)
|
|||||||
}
|
}
|
||||||
|
|
||||||
template<class T, class A>
|
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
|
local_shared_ptr<T> >::type
|
||||||
allocate_local_shared(const A& allocator)
|
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>
|
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
|
local_shared_ptr<T> >::type
|
||||||
allocate_local_shared(const A& allocator,
|
allocate_local_shared(const A& allocator,
|
||||||
const typename std::remove_extent<T>::type& value)
|
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>
|
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
|
local_shared_ptr<T> >::type
|
||||||
allocate_local_shared_noinit(const A& allocator)
|
allocate_local_shared_noinit(const A& allocator)
|
||||||
{
|
{
|
||||||
|
@@ -12,7 +12,7 @@ Distributed under the Boost Software License, Version 1.0.
|
|||||||
#include <boost/core/alloc_construct.hpp>
|
#include <boost/core/alloc_construct.hpp>
|
||||||
#include <boost/core/first_scalar.hpp>
|
#include <boost/core/first_scalar.hpp>
|
||||||
#include <boost/smart_ptr/shared_ptr.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/is_unbounded_array.hpp>
|
||||||
#include <boost/type_traits/type_with_alignment.hpp>
|
#include <boost/type_traits/type_with_alignment.hpp>
|
||||||
#include <type_traits>
|
#include <type_traits>
|
||||||
@@ -271,7 +271,7 @@ allocate_shared(const A& allocator, std::size_t count)
|
|||||||
}
|
}
|
||||||
|
|
||||||
template<class T, class A>
|
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)
|
allocate_shared(const A& allocator)
|
||||||
{
|
{
|
||||||
enum {
|
enum {
|
||||||
@@ -309,7 +309,7 @@ allocate_shared(const A& allocator, std::size_t count,
|
|||||||
}
|
}
|
||||||
|
|
||||||
template<class T, class A>
|
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,
|
allocate_shared(const A& allocator,
|
||||||
const typename std::remove_extent<T>::type& value)
|
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>
|
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)
|
allocate_shared_noinit(const A& allocator)
|
||||||
{
|
{
|
||||||
return boost::allocate_shared<T>(boost::noinit_adapt(allocator));
|
return boost::allocate_shared<T>(boost::noinit_adapt(allocator));
|
||||||
|
@@ -14,7 +14,7 @@ Distributed under the Boost Software License, Version 1.0.
|
|||||||
#include <boost/core/first_scalar.hpp>
|
#include <boost/core/first_scalar.hpp>
|
||||||
#include <boost/core/noinit_adaptor.hpp>
|
#include <boost/core/noinit_adaptor.hpp>
|
||||||
#include <boost/core/pointer_traits.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/is_unbounded_array.hpp>
|
||||||
#include <boost/type_traits/type_identity.hpp>
|
#include <boost/type_traits/type_identity.hpp>
|
||||||
#include <boost/config.hpp>
|
#include <boost/config.hpp>
|
||||||
@@ -399,7 +399,7 @@ allocate_unique(const A& alloc, std::size_t size)
|
|||||||
}
|
}
|
||||||
|
|
||||||
template<class T, class A>
|
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,
|
std::unique_ptr<typename detail::sp_alloc_result<T>::type,
|
||||||
alloc_deleter<T, A> > >::type
|
alloc_deleter<T, A> > >::type
|
||||||
allocate_unique(const A& alloc)
|
allocate_unique(const A& alloc)
|
||||||
@@ -419,7 +419,7 @@ allocate_unique_noinit(const A& alloc, std::size_t size)
|
|||||||
}
|
}
|
||||||
|
|
||||||
template<class T, class A>
|
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,
|
std::unique_ptr<typename detail::sp_alloc_result<T>::type,
|
||||||
alloc_deleter<T, noinit_adaptor<A> > > >::type
|
alloc_deleter<T, noinit_adaptor<A> > > >::type
|
||||||
allocate_unique_noinit(const A& alloc)
|
allocate_unique_noinit(const A& alloc)
|
||||||
@@ -441,7 +441,7 @@ allocate_unique(const A& alloc, std::size_t size,
|
|||||||
}
|
}
|
||||||
|
|
||||||
template<class T, class A>
|
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,
|
std::unique_ptr<typename detail::sp_alloc_result<T>::type,
|
||||||
alloc_deleter<T, A> > >::type
|
alloc_deleter<T, A> > >::type
|
||||||
allocate_unique(const A& alloc,
|
allocate_unique(const A& alloc,
|
||||||
|
@@ -11,12 +11,13 @@ Distributed under the Boost Software License, Version 1.0.
|
|||||||
|
|
||||||
#include <boost/core/default_allocator.hpp>
|
#include <boost/core/default_allocator.hpp>
|
||||||
#include <boost/smart_ptr/allocate_local_shared_array.hpp>
|
#include <boost/smart_ptr/allocate_local_shared_array.hpp>
|
||||||
|
#include <boost/smart_ptr/detail/sp_type_traits.hpp>
|
||||||
#include <type_traits>
|
#include <type_traits>
|
||||||
|
|
||||||
namespace boost {
|
namespace boost {
|
||||||
|
|
||||||
template<class T>
|
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
|
local_shared_ptr<T> >::type
|
||||||
make_local_shared()
|
make_local_shared()
|
||||||
{
|
{
|
||||||
@@ -25,7 +26,7 @@ make_local_shared()
|
|||||||
}
|
}
|
||||||
|
|
||||||
template<class T>
|
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
|
local_shared_ptr<T> >::type
|
||||||
make_local_shared(const typename std::remove_extent<T>::type& value)
|
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>
|
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
|
local_shared_ptr<T> >::type
|
||||||
make_local_shared_noinit()
|
make_local_shared_noinit()
|
||||||
{
|
{
|
||||||
|
@@ -10,12 +10,13 @@ Distributed under the Boost Software License, Version 1.0.
|
|||||||
|
|
||||||
#include <boost/core/default_allocator.hpp>
|
#include <boost/core/default_allocator.hpp>
|
||||||
#include <boost/smart_ptr/allocate_shared_array.hpp>
|
#include <boost/smart_ptr/allocate_shared_array.hpp>
|
||||||
|
#include <boost/smart_ptr/detail/sp_type_traits.hpp>
|
||||||
#include <type_traits>
|
#include <type_traits>
|
||||||
|
|
||||||
namespace boost {
|
namespace boost {
|
||||||
|
|
||||||
template<class T>
|
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()
|
make_shared()
|
||||||
{
|
{
|
||||||
return boost::allocate_shared<T>(boost::default_allocator<typename
|
return boost::allocate_shared<T>(boost::default_allocator<typename
|
||||||
@@ -23,7 +24,7 @@ make_shared()
|
|||||||
}
|
}
|
||||||
|
|
||||||
template<class T>
|
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)
|
make_shared(const typename std::remove_extent<T>::type& value)
|
||||||
{
|
{
|
||||||
return boost::allocate_shared<T>(boost::default_allocator<typename
|
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>
|
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()
|
make_shared_noinit()
|
||||||
{
|
{
|
||||||
return boost::allocate_shared_noinit<T>(boost::default_allocator<typename
|
return boost::allocate_shared_noinit<T>(boost::default_allocator<typename
|
||||||
|
Reference in New Issue
Block a user