Boost logo

Boost :

From: Victor A. Wagner Jr. (vawjr_at_[hidden])
Date: 2005-04-20 09:45:25

At Wednesday 2005-04-20 03:16, you wrote:

>>which of course alway fails on 64 bit platforms because LONG_MAX is a 64
>>bit number.
>>A possible fix would be to start the test with 64 bit and not 32 on 64
>>bit platforms. But how can 64 bit platforms be detected? Probably with
>>#if (LONG_MAX > INT_MAX) ... #endif or something like this.
>>Another fix (which ignores 64 bit values alltogether) would be to change
>>the lines above to not use long and LONG_MAX but int and INT_MAX.
>>Opinions, anyone?
>Tricky, but looking at the intent of the tests, it seems like we should
>start with the largest number that will fit in a 32-bit type: so maybe we
>should change LONG_MAX to 0x7FFFFFFFL and ULONG_MAX to 0xFFFFFFFFL. As
>you say the alternative is to revamp the tests to start testing from a
>64-bit type when LONG_MAX > 0x7FFFFFFFL.
>I'd say go with whichever you have the time for ;-)

Am I missing something here? Isn't this was numeric_limits<> was put in
the language for?

>Unsubscribe & other changes:

Victor A. Wagner Jr.
The five most dangerous words in the English language:
               "There oughta be a law"

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