I am currently working on a project that makes extensive use of 64-bit unsigned integers in many parts of the code. So far we are compiling only gcc 4.6, but now we are transferring some code to windows. It is very important that these unsigned ints have a width of 64 bits. It has been suggested that we could use a long time, but this is not very good, if for a long time there will be more than 64 bits, we really want to get a guarantee that it will be 64 bits, and something like static_assert(sizeof(long long) == 8) code smells a bit.
What is the best way to define something like uint64 that will be compiled for both gcc and msvc, without having to use a different code syntax everywhere?
source share