Statistics
| Revision:

root / tmp / org.txm.statsengine.r.core.win32 / res / win32 / library / BH / include / boost / align / detail / is_alignment.hpp @ 2486

History | View | Annotate | Download (551 Bytes)

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_ALIGNMENT_HPP
10
#define BOOST_ALIGN_DETAIL_IS_ALIGNMENT_HPP
11

    
12
#include <boost/config.hpp>
13
#include <cstddef>
14

    
15
namespace boost {
16
namespace alignment {
17
namespace detail {
18

    
19
BOOST_CONSTEXPR inline bool is_alignment(std::size_t value)
20
    BOOST_NOEXCEPT
21
{
22
    return (value > 0) && ((value & (value - 1)) == 0);
23
}
24

    
25
} /* .detail */
26
} /* .alignment */
27
} /* .boost */
28

    
29
#endif