Is size_t the word size?

In the C++ standard, [support.types] (18.2) /6: “The type size_t is an implementation-defined unsigned integer type that is large enough to contain the size in bytes of any object.” This may or may not be the same as a “word size”, whatever that means.

Why is rsize_t defined?

You’ve encountered it in Microsoft’s C++ standard library, but it actually comes from C. C 11, to be precise, which means it’s not technically a part of C++. C 11 standard, Annex K introduced all the _s functions and the corresponding typedefs, including rsize_t. There is also a “maximum value” macro RSIZE_MAX which is large … Read more

Maximum size of size_t

The standard says that SIZE_MAX must be at least 65535. It specifies no upper bound, and gcc’s implementation is perfectly valid. Quoting the reference you cited (emphasis added): Its implementation-defined value shall be equal to or greater in magnitude (absolute value) than the corresponding value given below, with the same sign.

tech