Boost logo

Boost :

From: Beman Dawes (bdawes_at_[hidden])
Date: 2002-05-15 10:38:30


At 01:20 AM 5/15/2002, Daryle Walker wrote:
>on 5/1/02 2:54 PM, David Seidman at david_i_seidman_at_[hidden] wrote:
>
>> I require support for 64-bit integers in integer.hpp.
>> I am using boost::int_t< numbits >::least, and I find
>> that the 0 and 5 specializations for template
>> int_least_helper are not implemented. When is this
>> support going to be added?
>>
>> BTW, this library works beautifully up to 32 bits.
>
>The lack of specializations for 0 and 5 are deliberate; we have to trap
>requests larger than a "long" somehow. To get a "long long," we would
have
>to conditionally widen the non-implementation gaps. Also, some libraries
>(like CRC) use these types for value-based template parameters, and there

>is
>no guarantee that "long long" can be used that way.
>
>(You're also assuming the popular mapping 64 bits -> "long long" because
32
>bits -> "int" and "long". A compiler could shift "long" to a 64-bit
type.)

IIRC, at least one commercial compiler does in fact use "long" as a 64-bit
type. It allowed them to supply a compiler that was both standard
conforming and supported 64-bit arithmetic years before "long long" was a
possibility.

--Beman


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk