logoalt Hacker News

Maxatartoday at 3:25 AM2 repliesview on HN

There's no guarantee char8_t is 8 bits either, it's only guaranteed to be at least 8 bits.


Replies

hackyhackytoday at 7:31 AM

> There's no guarantee char8_t is 8 bits either, it's only guaranteed to be at least 8 bits.

Have you read the standard? It says: "The result of sizeof applied to any of the narrow character types is 1." Here, "narrow character types" means char and char8_t. So technically they aren't guaranteed to be 8 bits, but they are guaranteed to be one byte.

CyberDildonicstoday at 6:49 AM

What platforms have char8_t as more than 8 bits?

show 1 reply