08-07-2022, 11:04 AM
Type punning with unions is only sanctioned by the C++ standard in very special cases and not in the code you are showing.
If the union is only needed for Reset all bits to zero, this can be easily achieved by just using
Reset(){
bits = EventSourceBits{};
}
If the union is only needed for Reset all bits to zero, this can be easily achieved by just using
Reset(){
bits = EventSourceBits{};
}