The question is pretty simple.
On 32-bit systems:
std::cout << sizeof(unsigned int);
On 64-bit systems:
std::cout << sizeof(unsigned int);
I just checked the implementation that MSVC has and looks like this:
#ifdef _WIN64 typedef unsigned __int64 size_t; #else typedef unsigned int size_t; #endif
So, why not make std::size_t unsigned long long ( std::uintmax_t ) on both 32-bit and 64-bit systems when they explicitly support it? Or am I wrong about that?
source share