2 ms·
I think both of you are also forgetting padding/alignment, though that obviously depends on the exact details.
by steveklabnik 9y ago
I think both of you are also forgetting padding/alignment, though that obviously depends on the exact details.
- jcelerier 9y agofrom what I can see sizeof(std::variant<char, uint8_t>) == 2 so there is no padding between the values and the discriminant
- steveklabnik 9y agoIn this specific case, yes.
- dleslie 9y agoAnd I wasn't clear, in that I was curious about more than the union.