Boost logo

Boost :

Subject: Re: [boost] [integer][type_traits] invaid values for integer_traits<boost::intmax_t>
From: Steven Watanabe (watanabesj_at_[hidden])
Date: 2011-02-12 10:10:47


On 2/12/2011 5:15 AM, Vicente Botet wrote:
> <snip>
> boost::integral_constant<boost::intmax_t,boost::integer_traits<boost::intmax_t>::const_min>,
> boost::integral_constant<boost::intmax_t,boost::integer_traits<boost::intmax_t>::const_max>
> ));
> <snip>
> error: no matching function for call to
> 'assertion_failed(mpl_::failed************
> (BOOST_RATIO_OVERFLOW_IN_MUL::************)(boost::integral_constant<long
> long int, 128ll>, boost::integral_constant<long long int, -0x000000081ll>))'
> As you can see the const_min and cont_max values are not correct in the last
> case.
> I was wondering if the<climits> file must be included by
> <boost/integer_traits.hpp> or<boost/cstdint.hpp>. Comments?

It already #includes limits.h.
This should be fixed in the trunk.
(integer_traits was assuming that sizeof(long long)
was the number of bits in a long long. I changed
it to sizeof(long long) * CHAR_BIT)

In Christ,
Steven Watanabe

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