title: C++ Do I need to write throw clause for a function everywhere?
body: <h2>Before</h2>
  
  <p>Consider to have a class and a global function:</p>
  
  <p>This is, for example, <code>usefulfuncts.hpp</code></p>
  
  <pre><code>void dosome(int a, int b) throw (std::exception);
  </code></pre>
  
  <p>This is <code>usefulfuncts.cpp</code></p>
  
  <pre><code>void dosome(int a, int b) throw (std::exception) {
     //...
  }
  </code></pre>
  
  <p>And this is aclass.hpp</p>
  
  <pre><code>class aclass {
     // Members...
     friend void dosome(int a, int b) throw (std::exception);
     // Members...
  };
  </code></pre>
  
  <h2>After (what I would like that to be)</h2>
  
  <p>Ok! I would like to understand if it is strictly necessary to write everytime the <code>throw</code> clause. So for example can I do this?</p>
  
  <p>This is <code>usefulfuncts.hpp</code></p>
  
  <pre><code>void dosome(int a, int b) throw (std::exception);
  </code></pre>
  
  <p>This is <code>usefulfuncts.cpp</code></p>
  
  <pre><code>void dosome(int a, int b) { /* OMITTING IT! */
     //...
  }
  </code></pre>
  
  <p>And this is aclass.hpp</p>
  
  <pre><code>class aclass {
     // Members...
     friend void dosome(int a, int b); /* OMITTING IT */
     // Members...
  };
  </code></pre>
  
  <p>Is this right? To put it only in the main declaration? Thanks</p>