title: zeroing derived struct using memset
body: <p>I want to zero out all members of a derived structure.</p>
  
  <p>There are hundreds of members and more are added every once in a while so I feel that initializing them explicitly is error-prone.</p>
  
  <p>The structures have no virtual functions and all the member fields are built-in.  However, they are not POD by virtue of having non-trivial constructors.</p>
  
  <p>Apart from the standard frowning on the practice, do you see any issues with the following?</p>
  
  <pre><code>struct Base
  {
      // Stuff
  };
  
  struct Derived : public Base
  {
      // Hundreds of fields of different built-in types
      // including arrays
  
      Derived()
      {
          ::memset(reinterpret_cast&lt;char*&gt;this + sizeof (Base), 0, sizeof *this - sizeof (Base));
      }
  };
  </code></pre>
  
  <p>Thanks.</p>