Created on 1998-10-07.00:00:00 last changed 172 months ago
Rationale:
If an exception object has non-const members, they may be used to set internal state that should affect the contents of the string returned by what().
Proposed resolution:
Add to [type.info] paragraph 9 (exception::what notes clause) the sentence:
The return value remains valid until the exception object from which it is obtained is destroyed or a non-const member function of the exception object is called.
In 18.6.1, paragraphs 8-9, the lifetime of the return value of exception::what() is left unspecified. This issue has implications with exception safety of exception handling: some exceptions should not throw bad_alloc.
History | |||
---|---|---|---|
Date | User | Action | Args |
2010-10-21 18:28:33 | admin | set | messages: + msg626 |
2010-10-21 18:28:33 | admin | set | messages: + msg625 |
1998-10-07 00:00:00 | admin | create |