May STL dtors throw?

B

BigMan

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?
 
G

Gianni Mariani

BigMan said:
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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,202
Messages
2,571,057
Members
47,665
Latest member
salkete

Latest Threads

Top