Is size_t the word size?

前端 未结 6 2120
有刺的猬
有刺的猬 2021-02-06 23:27

Is size_t the word size of the machine that compiled the code?

Parsing with g++, my compiler views size_t as an long unsigned int

6条回答
  •  独厮守ぢ
    2021-02-07 00:10

    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.

提交回复
热议问题