memcpy/memmove to a union member, does this set the ‘active’ member?
My reading of the standard is that std::memcpy is safe whenever the type is trivially copyable. From 9 Classes, we can see that unions are class types and so trivially copyable applies to them. A union is a class defined with the class-key union; it holds only one data member at a time (9.5). A … Read more