mirror of
https://github.com/boostorg/smart_ptr.git
synced 2025-08-01 05:34:36 +02:00
Remove uses of boost::is_unbounded_array
This commit is contained in:
@@ -71,7 +71,7 @@ private:
|
|||||||
} /* detail */
|
} /* detail */
|
||||||
|
|
||||||
template<class T, class A>
|
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
|
local_shared_ptr<T> >::type
|
||||||
allocate_local_shared(const A& allocator, std::size_t count)
|
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>
|
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
|
local_shared_ptr<T> >::type
|
||||||
allocate_local_shared(const A& allocator, std::size_t count,
|
allocate_local_shared(const A& allocator, std::size_t count,
|
||||||
const typename std::remove_extent<T>::type& value)
|
const typename std::remove_extent<T>::type& value)
|
||||||
@@ -159,7 +159,7 @@ allocate_local_shared(const A& allocator,
|
|||||||
}
|
}
|
||||||
|
|
||||||
template<class T, class A>
|
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
|
local_shared_ptr<T> >::type
|
||||||
allocate_local_shared_noinit(const A& allocator, std::size_t count)
|
allocate_local_shared_noinit(const A& allocator, std::size_t count)
|
||||||
{
|
{
|
||||||
|
@@ -13,7 +13,6 @@ Distributed under the Boost Software License, Version 1.0.
|
|||||||
#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/smart_ptr/detail/sp_type_traits.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 <boost/type_traits/type_with_alignment.hpp>
|
||||||
#include <type_traits>
|
#include <type_traits>
|
||||||
|
|
||||||
@@ -254,7 +253,7 @@ private:
|
|||||||
} /* detail */
|
} /* detail */
|
||||||
|
|
||||||
template<class T, class A>
|
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)
|
allocate_shared(const A& allocator, std::size_t count)
|
||||||
{
|
{
|
||||||
typedef typename detail::sp_array_element<T>::type element;
|
typedef typename detail::sp_array_element<T>::type element;
|
||||||
@@ -291,7 +290,7 @@ allocate_shared(const A& allocator)
|
|||||||
}
|
}
|
||||||
|
|
||||||
template<class T, class A>
|
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,
|
allocate_shared(const A& allocator, std::size_t count,
|
||||||
const typename std::remove_extent<T>::type& value)
|
const typename std::remove_extent<T>::type& value)
|
||||||
{
|
{
|
||||||
@@ -330,7 +329,7 @@ allocate_shared(const A& allocator,
|
|||||||
}
|
}
|
||||||
|
|
||||||
template<class T, class A>
|
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)
|
allocate_shared_noinit(const A& allocator, std::size_t count)
|
||||||
{
|
{
|
||||||
return boost::allocate_shared<T>(boost::noinit_adapt(allocator), count);
|
return boost::allocate_shared<T>(boost::noinit_adapt(allocator), count);
|
||||||
|
@@ -15,7 +15,6 @@ Distributed under the Boost Software License, Version 1.0.
|
|||||||
#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/smart_ptr/detail/sp_type_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/type_traits/type_identity.hpp>
|
||||||
#include <boost/config.hpp>
|
#include <boost/config.hpp>
|
||||||
#include <memory>
|
#include <memory>
|
||||||
@@ -388,7 +387,7 @@ allocate_unique_noinit(const A& alloc)
|
|||||||
}
|
}
|
||||||
|
|
||||||
template<class T, class A>
|
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
|
std::unique_ptr<T, alloc_deleter<T, A> > >::type
|
||||||
allocate_unique(const A& alloc, std::size_t size)
|
allocate_unique(const A& alloc, std::size_t size)
|
||||||
{
|
{
|
||||||
@@ -411,7 +410,7 @@ allocate_unique(const A& alloc)
|
|||||||
}
|
}
|
||||||
|
|
||||||
template<class T, class A>
|
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
|
std::unique_ptr<T, alloc_deleter<T, noinit_adaptor<A> > > >::type
|
||||||
allocate_unique_noinit(const A& alloc, std::size_t size)
|
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>
|
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
|
std::unique_ptr<T, alloc_deleter<T, A> > >::type
|
||||||
allocate_unique(const A& alloc, std::size_t size,
|
allocate_unique(const A& alloc, std::size_t size,
|
||||||
const typename std::remove_extent<T>::type& value)
|
const typename std::remove_extent<T>::type& value)
|
||||||
|
@@ -35,7 +35,7 @@ make_local_shared(const typename std::remove_extent<T>::type& value)
|
|||||||
}
|
}
|
||||||
|
|
||||||
template<class T>
|
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
|
local_shared_ptr<T> >::type
|
||||||
make_local_shared(std::size_t size)
|
make_local_shared(std::size_t size)
|
||||||
{
|
{
|
||||||
@@ -44,7 +44,7 @@ make_local_shared(std::size_t size)
|
|||||||
}
|
}
|
||||||
|
|
||||||
template<class T>
|
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
|
local_shared_ptr<T> >::type
|
||||||
make_local_shared(std::size_t size,
|
make_local_shared(std::size_t size,
|
||||||
const typename std::remove_extent<T>::type& value)
|
const typename std::remove_extent<T>::type& value)
|
||||||
@@ -63,7 +63,7 @@ make_local_shared_noinit()
|
|||||||
}
|
}
|
||||||
|
|
||||||
template<class T>
|
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
|
local_shared_ptr<T> >::type
|
||||||
make_local_shared_noinit(std::size_t size)
|
make_local_shared_noinit(std::size_t size)
|
||||||
{
|
{
|
||||||
|
@@ -32,7 +32,7 @@ make_shared(const typename std::remove_extent<T>::type& value)
|
|||||||
}
|
}
|
||||||
|
|
||||||
template<class T>
|
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)
|
make_shared(std::size_t size)
|
||||||
{
|
{
|
||||||
return boost::allocate_shared<T>(boost::default_allocator<typename
|
return boost::allocate_shared<T>(boost::default_allocator<typename
|
||||||
@@ -40,7 +40,7 @@ make_shared(std::size_t size)
|
|||||||
}
|
}
|
||||||
|
|
||||||
template<class T>
|
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)
|
make_shared(std::size_t size, 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
|
||||||
@@ -56,7 +56,7 @@ make_shared_noinit()
|
|||||||
}
|
}
|
||||||
|
|
||||||
template<class T>
|
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)
|
make_shared_noinit(std::size_t size)
|
||||||
{
|
{
|
||||||
return boost::allocate_shared_noinit<T>(boost::default_allocator<typename
|
return boost::allocate_shared_noinit<T>(boost::default_allocator<typename
|
||||||
|
@@ -8,10 +8,10 @@ Distributed under the Boost Software License, Version 1.0.
|
|||||||
#ifndef BOOST_SMART_PTR_MAKE_UNIQUE_HPP
|
#ifndef BOOST_SMART_PTR_MAKE_UNIQUE_HPP
|
||||||
#define 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 <memory>
|
||||||
#include <utility>
|
|
||||||
#include <type_traits>
|
#include <type_traits>
|
||||||
|
#include <utility>
|
||||||
|
|
||||||
namespace boost {
|
namespace boost {
|
||||||
|
|
||||||
@@ -44,7 +44,7 @@ make_unique_noinit()
|
|||||||
}
|
}
|
||||||
|
|
||||||
template<class T>
|
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
|
std::unique_ptr<T> >::type
|
||||||
make_unique(std::size_t size)
|
make_unique(std::size_t size)
|
||||||
{
|
{
|
||||||
@@ -52,7 +52,7 @@ make_unique(std::size_t size)
|
|||||||
}
|
}
|
||||||
|
|
||||||
template<class T>
|
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
|
std::unique_ptr<T> >::type
|
||||||
make_unique_noinit(std::size_t size)
|
make_unique_noinit(std::size_t size)
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user