Remove uses of boost::alignment_of

This commit is contained in:
Peter Dimov
2024-10-06 18:57:30 +03:00
parent c5023afe04
commit 1361171bac
12 changed files with 146 additions and 146 deletions
@@ -12,7 +12,6 @@ Distributed under the Boost Software License, Version 1.0.
#include <boost/core/alloc_construct.hpp>
#include <boost/core/first_scalar.hpp>
#include <boost/smart_ptr/shared_ptr.hpp>
#include <boost/type_traits/alignment_of.hpp>
#include <boost/type_traits/enable_if.hpp>
#include <boost/type_traits/extent.hpp>
#include <boost/type_traits/is_bounded_array.hpp>
@@ -20,6 +19,7 @@ Distributed under the Boost Software License, Version 1.0.
#include <boost/type_traits/remove_cv.hpp>
#include <boost/type_traits/remove_extent.hpp>
#include <boost/type_traits/type_with_alignment.hpp>
#include <type_traits>
namespace boost {
namespace detail {
@@ -112,8 +112,8 @@ private:
template<class T, class U>
struct sp_array_alignment {
enum {
value = sp_max_size<boost::alignment_of<T>::value,
boost::alignment_of<U>::value>::value
value = sp_max_size<std::alignment_of<T>::value,
std::alignment_of<U>::value>::value
};
};
@@ -22,8 +22,8 @@
#include <boost/smart_ptr/detail/lightweight_mutex.hpp>
#include <boost/type_traits/type_with_alignment.hpp>
#include <boost/type_traits/alignment_of.hpp>
#include <type_traits>
#include <new> // ::operator new, ::operator delete
#include <cstddef> // std::size_t
@@ -74,7 +74,7 @@ template<unsigned size, unsigned align_> struct allocator_impl
static lightweight_mutex & mutex()
{
static freeblock< sizeof( lightweight_mutex ), boost::alignment_of< lightweight_mutex >::value > fbm;
static freeblock< sizeof( lightweight_mutex ), std::alignment_of< lightweight_mutex >::value > fbm;
static lightweight_mutex * pm = new( &fbm ) lightweight_mutex;
return *pm;
}
@@ -188,7 +188,7 @@ template<unsigned size, unsigned align_>
unsigned allocator_impl<size, align_>::last = allocator_impl<size, align_>::items_per_page;
template<class T>
struct quick_allocator: public allocator_impl< sizeof(T), boost::alignment_of<T>::value >
struct quick_allocator: public allocator_impl< sizeof(T), std::alignment_of<T>::value >
{
};
@@ -45,7 +45,7 @@ template<class T, class A> class lsp_ms_deleter: public local_counted_impl_em
{
private:
typedef typename sp_aligned_storage<sizeof(T), ::boost::alignment_of<T>::value>::type storage_type;
typedef typename sp_aligned_storage<sizeof(T), std::alignment_of<T>::value>::type storage_type;
storage_type storage_;
A a_;
@@ -13,11 +13,11 @@
#include <boost/smart_ptr/shared_ptr.hpp>
#include <boost/type_traits/type_with_alignment.hpp>
#include <boost/type_traits/alignment_of.hpp>
#include <boost/config.hpp>
#include <utility>
#include <cstddef>
#include <new>
#include <type_traits>
namespace boost
{
@@ -38,7 +38,7 @@ template< class T > class sp_ms_deleter
{
private:
typedef typename sp_aligned_storage< sizeof( T ), ::boost::alignment_of< T >::value >::type storage_type;
typedef typename sp_aligned_storage< sizeof( T ), std::alignment_of< T >::value >::type storage_type;
bool initialized_;
storage_type storage_;
@@ -109,7 +109,7 @@ template< class T, class A > class sp_as_deleter
{
private:
typedef typename sp_aligned_storage< sizeof( T ), ::boost::alignment_of< T >::value >::type storage_type;
typedef typename sp_aligned_storage< sizeof( T ), std::alignment_of< T >::value >::type storage_type;
storage_type storage_;
A a_;