top | item 43776242

(no title)

vinkelhake | 10 months ago

> 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.

discuss

order

TuxSH|10 months ago

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

epcoa|10 months ago

Why would you need to do that though if you can static_cast?