title: What is the use of std::nothrow and std::new_handler in standard header file <new>
body: <p>I came across a small standard header file <code>&lt;new&gt;</code>. I have probably not seen its direct use before. Here is <a href="http://ideone.com/Bbxd6p" rel="nofollow">the g++ version</a> for those who are interested.</p>
  
  <p>Below part is of my interest:</p>
  
  <pre><code>  struct nothrow_t { };
    extern const nothrow_t nothrow;
    /** If you write your own error handler to be called by @c new, it must
     *  be of this type.  */
    typedef void (*new_handler)();
    /// Takes a replacement handler as the argument, returns the previous handler.
    new_handler set_new_handler(new_handler) throw();
  </code></pre>
  
  <ol>
  <li>How <code>struct nothrow_t</code> and its object <code>nothrow</code> are used by programmers ? Is the
  object really needed to be <code>extern</code>?</li>
  <li>When does <code>new_handler</code> used ?</li>
  <li>Why all the <code>operator new/delete</code> are declared in <code>extern C++</code> block ?</li>
  </ol>