Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions include/boost/core/bit.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -703,7 +703,7 @@ BOOST_CXX14_CONSTEXPR inline boost::uint32_t bit_ceil_impl( boost::uint32_t x )
{
if( x == 0 )
{
return 0;
return 1;
}

--x;
Expand All @@ -723,7 +723,7 @@ BOOST_CXX14_CONSTEXPR inline boost::uint64_t bit_ceil_impl( boost::uint64_t x )
{
if( x == 0 )
{
return 0;
return 1;
}

--x;
Expand Down
2 changes: 1 addition & 1 deletion test/bit_ceil_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ template<class T> void test_bit_ceil( T x )

if( x == 0 )
{
BOOST_TEST_EQ( y, 0 );
BOOST_TEST_EQ( y, 1 );
}
else
{
Expand Down
Loading