]>
Commit | Line | Data |
---|---|---|
7c673cae FG |
1 | /* |
2 | (c) 2014 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_DETAIL_IS_ALIGNED_HPP | |
10 | #define BOOST_ALIGN_DETAIL_IS_ALIGNED_HPP | |
11 | ||
12 | #include <boost/align/detail/is_alignment.hpp> | |
13 | #include <boost/align/is_aligned_forward.hpp> | |
14 | #include <boost/assert.hpp> | |
15 | ||
16 | namespace boost { | |
17 | namespace alignment { | |
18 | ||
19 | inline bool is_aligned(const void* ptr, std::size_t alignment) | |
20 | BOOST_NOEXCEPT | |
21 | { | |
22 | BOOST_ASSERT(detail::is_alignment(alignment)); | |
23 | return is_aligned((std::size_t)ptr, alignment); | |
24 | } | |
25 | ||
26 | inline bool is_aligned(std::size_t alignment, const void* ptr) | |
27 | BOOST_NOEXCEPT | |
28 | { | |
29 | BOOST_ASSERT(detail::is_alignment(alignment)); | |
30 | return is_aligned((std::size_t)ptr, alignment); | |
31 | } | |
32 | ||
33 | } /* .alignment */ | |
34 | } /* .boost */ | |
35 | ||
36 | #endif |