
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 (access to "the man" is one of the benefits of living near Texas A&M University), and he is of the opinion that exception specifications are never reliable and should not be used, as they give programmers a false sense of security. Thus, exception guarantees should be documented in comments (or in some other variety of documentation), rather than through throw() specifications. Jeremy