More -Wconversion fixes for GCC 10 and below

This commit is contained in:
Peter Dimov
2023-05-31 19:54:43 +03:00
parent 266fbe6449
commit 7ab05d5de0
6 changed files with 8 additions and 8 deletions

View File

@@ -14,7 +14,7 @@
template<class T> void test_popcount( T x )
{
int k = 0;
for( T y = x; y; y &= y - 1, ++k );
for( T y = x; y; y = static_cast<T>( y & (y - 1) ), ++k );
BOOST_TEST_EQ( boost::core::popcount( x ), k ) || ( std::cerr << "x: " << +x << std::endl );
}