372. Inconsistent description of stdlib exceptions

Section: 20.5.5.12 [res.on.exception.handling], 21.7.2 [type.info] Status: NAD Submitter: Randy Maddox Opened: 2002-07-22 Last modified: 2016-02-10

Priority: Not Prioritized

View all other issues in [res.on.exception.handling].

View all issues with NAD status.

Discussion:

Paragraph 3 under clause 20.5.5.12 [res.on.exception.handling], Restrictions on Exception Handling, states that "Any other functions defined in the C++ Standard Library that do not have an exception-specification may throw implementation-defined exceptions unless otherwise specified." This statement is followed by a reference to footnote 178 at the bottom of that page which states, apparently in reference to the C++ Standard Library, that "Library implementations are encouraged (but not required) to report errors by throwing exceptions from (or derived from) the standard exceptions."

These statements appear to be in direct contradiction to clause 21.7.2 [type.info], which states "The class exception defines the base class for the types of objects thrown as exceptions by the C++ Standard library components ...".

Is this inconsistent?

Proposed resolution:

Rationale:

Clause 17 is setting the overall library requirements, and it's clear and consistent. This sentence from Clause 18 is descriptive, not setting a requirement on any other class.