
17 Sep
2004
17 Sep
'04
9:42 a.m.
I see this is defined in boost/cstdint.hpp, but only if __STDC_CONSTANT_MACROS is #defined. How does this happen? Do I #define it myself, or does it get #defined some other way?
Any help on how to use the Boost UINT64_C macro?
Define __STDC_CONSTANT_MACROS at the start of the source *before* any std lib headers are included, then include <boost/cstdint.hpp>. One potential gotcha: note that the implementation of <boost/cstdint.hpp> may delegate to the platform's stdint.h , so we're relying on that not being buggy. Then: boost::int64_t i = UINT64_C(0x1234567812345678); John.