Fun fact, not: In C, it's difficult to evaluate an expression in 8 bits. Integer promotion implicitly converts almost everything to int. Such as...
void f(uint8_t prev, uint8_t next)
{
if (next == (uint8_t) (prev + 1)) {
/* cast needed to avoid promotion to int */
}
}
What if you replaced the 1 with a `const uint8_t one {1};`
CleverLibre Social is an inclusive social instance for open discussion, learning, and community.
All cultures welcome.
Hate speech and harassment strictly forbidden.