]> git.proxmox.com Git - ceph.git/blob - ceph/src/boost/boost/align/detail/is_alignment.hpp
update sources to v12.2.3
[ceph.git] / ceph / src / boost / boost / align / detail / is_alignment.hpp
1 /*
2 Copyright 2014 Glen Joseph Fernandes
3 (glenjofe@gmail.com)
4
5 Distributed under the Boost Software License, Version 1.0.
6 (http://www.boost.org/LICENSE_1_0.txt)
7 */
8 #ifndef BOOST_ALIGN_DETAIL_IS_ALIGNMENT_HPP
9 #define BOOST_ALIGN_DETAIL_IS_ALIGNMENT_HPP
10
11 #include <boost/config.hpp>
12 #include <cstddef>
13
14 namespace boost {
15 namespace alignment {
16 namespace detail {
17
18 BOOST_CONSTEXPR inline bool
19 is_alignment(std::size_t value) BOOST_NOEXCEPT
20 {
21 return (value > 0) && ((value & (value - 1)) == 0);
22 }
23
24 } /* detail */
25 } /* alignment */
26 } /* boost */
27
28 #endif