Boost logo

Boost :

From: Kevin S. Van Horn (Kevin.VanHorn_at_[hidden])
Date: 2002-11-11 09:59:52

I have found that


gives a compiler error even on a platform (RH 7.3 on Intel) that has
64-bit integers available (as long long). On checking the documentation
again, it does specify this behavior, but this strikes me as quite
unreasonable; if a platform has long long, I should be able to use it.

I believe that all that is needed to fix this is inclusion of the
following lines:

  template <> struct int_least_helper<0>
  { typedef long long least; };

  template <> struct int_least_helper<5>
  { typedef unsigned long long least; };

Also, I'd like to see the following added to <boost/integer.hpp>:

boost::signed_int<T>::type -- Gives the signed integer type of the same
                               size as integer type T.
boost::unsigned_int<T>::type -- Gives the unsigned integer type of the
                               same size as integer type T.

Rationale: I often find myself using
for quantities that are guaranteed to be nonnegative; for these I would
prefer to use an unsigned type.

Boost list run by bdawes at, gregod at, cpdaniel at, john at