| ▲ | jjmarr 5 hours ago | ||||||||||||||||
there is no guarantee `char` is 8 bits, nor that it represents text, or even a particular encoding. If your codebase has those guarantees, go ahead and use it. | |||||||||||||||||
| ▲ | 20k 4 hours ago | parent | next [-] | ||||||||||||||||
char8_t also isn't guaranteed to be 8-bits, because sizeof(char) == 1 and sizeof(char8_t) >= 1. On a platform where char is 16 bits, char8_t will be 16 bits as well The cpp standard explicitly says that it has the same size, typed, signedness and alignment as unsigned char, but its a distinct type. So its pretty useless, and badly named | |||||||||||||||||
| |||||||||||||||||
| ▲ | dataflow 5 hours ago | parent | prev | next [-] | ||||||||||||||||
How many non-8-bit-char platforms are there with char8_t support, and how many do we expect in the future? | |||||||||||||||||
| |||||||||||||||||
| ▲ | Maxatar 2 hours ago | parent | prev [-] | ||||||||||||||||
There's no guarantee char8_t is 8 bits either, it's only guaranteed to be at least 8 bits. | |||||||||||||||||