title: Is it safe to memset the plain struct with user-defined default constructor?
body: <p>I know that if a C++ struct is Plain Old Data ("POD") then this guarantees there is no magic in its memory structure, so it means a <code>memcpy</code> to an array of bytes and <code>memcpy</code> back is safe.</p>
  
  <p>I also know that in the standard a POD struct should not have user-defined constructor. In the project I own now, there are some plain structs (with only data fields) with a default constructor defined which initializies the data members to 0. I saw other clients would use <code>memset(&amp;obj, 0, sizeof obj);</code> before using the struct.</p>
  
  <p>Is it ok or safe to <code>memset</code> the non-POD struct before I use it?</p>