title: How do I typecast with type_info?
body: <p>I've stored a pointer to a <code>type_info</code> object.</p>
  
  <pre><code>int MyVariable = 123;
  const std::type_info* Datatype = &amp;typeid(MyVariable);
  </code></pre>
  
  <p>How might I use this to typecast another variable to that type?  I tried this, but it doesn't work:</p>
  
  <pre><code>std::cout &lt;&lt; ((*Datatype)3.14) &lt;&lt; std::endl;
  </code></pre>
  
  <p>Using the function form of typecasting doesn't work, either:</p>
  
  <pre><code>std::cout &lt;&lt; (*Datatype(3.14)) &lt;&lt; std::endl;
  </code></pre>