title: Can an object throw itself?
body: <p>Answering a recent question on exceptions, reminded me of an old query. </p>
  
  <p>The following compiles in c++</p>
  
  <pre><code>#include &lt;iostream&gt;
  using namespace std;
  
  struct weird {
      void danger()
      {
          throw *this;
      }
  };
  
  int main() 
  {
      weird object;
      object.danger();
      return 0;
  }
  </code></pre>
  
  <p>Yet it always results in runtime error.</p>
  
  <ul>
  <li><p>Isn't the object thrown, preserved during stack unwinding? </p></li>
  <li><p>The runtime error smells like a call to <code>terminate</code>, how is this caused? </p></li>
  <li><p>If <code>weird object</code> was declared in an enclosing scope (the global here) could this work in an inner scope? (where unwinding that stack wouldn't affect superior ones?)</p></li>
  </ul>