Date
2022-02-18.07:47:23
Message id
2846

Content

N3092 comment GB 24

The return type of the sizeof operator is defined as being of type std::size_t, defined in library 17.2 [support.types]. This, in turn, says that size_t is defined in the C standard, which in turn says that size_t is defined as the type of the result of the sizeof operator!

The C definition of sizeof returns an implementation-defined unsigned integer type, recommended not to have “an integer conversion rank greater than signed long int, unless the implementation supports objects large enough to make this necessary.”