
AMDG On 05/01/2012 05:25 PM, Scott Meyers wrote:
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
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?
Obviously this isn't going to work unless the compiler supports a 128-bit int. I suppose it would be better to cause a compile error if there isn't a sufficiently wide integer type. In Christ, Steven Watanabe