]>
Commit | Line | Data |
---|---|---|
7c673cae FG |
1 | /* |
2 | (c) 2015 Glen Joseph Fernandes | |
3 | <glenjofe -at- gmail.com> | |
4 | ||
5 | Distributed under the Boost Software | |
6 | License, Version 1.0. | |
7 | http://boost.org/LICENSE_1_0.txt | |
8 | */ | |
9 | #ifndef BOOST_ALIGN_ALIGN_UP_HPP | |
10 | #define BOOST_ALIGN_ALIGN_UP_HPP | |
11 | ||
12 | #include <boost/align/detail/align_up.hpp> | |
13 | #include <boost/align/align_up_forward.hpp> | |
14 | ||
15 | namespace boost { | |
16 | namespace alignment { | |
17 | ||
18 | BOOST_CONSTEXPR inline std::size_t align_up(std::size_t value, | |
19 | std::size_t alignment) BOOST_NOEXCEPT | |
20 | { | |
21 | return (value + alignment - 1) & ~(alignment - 1); | |
22 | } | |
23 | ||
24 | } /* .alignment */ | |
25 | } /* .boost */ | |
26 | ||
27 | #endif |