123456789101112131415161718192021222324252627282930313233343536373839 |
- #ifndef BOOST_LOWEST_BIT_HPP_GP_20030301
- #define BOOST_LOWEST_BIT_HPP_GP_20030301
- #include "boost/integer/integer_log2.hpp"
- #include "boost/assert.hpp"
- namespace boost {
- namespace detail {
- template <typename T>
- int lowest_bit(T x) {
- BOOST_ASSERT(x >= 1);
-
-
-
- return boost::integer_log2<T>( x - ( x & (x-1) ) );
- }
- }
- }
- #endif
|