考虑以下代码片段:
#include <cstdint> #include <limits> #include <iostream> int main(void) uint64_t a = UINT32_MAX; std::cout << "a: " << a << std::endl; std::cout << "a: " << a << std::endl; uint64_t b = (UINT32_MAX) + 1; std::cout << "b: " << b << std::endl; uint64_t c = std::numeric_limits<uint32_t>::max(); std::cout << "c: " << c << std::endl; uint64_t d = std::numeric_limits<uint32_t>::max() + 1; std::cout << "d: " << d << std::endl;