Remove use of boost::remove_const

This commit is contained in:
Peter Dimov
2024-10-06 19:19:48 +03:00
parent f2abcf1654
commit 7c87ae7985

View File

@ -13,8 +13,8 @@
#include <boost/smart_ptr/local_shared_ptr.hpp> #include <boost/smart_ptr/local_shared_ptr.hpp>
#include <boost/smart_ptr/make_shared.hpp> #include <boost/smart_ptr/make_shared.hpp>
#include <boost/type_traits/remove_const.hpp>
#include <boost/config.hpp> #include <boost/config.hpp>
#include <type_traits>
#include <utility> #include <utility>
#include <cstddef> #include <cstddef>
@ -155,13 +155,13 @@ template<class T, class A> typename boost::detail::lsp_if_not_array<T>::type all
template<class T, class... Args> typename boost::detail::lsp_if_not_array<T>::type make_local_shared( Args&&... args ) template<class T, class... Args> typename boost::detail::lsp_if_not_array<T>::type make_local_shared( Args&&... args )
{ {
typedef typename boost::remove_const<T>::type T2; typedef typename std::remove_const<T>::type T2;
return boost::allocate_local_shared<T2>( std::allocator<T2>(), std::forward<Args>(args)... ); return boost::allocate_local_shared<T2>( std::allocator<T2>(), std::forward<Args>(args)... );
} }
template<class T> typename boost::detail::lsp_if_not_array<T>::type make_local_shared_noinit() template<class T> typename boost::detail::lsp_if_not_array<T>::type make_local_shared_noinit()
{ {
typedef typename boost::remove_const<T>::type T2; typedef typename std::remove_const<T>::type T2;
return boost::allocate_shared_noinit<T2>( std::allocator<T2>() ); return boost::allocate_shared_noinit<T2>( std::allocator<T2>() );
} }