Remove uses of boost::enable_if_

This commit is contained in:
Peter Dimov
2024-10-06 19:16:42 +03:00
parent 1361171bac
commit f2abcf1654
6 changed files with 44 additions and 43 deletions
@@ -10,11 +10,12 @@ Distributed under the Boost Software License, Version 1.0.
#include <boost/core/default_allocator.hpp>
#include <boost/smart_ptr/allocate_shared_array.hpp>
#include <type_traits>
namespace boost {
template<class T>
inline typename enable_if_<is_bounded_array<T>::value, shared_ptr<T> >::type
inline typename std::enable_if<is_bounded_array<T>::value, shared_ptr<T> >::type
make_shared()
{
return boost::allocate_shared<T>(boost::default_allocator<typename
@@ -22,7 +23,7 @@ make_shared()
}
template<class T>
inline typename enable_if_<is_bounded_array<T>::value, shared_ptr<T> >::type
inline typename std::enable_if<is_bounded_array<T>::value, shared_ptr<T> >::type
make_shared(const typename remove_extent<T>::type& value)
{
return boost::allocate_shared<T>(boost::default_allocator<typename
@@ -30,7 +31,7 @@ make_shared(const typename remove_extent<T>::type& value)
}
template<class T>
inline typename enable_if_<is_unbounded_array<T>::value, shared_ptr<T> >::type
inline typename std::enable_if<is_unbounded_array<T>::value, shared_ptr<T> >::type
make_shared(std::size_t size)
{
return boost::allocate_shared<T>(boost::default_allocator<typename
@@ -38,7 +39,7 @@ make_shared(std::size_t size)
}
template<class T>
inline typename enable_if_<is_unbounded_array<T>::value, shared_ptr<T> >::type
inline typename std::enable_if<is_unbounded_array<T>::value, shared_ptr<T> >::type
make_shared(std::size_t size, const typename remove_extent<T>::type& value)
{
return boost::allocate_shared<T>(boost::default_allocator<typename
@@ -46,7 +47,7 @@ make_shared(std::size_t size, const typename remove_extent<T>::type& value)
}
template<class T>
inline typename enable_if_<is_bounded_array<T>::value, shared_ptr<T> >::type
inline typename std::enable_if<is_bounded_array<T>::value, shared_ptr<T> >::type
make_shared_noinit()
{
return boost::allocate_shared_noinit<T>(boost::default_allocator<typename
@@ -54,7 +55,7 @@ make_shared_noinit()
}
template<class T>
inline typename enable_if_<is_unbounded_array<T>::value, shared_ptr<T> >::type
inline typename std::enable_if<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