I didn't quite understand the two comments below by @goodbyeera and @user743382 in this answer in SO.
Comment by @goodbyeera:
@hvd: In that sense, wouldn't the compiler perform
memcpy
optimization for plain{}
definition too?
Comment by @user743382:
@goodbyeera It's allowed, but it may be significantly harder for the compiler to detect that it's possible. A field-by-field assignment in the copy constructor function body may look to the compiler as if it should avoid copying any internal padding bytes.