title: How type recognision works when exception handling
body: <p>Somewhere in c++ code:</p>
  
  <pre><code>try 
  {
     foo();
  }
  catch (const FooExceptionOne&amp; e) 
  {
      // ...
  }
  catch (const FooExceptionTwo&amp; e) 
  {
      // ...
  }
  catch (const std::exception&amp; e) 
  {
      // ...
  }
  </code></pre>
  
  <p><code>FooExceptionOne</code> and <code>FooExceptionTwo</code> are custom classes derived from <code>std::exception</code>. </p>
  
  <p>In moment when exception is thrown; how does type recognition works? Is it some kind of dynamic casting or plymorphism, happening "under the hood"?</p>
  
  <p>My first thought was dynamic-casting, but (of course) it seems very slow solution.</p>