Title
bad declaration of destructor for ios_base::failure
Status
cd1
Section
[ios.failure]
Submitter
PremAnand M. Rao

Created on 2001-08-23.00:00:00 last changed 172 months ago

Messages

Date: 2010-10-21.18:28:33

Rationale:

The proposed resolution is consistent with the way that destructors of other classes derived from exception are handled.

Date: 2010-10-21.18:28:33

Proposed resolution:

Remove the declaration of ~failure().

Date: 2001-08-23.00:00:00

With the change in [res.on.exception.handling] to state "An implementation may strengthen the exception-specification for a non-virtual function by removing listed exceptions." (issue 119) and the following declaration of ~failure() in ios_base::failure

    namespace std {
       class ios_base::failure : public exception {
       public:
           ...
           virtual ~failure();
           ...
       };
     }

the class failure cannot be implemented since in [type.info] the destructor of class exception has an empty exception specification:

    namespace std {
       class exception {
       public:
         ...
         virtual ~exception() throw();
         ...
       };
     }
History
Date User Action Args
2010-10-21 18:28:33adminsetmessages: + msg2258
2010-10-21 18:28:33adminsetmessages: + msg2257
2001-08-23 00:00:00admincreate