Forum Stats

  • 3,838,452 Users
  • 2,262,365 Discussions


OCCI - using 64-bit values with occi::Number on Linux and Windows

I'm trying to read a 64bit value from an occi::Number. Fortunately occi::Number provides cast operators, which are nice to use:

unsigned long value = (unsigned long)myOcciNumber;

Unfortunately they're using native integer types, which are not the same on different systems. Unsigned long is 64bit on Linux, but 32bit on Windows. I would like to use the same code on both systems, which works really good for everything else.

I would prefer not to manually pick apart the occi::Number via bytes. If everything else fails I'll have to.

Is there any way to get a 64bit value with the same code on both systems?