
On Thu, 29 Jun 2006 11:37:11 -0500, "Jeremy Day" <jeremy.day@gmail.com> wrote:
Greetings, everyone. This is my first time posting here, so if I screw this up, please bear with me.
On 6/29/06, Beman Dawes <bdawes@acm.org> wrote:
I afraid I still don't know the rule as to when you need to provide a throw() specifier rather than just documenting that a function never throws.
Is there guidance from exception experts?
I have spoken with Bjarne Stroustrup about this [...] Thus, exception guarantees should be documented in comments (or in some other variety of documentation), rather than through throw() specifications.
But Beman was specifically talking about throw() [read: no-throw], not exception specifications in general. Our docs say: <http://www.boost.org/more/lib_guide.htm#Exception-specification> FWIW, my style is to use the throw() on exception classes; basically because it reminds me to double check the implementation for unwanted sources of exceptions --std::string being a common one. PS: out of curiosity, Jeremy, didn't you ask why the don't get removed from the standard then? --Gennaro.