By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
446,260 Members | 1,338 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 446,260 IT Pros & Developers. It's quick & easy.

May STL dtors throw?

P: n/a
The C++ standard says (17.4.4.8/3): "No destructor operation defined in
the C++ Standard Library will throw an exception."

It also does not put an excception specification for
basic_string::~basic_string() (21.3/6, pp. 385).

Is this NOT a contradiction? May the basic_string dtor throw or not?

Jul 23 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
BigMan wrote:
The C++ standard says (17.4.4.8/3): "No destructor operation defined in
the C++ Standard Library will throw an exception."

It also does not put an excception specification for
basic_string::~basic_string() (21.3/6, pp. 385).

Is this NOT a contradiction? May the basic_string dtor throw or not?


no and no.

I suspect that the omission of the throw specifier is not normative.
It's an implementation detail.

Jul 23 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.