logoalt Hacker News

vinkelhake04/23/20251 replyview on HN

> It’s too bad you still can’t cast a char to a uint8_t though in a constexpr expression.

Uh, what? That has worked fine since the introduction of constexpr in C++11.


Replies

TuxSH04/23/2025

Maybe they meant reinterpret_cast from/to char to u8, which in this case isn't possible in constexpr.

show 1 reply