Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-12-16 09:42:51

0001 /*
0002 Copyright 2015 Glen Joseph Fernandes
0003 (glenjofe@gmail.com)
0004 
0005 Distributed under the Boost Software License, Version 1.0.
0006 (http://www.boost.org/LICENSE_1_0.txt)
0007 */
0008 #ifndef BOOST_ALIGN_ALIGN_UP_HPP
0009 #define BOOST_ALIGN_ALIGN_UP_HPP
0010 
0011 #include <boost/align/detail/align_up.hpp>
0012 #include <boost/align/detail/not_pointer.hpp>
0013 
0014 namespace boost {
0015 namespace alignment {
0016 
0017 template<class T>
0018 BOOST_CONSTEXPR inline typename detail::not_pointer<T, T>::type
0019 align_up(T value, std::size_t alignment) BOOST_NOEXCEPT
0020 {
0021     return T((value + (T(alignment) - 1)) & ~T(alignment - 1));
0022 }
0023 
0024 } /* alignment */
0025 } /* boost */
0026 
0027 #endif