Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-08-17 08:39:05

0001 /* Copyright 2025 Joaquin M Lopez Munoz.
0002  * Distributed under the Boost Software License, Version 1.0.
0003  * (See accompanying file LICENSE_1_0.txt or copy at
0004  * http://www.boost.org/LICENSE_1_0.txt)
0005  *
0006  * See https://www.boost.org/libs/bloom for library home page.
0007  */
0008 
0009 #ifndef BOOST_BLOOM_DETAIL_CONSTEXPR_BIT_WIDTH_HPP
0010 #define BOOST_BLOOM_DETAIL_CONSTEXPR_BIT_WIDTH_HPP
0011 
0012 #include <cstddef>
0013 
0014 namespace boost{
0015 namespace bloom{
0016 namespace detail{
0017 
0018 /* boost::core::bit_width is not always C++11 constexpr */
0019 
0020 constexpr std::size_t constexpr_bit_width(std::size_t x) 
0021 {
0022   return x?1+constexpr_bit_width(x>>1):0;
0023 }
0024 
0025 } /* namespace detail */
0026 } /* namespace bloom */
0027 } /* namespace boost */
0028 #endif