From 08f30ea46c3caf2eef47b90bc85d2dc7e83aebdd Mon Sep 17 00:00:00 2001 From: Jens Maurer Date: Thu, 20 Sep 2001 19:24:34 +0000 Subject: [PATCH] moved check, because different unsigned types may have different representations for -1 (e.g. (unsigned char)-1 and (unsigned int)-1) [SVN r11174] --- cstdint_test.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/cstdint_test.cpp b/cstdint_test.cpp index 8fee58f..eb88c32 100644 --- a/cstdint_test.cpp +++ b/cstdint_test.cpp @@ -99,6 +99,8 @@ void integral_constant_type_check(T1, T2) // numeric_limits implementations currently // vary too much, or are incomplete or missing. // + T1 t1 = -1; + T2 t2 = -1; #if defined(BOOST_HAS_STDINT_H) // if we have a native stdint.h // then the INTXX_C macros may define @@ -106,10 +108,8 @@ void integral_constant_type_check(T1, T2) assert(sizeof(T1) <= sizeof(T2)); #else assert(sizeof(T1) == sizeof(T2)); -#endif - T1 t1 = -1; - T2 t2 = -1; assert(t1 == t2); +#endif if(t1 >= 0) assert(t2 >= 0); else