mirror of
https://github.com/boostorg/core.git
synced 2025-11-29 22:00:17 +01:00
More -Wconversion fixes for GCC 10 and below
This commit is contained in:
@@ -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 );
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user