mirror of
https://github.com/boostorg/integer.git
synced 2025-08-01 05:34:26 +02:00
Fix signed/unsigned comparison warnings when char is unsigned.
[SVN r63496]
This commit is contained in:
committed by
Peter Dimov
parent
d38557f5f3
commit
ce4bd6cc98
@@ -19,6 +19,7 @@
|
|||||||
|
|
||||||
#include <boost/config.hpp> // for BOOST_NESTED_TEMPLATE, etc.
|
#include <boost/config.hpp> // for BOOST_NESTED_TEMPLATE, etc.
|
||||||
#include <boost/limits.hpp> // for std::numeric_limits
|
#include <boost/limits.hpp> // for std::numeric_limits
|
||||||
|
#include <climits> // for CHAR_MIN
|
||||||
#include <boost/detail/workaround.hpp>
|
#include <boost/detail/workaround.hpp>
|
||||||
|
|
||||||
|
|
||||||
@@ -312,6 +313,10 @@ namespace detail
|
|||||||
BOOST_PRIVATE_GCD_UF( unsigned __int64 );
|
BOOST_PRIVATE_GCD_UF( unsigned __int64 );
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if CHAR_MIN == 0
|
||||||
|
BOOST_PRIVATE_GCD_UF( char ); // char is unsigned
|
||||||
|
#endif
|
||||||
|
|
||||||
#undef BOOST_PRIVATE_GCD_UF
|
#undef BOOST_PRIVATE_GCD_UF
|
||||||
|
|
||||||
#define BOOST_PRIVATE_GCD_SF( St, Ut ) \
|
#define BOOST_PRIVATE_GCD_SF( St, Ut ) \
|
||||||
@@ -326,7 +331,9 @@ namespace detail
|
|||||||
BOOST_PRIVATE_GCD_SF( int, unsigned );
|
BOOST_PRIVATE_GCD_SF( int, unsigned );
|
||||||
BOOST_PRIVATE_GCD_SF( long, unsigned long );
|
BOOST_PRIVATE_GCD_SF( long, unsigned long );
|
||||||
|
|
||||||
BOOST_PRIVATE_GCD_SF( char, unsigned char ); // should work even if unsigned
|
#if CHAR_MIN < 0
|
||||||
|
BOOST_PRIVATE_GCD_SF( char, unsigned char ); // char is signed
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef BOOST_HAS_LONG_LONG
|
#ifdef BOOST_HAS_LONG_LONG
|
||||||
BOOST_PRIVATE_GCD_SF( boost::long_long_type, boost::ulong_long_type );
|
BOOST_PRIVATE_GCD_SF( boost::long_long_type, boost::ulong_long_type );
|
||||||
|
Reference in New Issue
Block a user