[integer] Bug in int_t<65>

Hi, I was trying to instantiate a boost::int_t<65>::least and I didn't got an error. Unfortunately the size of the obtained type was 8. I think that there is an error in the meta-function class as there is a comparison without and with the sign bit in // ** template< int Bits > // bits (including sign) required struct int_t : public detail::exact_signed_base_helper<Bits> { typedef typename detail::int_least_helper < #ifdef BOOST_HAS_LONG_LONG (Bits-1 <= (int)(sizeof(boost::long_long_type) * CHAR_BIT)) + // ** #else 1 + #endif The same applies to uint_t. The fix of course consists in checking (Bits <= (int)(sizeof(boost::long_long_type) * CHAR_BIT)) + // ** Please could this be fixed in trunk? Best, Vicente

I was trying to instantiate a boost::int_t<65>::least and I didn't got an error. Unfortunately the size of the obtained type was 8.
I think that there is an error in the meta-function class as there is a comparison without and with the sign bit in // **
Please could this be fixed in trunk?
Confirmed, and I agree with you. Fixed in Trunk. HTH, John.
participants (2)
-
John Maddock
-
Vicente J. Botet Escriba