title: Casting std::any back to its original type?
body: <p>Is there a way to cast std::any back to its original type without having to hard code it?</p>
  
  <p>I know you can do</p>
  
  <pre><code>std::any_cast&lt;int&gt;(example)
  </code></pre>
  
  <p>But this requires you do already know that "example" is an int. I noticed that std::any stores the original type but I can't seem to find anyway to use it for casting. I want to do something like this:</p>
  
  <pre><code>static_cast&lt;example.type()&gt;(example);
  </code></pre>
  
  <p>Sorry if this is a bit of a basic question but I feel like this may just not be possible and wanted to check.</p>