use BOOST_NO_INT64_T to check wether "long long" traits should be tested.

[SVN r7783]
This commit is contained in:
Jens Maurer
2000-09-23 16:35:19 +00:00
parent 34f4037317
commit 70edfde847

View File

@ -20,14 +20,13 @@
#include <iostream> #include <iostream>
#include <cassert> #include <cassert>
#include <boost/integer_traits.hpp> #include <boost/integer_traits.hpp>
// use int64_t instead of long long for better portability
#include <boost/cstdint.hpp>
#ifdef NDEBUG #ifdef NDEBUG
#error This test relies on assert() and thus makes no sense with NDEBUG defined #error This test relies on assert() and thus makes no sense with NDEBUG defined
#endif #endif
// enable if you have "long long" and the proper macros in <limits.h>
#undef HAVE_LONG_LONG
/* /*
* General portability note: * General portability note:
@ -71,11 +70,9 @@ int main()
runtest("long", long()); runtest("long", long());
typedef unsigned long unsigned_long; typedef unsigned long unsigned_long;
runtest("unsigned long", unsigned_long()); runtest("unsigned long", unsigned_long());
#ifdef HAVE_LONG_LONG #ifndef BOOST_NO_INT64_T
typedef long long long_long; runtest("int64_t (possibly long long)", boost::int64_t());
runtest("long long", long_long()); runtest("uint64_t (possibly unsigned long long)", boost::uint64_t());
typedef unsigned long long unsigned_long_long;
runtest("unsigned long long", unsigned_long_long());
#endif #endif
// Some compilers don't pay attention to std:3.6.1/5 and issue a // Some compilers don't pay attention to std:3.6.1/5 and issue a
// warning here if "return 0;" is omitted. // warning here if "return 0;" is omitted.