title: std::any without RTTI, how does it work?
body: <p>If I want to use <code>std::any</code> I can use it with RTTI switched off. The following example compiles and runs as expected also with <code>-fno-rtti</code> with gcc.</p>
  
  <pre><code>int main()
  {   
      std::any x;
      x=9.9;
      std::cout &lt;&lt; std::any_cast&lt;double&gt;(x) &lt;&lt; std::endl;
  }
  </code></pre>
  
  <p>But how <code>std::any</code> stores the type information? As I see, if I call <code>std::any_cast</code> with the "wrong" type I got <code>std::bad_any_cast</code> exception as expected.</p>
  
  <p>How is that realized or is this maybe only a gcc feature?</p>
  
  <p>I found that <code>boost::any</code> did also not need RTTI, but I found also not how that is solved. <a href="https://stackoverflow.com/questions/38324511/does-boostany-need-rtti">Does boost::any need RTTI?</a>.</p>
  
  <p>Digging into the STL header itself gives me no answer. That code is nearly unreadable to me.</p>