title: C++11 way to reset a struct to null?
body: <p>I am learning a physics library and it involves creating info structs and then passing them to initialiser functions:</p>
  
  <pre><code>btRigidBodyConstructionInfo rbInfo = (/*values...*/);
  btRigidBody* rigidBody = new btRigidBody(rbInfo);
  </code></pre>
  
  <p>Now I want to reset the struct (null it) to reuse it. I found another question on SO which is identical, and the answer was either to create a zero-initialised temporary and set it to it, or after C++11:</p>
  
  <pre><code>rbInfo = {};
  </code></pre>
  
  <p>When I tried this I got the message:</p>
  
  <blockquote>
    <p>"No operator "=" matches these operands.</p>
  </blockquote>
  
  <p>I was confused and but then found out that this syntax attempts to call the default constructor (at least in my compiler (Visual Studio 2017)), and rbInfo doesn't haven't any. I have a feeling that that syntax does the same as:</p>
  
  <pre><code>rbInfo = btRigidBodyConstructionInfo{};
  </code></pre>
  
  <p>In this case is there no way to reset the struct without setting the individual members? I thought about memsetting, but that's a bad idea generally because there might be things like vtable pointers and such, right?</p>