|
Boost : |
Subject: Re: [boost] [integer][type_traits] invaid values for integer_traits<boost::intmax_t>
From: Vicente Botet (vicente.botet_at_[hidden])
Date: 2011-02-12 10:36:18
Steven Watanabe-4 wrote:
>
> AMDG
>
> On 2/12/2011 5:15 AM, Vicente Botet wrote:
>> <snip>
>> BOOST_MPL_ASSERT_MSG(false, BOOST_RATIO_OVERFLOW_IN_MUL, (
>>
>> 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)
>
>
I'm already using the trunk.
Vicente
-- View this message in context: http://boost.2283326.n4.nabble.com/integer-type-traits-invaid-values-for-integer-traits-boost-intmax-t-tp3302672p3302798.html Sent from the Boost - Dev mailing list archive at Nabble.com.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk