Boost logo

Boost :

Subject: Re: [boost] Crazy Borland/Codegear long long behaviour?
From: John Maddock (john_at_[hidden])
Date: 2009-11-29 11:25:26


>> I'm having a load of trouble getting Boost.Integer to play nice with
>> the Borland/Codegear compilers, for example given:
>>
>> void print_val(long long l)
>> {
>> std::cout << std::hex << static_cast<int>((l &
>> 0xFFFFFFFF00000000LL) >> 32);
>
> I've no idea whether this matters or not, but the constant
> 0xFFFFFFFF00000000 does not fit in long long. I think that you need an ull
> suffix for it... or leave the suffix out. You could also try
> static_cast<unsigned> instead of int.

Good point, doesn't make any difference to program output though... that
code was just there so I could actually print out a long long.

John.


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