update boost
This commit is contained in:
@@ -9,14 +9,16 @@ Distributed under the Boost Software License, Version 1.0.
|
||||
#define BOOST_ALIGN_ALIGN_UP_HPP
|
||||
|
||||
#include <boost/align/detail/align_up.hpp>
|
||||
#include <boost/align/detail/not_pointer.hpp>
|
||||
|
||||
namespace boost {
|
||||
namespace alignment {
|
||||
|
||||
BOOST_CONSTEXPR inline std::size_t
|
||||
align_up(std::size_t value, std::size_t alignment) BOOST_NOEXCEPT
|
||||
template<class T>
|
||||
BOOST_CONSTEXPR inline typename detail::not_pointer<T, T>::type
|
||||
align_up(T value, std::size_t alignment) BOOST_NOEXCEPT
|
||||
{
|
||||
return (value + alignment - 1) & ~(alignment - 1);
|
||||
return T((value + (T(alignment) - 1)) & ~T(alignment - 1));
|
||||
}
|
||||
|
||||
} /* alignment */
|
||||
|
||||
Reference in New Issue
Block a user