logoalt Hacker News

CyberDildonicstoday at 6:49 AM1 replyview on HN

What platforms have char8_t as more than 8 bits?


Replies

marcthe12today at 9:21 AM

Well platforms with CHAR_BIT != 8. In c and c++ char and there for byte is atleast 8 bytes not 8 bytes. POSIX does force CHAR_BIT == 8. I think only place is in embeded and that to some DSPs or ASICs like device. So in practice most code will break on those platforms and they are very rare. But they are still technically supported by c and c++ std. Similarly how c still suported non 2's complement arch till 2023.