update boost on linux

This commit is contained in:
Bassem Girgis
2019-08-10 16:06:25 -05:00
parent 76ad52be58
commit 861b918727
5363 changed files with 483306 additions and 116507 deletions

View File

@@ -20,8 +20,8 @@ align(std::size_t alignment, std::size_t size, void*& ptr,
{
BOOST_ASSERT(detail::is_alignment(alignment));
if (size <= space) {
char* p = reinterpret_cast<char*>((reinterpret_cast<std::
size_t>(ptr) + alignment - 1) & ~(alignment - 1));
char* p = reinterpret_cast<char*>(~(alignment - 1) &
(reinterpret_cast<std::size_t>(ptr) + alignment - 1));
std::size_t n = space - (p - static_cast<char*>(ptr));
if (size <= n) {
ptr = p;

View File

@@ -18,8 +18,8 @@ inline void*
align_down(void* ptr, std::size_t alignment) BOOST_NOEXCEPT
{
BOOST_ASSERT(detail::is_alignment(alignment));
return reinterpret_cast<void*>(reinterpret_cast<std::
size_t>(ptr) & ~(alignment - 1));
return reinterpret_cast<void*>(~(alignment - 1) &
reinterpret_cast<std::size_t>(ptr));
}
} /* alignment */

View File

@@ -18,8 +18,8 @@ inline void*
align_up(void* ptr, std::size_t alignment) BOOST_NOEXCEPT
{
BOOST_ASSERT(detail::is_alignment(alignment));
return reinterpret_cast<void*>((reinterpret_cast<std::
size_t>(ptr) + alignment - 1) & ~(alignment - 1));
return reinterpret_cast<void*>(~(alignment - 1) &
(reinterpret_cast<std::size_t>(ptr) + alignment - 1));
}
} /* alignment */

View File

@@ -31,7 +31,7 @@ aligned_alloc(std::size_t alignment, std::size_t size) BOOST_NOEXCEPT
void* p = std::malloc(sizeof(void*) + n);
if (p) {
void* r = static_cast<char*>(p) + sizeof(void*);
(void)align(alignment, size, r, n);
(void)boost::alignment::align(alignment, size, r, n);
*(static_cast<void**>(r) - 1) = p;
p = r;
}

View File

@@ -23,8 +23,7 @@ struct offset_value {
template<class T>
struct alignment_of
: min_size<sizeof(T),
sizeof(offset_value<T>) - (sizeof(T) << 1)> { };
: min_size<sizeof(T), sizeof(offset_value<T>) - (sizeof(T) << 1)> { };
} /* detail */
} /* alignment */

View File

@@ -4,7 +4,6 @@ Copyright 2014 Glen Joseph Fernandes
Distributed under the Boost Software License, Version 1.0.
(http://www.boost.org/LICENSE_1_0.txt)
*/
#ifndef BOOST_ALIGN_DETAIL_IS_ALIGNMENT_HPP
#define BOOST_ALIGN_DETAIL_IS_ALIGNMENT_HPP