为什么size_t重要?(Why size_t matters) - Jeremy’s blog
§ 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.
As an implication, size_t
is a type guaranteed to hold any array index.