Hello.
I've been scanning through the C++ standard, but could not find any information on this.
Is size_t always defined in terms of other "standard unsigned integer types", that is, always as a typedef of "unsigned int", "unsigned long", "unsigned long long", and so on--even if that typedef is just done internally?
Or is it possible for size_t to be able to represent more values than any other of the "standard unsigned integer types", say, 'unsigned long' in the current C++ standard, or 'unsigned long long' in C++0x? For example as a typedef of an "extended unsigned integer type" or simply by treating size_t not as a typedef, but as a standalone type which can have any bit size?
So, on a hypothetical 128-bit platform, could "unsigned long long" be just 64 bits, and size_t be 128 bits?
I'm not concerned about the practical usefulness, I'm just asking if the standard (the C++0x one) would allow that (which, I think ultimately depends on whether size_t is just a typedef, or a standalone type).
Thanks in advance for your help.
Kind regards,
Noah.
I've been scanning through the C++ standard, but could not find any information on this.
Is size_t always defined in terms of other "standard unsigned integer types", that is, always as a typedef of "unsigned int", "unsigned long", "unsigned long long", and so on--even if that typedef is just done internally?
Or is it possible for size_t to be able to represent more values than any other of the "standard unsigned integer types", say, 'unsigned long' in the current C++ standard, or 'unsigned long long' in C++0x? For example as a typedef of an "extended unsigned integer type" or simply by treating size_t not as a typedef, but as a standalone type which can have any bit size?
So, on a hypothetical 128-bit platform, could "unsigned long long" be just 64 bits, and size_t be 128 bits?
I'm not concerned about the practical usefulness, I'm just asking if the standard (the C++0x one) would allow that (which, I think ultimately depends on whether size_t is just a typedef, or a standalone type).
Thanks in advance for your help.
Kind regards,
Noah.