title: Variadically templated struct / How boost::variant is implemented
body: <p>Is it possible to achieve an effect like the following</p>
  
  <pre><code>DifferentTypesInOne&lt;string, int, double&gt; variant_obj;
  </code></pre>
  
  <p>Where you <code>variant_obj</code> has variables of types string, int and double in it. </p>
  
  <p>I know this is similar to <code>boost::variant</code>.  And I searched up questions about it before but I was not able to stumble upon an explanation which could explain how the class uses variadic templates to store elements of all the types.  In particular I am asking how I can go about defining a <code>struct</code> which has variables of all the given types and a member variable denoting which one is important currently.  </p>
  
  <p>Thanks!</p>