Boost logo

Boost Users :

Subject: [Boost-users] [Boost.Integer] On Win32, boost::uint_t<65>::fast has 64 bits?
From: Scott Meyers (NeverRead_at_[hidden])
Date: 2012-05-01 20:25:50


The type yielded by boost::uint_t<N>::fast seems pretty clear: "The
easiest-to-manipulate, built-in, unsigned integral type with at least N
bits."

But when I run the following program, which prints the number of bits in
the type returned by boost::uint_t<65>::fast (i.e., a type with at least
65 bits), I get 64.

#include <iostream>
#include <climits>
#include <boost/integer.hpp>

int main()
{
   std::cout << "boost::uint_t<65>::fast has "
             << CHAR_BIT * sizeof(boost::uint_t<65>::fast)
             << " bits\n";
}

I get the same results with VC10, VC11 beta, and gcc 4.7 on Win32 with
Boost 1.49. I must be doing something wrong, right? But what?

Thanks,

Scott


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net