F
Frederick Gotham
Herbert Rosenau:
Not that we don't access "obj1" subsequent to the copy. Therefore, all
behaviour is well-defined.
No, it can't.
Indeed, one would exercise caution if going on to access "obj1".
May result in udefined behavior when Type1 != Type2 as the
representation of different types does not require that they are have
to have the same padding bits adn/or alignment requirements.
Not that we don't access "obj1" subsequent to the copy. Therefore, all
behaviour is well-defined.
memcpy can fail in the lands of udefined behavior here.
No, it can't.
Accessing obje1 thereafter can end in anything but may not do what you
thinks it should do.
Indeed, one would exercise caution if going on to access "obj1".