Why does this static assertion fail?
static_assert(std::is_same<uint16_t, decltype(uint16_t(0)|uint16_t(0))>::value);
According to the Bitwise logic operators section of the cppreference page on Arithmetic operators:
Usual arithmetic conversions are performed on both operands and determine the type of the result."
Shouldn't this mean the bitwise OR of two unsigned shorts
should be an unsigned short
?