Macro representing maximum value for uint64_t

Using the cstdint header portably can be quite a challenge (it is missing from some MSVC implementations). At the same time numeric_limits::max() can be hard to use without constexpr and it is not actually required to work with uint64_t. If you don’t care about those things too much, std::numeric_limits<uint64_t>::max() will most likely do the trick.

Boost.Integer has an implementation of cstdint and comes with an extra traits class to get a constant maximal value. A compliant implementation of cstdint should also provide the macro UINT64_MAX, but I’m not sure about boost.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)