Boost logo

Boost :

From: Beman Dawes (beman_at_[hidden])
Date: 2000-02-21 16:10:31


At 10:34 PM 2/20/00 +0100, Jens Maurer wrote:

>I have created a new directory integer_traits in the egroups
docvault
>and put header file, test program, and documentation there.
>
>I hope that's what the consensus was back in August.
>
>Please test with your set of compilers.

Thanks, Jens!

I will wait a day or two to see if there are other comments, but it
looks good to me.

A couple of nits in integer_traits_test.cpp:

* Add "return 0;"

* Probably be a good idea to add something to the effect:

     #ifdef NDEBUG
     #error This test makes no sense with NDEBUG defined
     #endif

* Changed the first couple of lines of runtest to:

  typedef boost::integer_traits<T> traits;
  std::cout << "Checking " << type
            << "; min is " << traits::min()
            << ", max is " << traits::max() << std::endl;

integer_traits_test.cpp compiled and ran correctly with Metrowerks
Codewarrior 5.3.

But look at the results from Microsoft VC++ 6.0 SP3:

Checking bool; min is 0, max is 4294967295
Checking char; min is 0, max is 4294967295
Checking signed char; min is 0, max is 4294967295
Checking unsigned char; min is 0, max is 4294967295
Checking short; min is 0, max is 4294967295
Checking unsigned short; min is 0, max is 4294967295
Checking int; min is 0, max is 4294967295
Checking unsigned int; min is 0, max is 4294967295
Checking long; min is 0, max is 4294967295
Checking unsigned long; min is 0, max is 4294967295

Damn. Microsofted again. The compiler reported no errors or
warnings.

--Beman


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk