title: "set_unexpected" doesn't work in VC2010?
body: <p>I am using VC2010, and write following code to test "set_unexpected" function.</p>
  
  <pre><code>#include &lt;iostream&gt;
  #include &lt;exception&gt;
  
  void my_unexpected_handler()
  {
      std::cout &lt;&lt; "unexpected handler" &lt;&lt; std::endl;
  }
  
  int _tmain(int argc, _TCHAR* argv[])
  {
      set_unexpected(my_unexpected_handler);
  
      throw 1;
  
      return 0;
  }
  </code></pre>
  
  <p>However, "my_unexpected_handler" is never called(the string isn't printed to console, I tried to set breakpoint in my_unexpected_handler, didn't run into).</p>
  
  <p>What's wrong with my code?</p>
  
  <p>Thanks</p>
  
  <hr>
  
  <p>Sorry, I misunderstood the unexpected exception. However, even if I change code to following</p>
  
  <pre><code>#include &lt;iostream&gt;
  #include &lt;exception&gt;
  
  void my_unexpected_handler()
  {
      std::cout &lt;&lt; "unexpected handler" &lt;&lt; std::endl;
  }
  
  void func() throw(int)
  {
      throw 'h';
  }
  
  int _tmain(int argc, _TCHAR* argv[])
  {
      std::set_unexpected(my_unexpected_handler);
  
      func();
  
      return 0;
  }
  </code></pre>
  
  <p>It still doesn't work? That is, "my_unexpected_handler" isn't called.</p>