From e10f6cab4335c53cfcef1181d134e4c7091952d4 Mon Sep 17 00:00:00 2001 From: John Maddock Date: Mon, 21 Jan 2008 18:11:09 +0000 Subject: [PATCH] Updated type traits library so that everything compiles with -Wall -pedantic with GCC. [SVN r42899] --- include/boost/type_traits/make_signed.hpp | 4 ++-- include/boost/type_traits/make_unsigned.hpp | 4 ++-- test/is_convertible_test.cpp | 6 +++--- test/make_signed_test.cpp | 16 ++++++++-------- test/make_unsigned_test.cpp | 16 ++++++++-------- 5 files changed, 23 insertions(+), 23 deletions(-) diff --git a/include/boost/type_traits/make_signed.hpp b/include/boost/type_traits/make_signed.hpp index a44a640..51cfd95 100644 --- a/include/boost/type_traits/make_signed.hpp +++ b/include/boost/type_traits/make_signed.hpp @@ -72,7 +72,7 @@ struct make_signed_imp is_same, long, #if defined(BOOST_HAS_LONG_LONG) - long long + boost::long_long_type #elif defined(BOOST_HAS_MS_INT64) __int64 #else @@ -96,7 +96,7 @@ struct make_signed_imp sizeof(t_no_cv) == sizeof(unsigned long), long, #if defined(BOOST_HAS_LONG_LONG) - long long + boost::long_long_type #elif defined(BOOST_HAS_MS_INT64) __int64 #else diff --git a/include/boost/type_traits/make_unsigned.hpp b/include/boost/type_traits/make_unsigned.hpp index 5695c7f..54f9f66 100644 --- a/include/boost/type_traits/make_unsigned.hpp +++ b/include/boost/type_traits/make_unsigned.hpp @@ -72,7 +72,7 @@ struct make_unsigned_imp is_same, unsigned long, #if defined(BOOST_HAS_LONG_LONG) - unsigned long long + boost::ulong_long_type #elif defined(BOOST_HAS_MS_INT64) unsigned __int64 #else @@ -96,7 +96,7 @@ struct make_unsigned_imp sizeof(t_no_cv) == sizeof(unsigned long), unsigned long, #if defined(BOOST_HAS_LONG_LONG) - unsigned long long + boost::ulong_long_type #elif defined(BOOST_HAS_MS_INT64) unsigned __int64 #else diff --git a/test/is_convertible_test.cpp b/test/is_convertible_test.cpp index d181cb5..ece3079 100644 --- a/test/is_convertible_test.cpp +++ b/test/is_convertible_test.cpp @@ -125,9 +125,9 @@ BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_convertible::value), true) BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_convertible::value), true); BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_convertible::value), true); #ifdef BOOST_HAS_LONG_LONG -BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_convertible::value), true); -BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_convertible::value), true); -BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_convertible::value), true); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_convertible::value), true); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_convertible::value), true); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_convertible::value), true); #elif defined(BOOST_HAS_MS_INT64) BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_convertible<__int64,int>::value), true); BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_convertible<__int64,char>::value), true); diff --git a/test/make_signed_test.cpp b/test/make_signed_test.cpp index b76852f..af08bd5 100644 --- a/test/make_signed_test.cpp +++ b/test/make_signed_test.cpp @@ -20,7 +20,7 @@ BOOST_CHECK_TYPE(::tt::make_signed::type, short); BOOST_CHECK_TYPE(::tt::make_signed::type, int); BOOST_CHECK_TYPE(::tt::make_signed::type, long); #ifdef BOOST_HAS_LONG_LONG -BOOST_CHECK_TYPE(::tt::make_signed::type, long long); +BOOST_CHECK_TYPE(::tt::make_signed::type, boost::long_long_type); #elif defined(BOOST_HAS_MS_INT64) BOOST_CHECK_TYPE(::tt::make_signed<__int64>::type, __int64); #endif @@ -30,7 +30,7 @@ BOOST_CHECK_TYPE(::tt::make_signed::type, const short); BOOST_CHECK_TYPE(::tt::make_signed::type, const int); BOOST_CHECK_TYPE(::tt::make_signed::type, const long); #ifdef BOOST_HAS_LONG_LONG -BOOST_CHECK_TYPE(::tt::make_signed::type, const long long); +BOOST_CHECK_TYPE(::tt::make_signed::type, const boost::long_long_type); #elif defined(BOOST_HAS_MS_INT64) BOOST_CHECK_TYPE(::tt::make_signed::type, const __int64); #endif @@ -40,7 +40,7 @@ BOOST_CHECK_TYPE(::tt::make_signed::type, volatile short); BOOST_CHECK_TYPE(::tt::make_signed::type, volatile int); BOOST_CHECK_TYPE(::tt::make_signed::type, volatile long); #ifdef BOOST_HAS_LONG_LONG -BOOST_CHECK_TYPE(::tt::make_signed::type, volatile long long); +BOOST_CHECK_TYPE(::tt::make_signed::type, volatile boost::long_long_type); #elif defined(BOOST_HAS_MS_INT64) BOOST_CHECK_TYPE(::tt::make_signed::type, volatile __int64); #endif @@ -50,7 +50,7 @@ BOOST_CHECK_TYPE(::tt::make_signed::type, const volatile s BOOST_CHECK_TYPE(::tt::make_signed::type, const volatile int); BOOST_CHECK_TYPE(::tt::make_signed::type, const volatile long); #ifdef BOOST_HAS_LONG_LONG -BOOST_CHECK_TYPE(::tt::make_signed::type, const volatile long long); +BOOST_CHECK_TYPE(::tt::make_signed::type, const volatile boost::long_long_type); #elif defined(BOOST_HAS_MS_INT64) BOOST_CHECK_TYPE(::tt::make_signed::type, const volatile __int64); #endif @@ -61,7 +61,7 @@ BOOST_CHECK_TYPE(::tt::make_signed::type, short); BOOST_CHECK_TYPE(::tt::make_signed::type, int); BOOST_CHECK_TYPE(::tt::make_signed::type, long); #ifdef BOOST_HAS_LONG_LONG -BOOST_CHECK_TYPE(::tt::make_signed::type, long long); +BOOST_CHECK_TYPE(::tt::make_signed::type, boost::long_long_type); #elif defined(BOOST_HAS_MS_INT64) BOOST_CHECK_TYPE(::tt::make_signed::type, __int64); #endif @@ -71,7 +71,7 @@ BOOST_CHECK_TYPE(::tt::make_signed::type, const short); BOOST_CHECK_TYPE(::tt::make_signed::type, const int); BOOST_CHECK_TYPE(::tt::make_signed::type, const long); #ifdef BOOST_HAS_LONG_LONG -BOOST_CHECK_TYPE(::tt::make_signed::type, const long long); +BOOST_CHECK_TYPE(::tt::make_signed::type, const boost::long_long_type); #elif defined(BOOST_HAS_MS_INT64) BOOST_CHECK_TYPE(::tt::make_signed::type, const __int64); #endif @@ -81,7 +81,7 @@ BOOST_CHECK_TYPE(::tt::make_signed::type, volatile shor BOOST_CHECK_TYPE(::tt::make_signed::type, volatile int); BOOST_CHECK_TYPE(::tt::make_signed::type, volatile long); #ifdef BOOST_HAS_LONG_LONG -BOOST_CHECK_TYPE(::tt::make_signed::type, volatile long long); +BOOST_CHECK_TYPE(::tt::make_signed::type, volatile boost::long_long_type); #elif defined(BOOST_HAS_MS_INT64) BOOST_CHECK_TYPE(::tt::make_signed::type, volatile __int64); #endif @@ -91,7 +91,7 @@ BOOST_CHECK_TYPE(::tt::make_signed::type, const v BOOST_CHECK_TYPE(::tt::make_signed::type, const volatile int); BOOST_CHECK_TYPE(::tt::make_signed::type, const volatile long); #ifdef BOOST_HAS_LONG_LONG -BOOST_CHECK_TYPE(::tt::make_signed::type, const volatile long long); +BOOST_CHECK_TYPE(::tt::make_signed::type, const volatile boost::long_long_type); #elif defined(BOOST_HAS_MS_INT64) BOOST_CHECK_TYPE(::tt::make_signed::type, const volatile __int64); #endif diff --git a/test/make_unsigned_test.cpp b/test/make_unsigned_test.cpp index 548828e..2ffe1b9 100644 --- a/test/make_unsigned_test.cpp +++ b/test/make_unsigned_test.cpp @@ -20,7 +20,7 @@ BOOST_CHECK_TYPE(::tt::make_unsigned::type, unsigned short); BOOST_CHECK_TYPE(::tt::make_unsigned::type, unsigned int); BOOST_CHECK_TYPE(::tt::make_unsigned::type, unsigned long); #ifdef BOOST_HAS_LONG_LONG -BOOST_CHECK_TYPE(::tt::make_unsigned::type, unsigned long long); +BOOST_CHECK_TYPE(::tt::make_unsigned::type, boost::ulong_long_type); #elif defined(BOOST_HAS_MS_INT64) BOOST_CHECK_TYPE(::tt::make_unsigned<__int64>::type, unsigned __int64); #endif @@ -30,7 +30,7 @@ BOOST_CHECK_TYPE(::tt::make_unsigned::type, const unsigned short); BOOST_CHECK_TYPE(::tt::make_unsigned::type, const unsigned int); BOOST_CHECK_TYPE(::tt::make_unsigned::type, const unsigned long); #ifdef BOOST_HAS_LONG_LONG -BOOST_CHECK_TYPE(::tt::make_unsigned::type, const unsigned long long); +BOOST_CHECK_TYPE(::tt::make_unsigned::type, const boost::ulong_long_type); #elif defined(BOOST_HAS_MS_INT64) BOOST_CHECK_TYPE(::tt::make_unsigned::type, const unsigned __int64); #endif @@ -40,7 +40,7 @@ BOOST_CHECK_TYPE(::tt::make_unsigned::type, volatile unsigned sh BOOST_CHECK_TYPE(::tt::make_unsigned::type, volatile unsigned int); BOOST_CHECK_TYPE(::tt::make_unsigned::type, volatile unsigned long); #ifdef BOOST_HAS_LONG_LONG -BOOST_CHECK_TYPE(::tt::make_unsigned::type, volatile unsigned long long); +BOOST_CHECK_TYPE(::tt::make_unsigned::type, volatile boost::ulong_long_type); #elif defined(BOOST_HAS_MS_INT64) BOOST_CHECK_TYPE(::tt::make_unsigned::type, volatile unsigned __int64); #endif @@ -50,7 +50,7 @@ BOOST_CHECK_TYPE(::tt::make_unsigned::type, const volatile BOOST_CHECK_TYPE(::tt::make_unsigned::type, const volatile unsigned int); BOOST_CHECK_TYPE(::tt::make_unsigned::type, const volatile unsigned long); #ifdef BOOST_HAS_LONG_LONG -BOOST_CHECK_TYPE(::tt::make_unsigned::type, const volatile unsigned long long); +BOOST_CHECK_TYPE(::tt::make_unsigned::type, const volatile boost::ulong_long_type); #elif defined(BOOST_HAS_MS_INT64) BOOST_CHECK_TYPE(::tt::make_unsigned::type, const volatile unsigned __int64); #endif @@ -61,7 +61,7 @@ BOOST_CHECK_TYPE(::tt::make_unsigned::type, unsigned short); BOOST_CHECK_TYPE(::tt::make_unsigned::type, unsigned int); BOOST_CHECK_TYPE(::tt::make_unsigned::type, unsigned long); #ifdef BOOST_HAS_LONG_LONG -BOOST_CHECK_TYPE(::tt::make_unsigned::type, unsigned long long); +BOOST_CHECK_TYPE(::tt::make_unsigned::type, boost::ulong_long_type); #elif defined(BOOST_HAS_MS_INT64) BOOST_CHECK_TYPE(::tt::make_unsigned::type, unsigned __int64); #endif @@ -71,7 +71,7 @@ BOOST_CHECK_TYPE(::tt::make_unsigned::type, const unsigned BOOST_CHECK_TYPE(::tt::make_unsigned::type, const unsigned int); BOOST_CHECK_TYPE(::tt::make_unsigned::type, const unsigned long); #ifdef BOOST_HAS_LONG_LONG -BOOST_CHECK_TYPE(::tt::make_unsigned::type, const unsigned long long); +BOOST_CHECK_TYPE(::tt::make_unsigned::type, const boost::ulong_long_type); #elif defined(BOOST_HAS_MS_INT64) BOOST_CHECK_TYPE(::tt::make_unsigned::type, const unsigned __int64); #endif @@ -81,7 +81,7 @@ BOOST_CHECK_TYPE(::tt::make_unsigned::type, volatile un BOOST_CHECK_TYPE(::tt::make_unsigned::type, volatile unsigned int); BOOST_CHECK_TYPE(::tt::make_unsigned::type, volatile unsigned long); #ifdef BOOST_HAS_LONG_LONG -BOOST_CHECK_TYPE(::tt::make_unsigned::type, volatile unsigned long long); +BOOST_CHECK_TYPE(::tt::make_unsigned::type, volatile boost::ulong_long_type); #elif defined(BOOST_HAS_MS_INT64) BOOST_CHECK_TYPE(::tt::make_unsigned::type, volatile unsigned __int64); #endif @@ -91,7 +91,7 @@ BOOST_CHECK_TYPE(::tt::make_unsigned::type, const BOOST_CHECK_TYPE(::tt::make_unsigned::type, const volatile unsigned int); BOOST_CHECK_TYPE(::tt::make_unsigned::type, const volatile unsigned long); #ifdef BOOST_HAS_LONG_LONG -BOOST_CHECK_TYPE(::tt::make_unsigned::type, const volatile unsigned long long); +BOOST_CHECK_TYPE(::tt::make_unsigned::type, const volatile boost::ulong_long_type); #elif defined(BOOST_HAS_MS_INT64) BOOST_CHECK_TYPE(::tt::make_unsigned::type, const volatile unsigned __int64); #endif