The <cstdint>
(<stdint.h>
) header defines several integral types and their names follow this pattern: intN_t
, where N
is the number of bits, not bytes.
Given that a byte is not strictly defined as being 8 bits in length, why aren't these types defined as, for example, int1_t
instead of int8_t
? Wouldn't that be more appropriate since it takes into account machines that have bytes of unusual lengths?