Is there a logical reason why the integer is upgraded to 32+ bits?
I was trying to make an 8bit mask, and found myself a bit disappointed that the upgrade will corrupt my equations.
sizeof( quint8(0)); // 1 byte sizeof(~quint8(0)); // 4 bytes
Usually something like this is done for a good reason, but I do not see any reason why a bitwise operator would essentially need to add more bits. It would seem to me that this would hurt performance (slightly) because now you have more bits to allocate and evaluate.
Why does C++ (Or other languages) do this?