<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
</head>
<body bgcolor="#ffffff" text="#000000">
<p style="margin-top: 0pt; margin-bottom: 6px;"><font color="#808000"><font
 color="#000000">Hi,<br>
</font></font></p>
<p style="margin-top: 0pt; margin-bottom: 6px;"><font color="#808000"><font
 color="#000000">I'd like to make a small remark about the
throw-specifiactions: I think they should be avoided (and if possible,
removed).<br>
</font></font></p>
<p style="margin-top: 0pt; margin-bottom: 6px;"><font
 face="Arial, Arial, Helvetica">As Herb Sutter writes:  <a
 class="moz-txt-link-freetext" href="http://www.gotw.ca/gotw/082.htm">http://www.gotw.ca/gotw/082.htm</a>:</font></p>
<p style="margin-top: 0pt; margin-bottom: 6px;"><font color="#808000"><font
 color="#000000"><br>
</font></font></p>
<p style="margin-top: 0pt; margin-bottom: 6px;"><font
 face="Arial, Arial, Helvetica"><font color="#808000"><b><font size="4">4.</font></b>
When is it worth it to write exception specifications on functions? Why
would you choose to write one, or why not?</font></font></p>
<p style="margin-top: 0pt; margin-bottom: 6px;"><font
 face="Arial, Arial, Helvetica">In brief, don't bother. Even experts
don't bother.</font></p>
<p style="margin-top: 0pt; margin-bottom: 6px;"><font
 face="Arial, Arial, Helvetica">Slightly less briefly, the major issues
are: </font></p>
<blockquote>
  <p style="margin-top: 0pt; margin-bottom: 6px;"><font
 face="Arial, Arial, Helvetica">Exception
specifications can cause surprising performance hits, for example if
the compiler turns off inlining for functions with exception
specifications.</font></p>
  <p style="margin-top: 0pt; margin-bottom: 6px;"><font
 face="Arial, Arial, Helvetica">A
runtime unexpected() error is not always what you want to have happen
for the kinds of mistakes that exception specifications are meant to
catch.</font></p>
  <p style="margin-top: 0pt; margin-bottom: 6px;"><font
 face="Arial, Arial, Helvetica">You
generally can't write useful exception specifications for function
templates anyway because you generally can't tell what the types they
operate on might throw. </font></p>
</blockquote>
<p style="margin-top: 0pt; margin-bottom: 6px;"><font
 face="Arial, Arial, Helvetica">For more, see for example the Boost
exception specification rationale available via <a
 href="http://www.gotw.ca/publications/xc++s/boost_es.htm"
 target="_blank">http://www.gotw.ca/publications/xc++s/boost_es.htm</a>
(it summarizes to "Don't!").<br>
</font></p>
<p style="margin-top: 0pt; margin-bottom: 6px;"><font
 face="Arial, Arial, Helvetica"><br>
So would it be okay if I remove them as I see them?<br>
</font></p>
<p style="margin-top: 0pt; margin-bottom: 6px;"><font
 face="Arial, Arial, Helvetica">Best, Dirk<br>
</font></p>
<p style="margin-top: 0pt; margin-bottom: 6px;"><font
 face="Arial, Arial, Helvetica"><br>
<br>
</font></p>
</body>
</html>