Boost logo

Boost :

From: Gennaro Prota (gennaro_prota_at_[hidden])
Date: 2006-06-29 13:16:25

On Thu, 29 Jun 2006 11:37:11 -0500, "Jeremy Day"
<jeremy.day_at_[hidden]> 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_at_[hidden]> 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:


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?


Boost list run by bdawes at, gregod at, cpdaniel at, john at