Boost logo

Boost :

From: Scott Schurr (scott_schurr_at_[hidden])
Date: 2005-10-17 13:28:00


"Reece Dunn" <msclrhd_at_[hidden]> wrote:

> Scott Schurr wrote:
> >I suspect that there's a problem with the size of the literals
> >on the 64-bit compilers. Does one declare a 64-bit literal by
> >appending a double L ('LL')? If so, then I'll give that a try.
>
> This will depend on the compiler. I am not sure what GCC does, but for MS
> (and compatible compilers - Borland, CodeWarrior, Intel and others) you do:
>
> __int64 biglit = 2i64;
> unsigned __int64 biglit2 = 2ui64;
>
> If GCC has the ll and ull prefixes, you could create a macro for defining
> signed/unsigned 64-bit literals either where uint64_t is defined or in
> Boost.Config. e.g.:
>
> uint64_t biglit = MAKE_UINT64_T( 2 );

Thanks for that information. I think what I'll want to do, for a
first cut, is always produce 64-bit literals for 64-bit capable
compilers.

I'm going to wait until after the review period to start on fixing
the 64-bit support. Since I don't have a local 64-bit compiler
I'll be working blind and my first few efforts will be dead wrong.

At an initial glance it looks like 64-bit support should be
achievable without heroic efforts. But it certainly won't come
along for free.

Thanks again Reece.

Scott Schurr


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