title: try-catch without argument, use reference?
body: <p>As mentioned in many previous answers, one should throw exceptions by value and catch them by reference (<a href="https://stackoverflow.com/a/2522311/2175231">[A]</a>, <a href="https://stackoverflow.com/a/2023045/2175231">[B]</a>), such as</p>
  
  <pre><code>try {
      // throw std::exception();
  }
  catch(std::exception &amp;e) {
      // handle exception
  }
  </code></pre>
  
  <p>If you aren't going to make use of the exception itself (even though you should), this will however generate annoying "unused variable" warnings on compile. To avoid these, you can omit the parameter (<code>e</code> in the example above), at which point the <code>catch</code> block will trigger for the defined exception, but you won't have a variable to bother with.</p>
  
  <p>However, almost every time I see this variable-less catch block, it is not declared by reference, but by value, as in</p>
  
  <pre><code>try {
      // throw std::exception();
  }
  catch(std::exception) {
      // handle exception
  }
  </code></pre>
  
  <p>Even <a href="https://stackoverflow.com/a/8009801/2175231">Our Lord and Savior</a> has posted an answer this way (as have <a href="https://stackoverflow.com/a/11967221/2175231">others</a>). I did find <a href="https://stackoverflow.com/a/1377954/2175231">one instance</a> where references are used, though.</p>
  
  <p>Since the variable isn't used, slicing isn't a problem, so there should be no effective difference between catching by value or by reference. However, why do people seemingly make a distinction between the with-variable and without-variable cases? Saving themselves the effort of adding that ampersand?</p>
  
  <p>And, micro-optimizing as it may be (especially given how exceptional exceptions should be), doesn't the by-value case incur a casting cost (to see if the <code>catch</code> is appropriate for the thrown exception) mitigated when done by-reference?</p>