forked from boostorg/smart_ptr
Use boost::noinit_adapt free function
This commit is contained in:
@ -172,7 +172,7 @@ inline typename enable_if_<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)
|
||||||
{
|
{
|
||||||
return boost::allocate_local_shared<T>(boost::noinit_adaptor<A>(allocator),
|
return boost::allocate_local_shared<T>(boost::noinit_adapt(allocator),
|
||||||
count);
|
count);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -181,8 +181,7 @@ inline typename enable_if_<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)
|
||||||
{
|
{
|
||||||
return boost::allocate_local_shared<T>(boost::
|
return boost::allocate_local_shared<T>(boost::noinit_adapt(allocator));
|
||||||
noinit_adaptor<A>(allocator));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
} /* boost */
|
} /* boost */
|
||||||
|
@ -457,15 +457,14 @@ template<class T, class A>
|
|||||||
inline typename enable_if_<is_unbounded_array<T>::value, shared_ptr<T> >::type
|
inline typename enable_if_<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_adaptor<A>(allocator),
|
return boost::allocate_shared<T>(boost::noinit_adapt(allocator), count);
|
||||||
count);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
template<class T, class A>
|
template<class T, class A>
|
||||||
inline typename enable_if_<is_bounded_array<T>::value, shared_ptr<T> >::type
|
inline typename enable_if_<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_adaptor<A>(allocator));
|
return boost::allocate_shared<T>(boost::noinit_adapt(allocator));
|
||||||
}
|
}
|
||||||
|
|
||||||
} /* boost */
|
} /* boost */
|
||||||
|
Reference in New Issue
Block a user