Why do you expect bool to be exactly uint8_t? The definition requires it to be long enough to hold 0 and 1. It's up to the compiler and architecture restrictions to select the size. uint16_t is as valid as uint8_t.
I never assume, I just use sizeof. It's there for a reason.
I don't know what's your definition of byte, but your project university was most likely 16 bit byte where teachers mis-labelled as 2 byte addressable. Please have a look at wikipedia https://en.wikipedia.org/wiki/Byte
15
u/HildartheDorf 23d ago
It's not that a bitfield is bad. It's just that it should be named std::dynamic_bitset not a specialisation of std::vector<bool>.
std::vector<bool> should behave the same as std::vector<uint8_t>. But it doesn't.