No. Reasons:
a) Dynamic allocated memory, ie. pointer in the struct/class.
b) Endianess, int-size, padding etc. of the struct, order of the members...
Other things:
"If" it would be possible, there is no reason to create a full object
with constructor call before overwriting it.
And in my opinion, you′re overusing auto.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…