Title
Exception specifications and checking
Status
dup
Section
14.5 [except.spec]
Submitter
Daveed Vandevoorde

Created on 1999-06-25.00:00:00 last changed 301 months ago

Messages

Date: 1999-10-15.00:00:00

Rationale (10/99): Duplicate of issues 87 and 92.

Date: 2022-02-18.07:47:23

14.5 [except.spec] paragraph 1 says,

An exception-specification shall appear only on a function declarator in a function, pointer, reference or pointer to member declaration or definition.
This wording forbids exception specifications in declarations where they might plausibly occur (e.g., an array of function pointers). This restriction seems arbitrary. It's also unclear whether this wording allows declarations such as
    void (*f())() throw(int);  // returns a pointer to a function
                               // that might throw "int"

At the same time, other cases are allowed by the wording in paragraph 1 (e.g., a pointer to a pointer to a function), but no checking for such cases is specified in paragraph 3. For example, the following appears to be allowed:

    void (*p)() throw(int);
    void (**pp)() throw() = &p;

Rationale (10/99): Duplicate of issues 87 and 92.

History
Date User Action Args
2000-02-23 00:00:00adminsetmessages: + msg277
2000-02-23 00:00:00adminsetstatus: open -> dup
1999-06-25 00:00:00admincreate