Hi me22!!! :-) Scott McMurray (aka me22) wrote about boost::int_t<Bits>:
The implementation is quite ingenious, actually. On a proverbial toaster with 42-bit everything, a request for int_t<39>::least would give a signed char, the "smallest" type.
I agree about it being quite ingenious. And I like the fact that it supports 42-bit-everything-systems. But still, personally I'd rather have it support all kinds of 64-bits platforms...
Does Boost support ILP64 platforms? If so, I guess int_t<32>::least should select _int32, instead of int, on such a platform!
The current implementation deals only in standard C++98 types.
And should it stay that way?
Now I remember someone already already come up with a patch?
You can still find the patch in the mailing list archives: http://lists.boost.org/Archives/boost/2006/06/106262.php
I like your int_exact_t<Bits>::exact, Scott! It could really be of
help, for my own Boost-based project. Still I don't like the fact that
it will fail to get me a 32-bits integer (_int32) on an ILP64 platform.
Why not having int_exact_t entirely based on the exact-width integer
types from