Boost logo

Boost :

From: Reece Dunn (msclrhd_at_[hidden])
Date: 2005-10-17 11:32:17

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 );

- Reece

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