[basic.start.init] does only handle non-local objects of static
duration in this regard - p. 4 is actually a repetition of
[except.terminate]/1, bullet 4.
[basic.start.term] does not say what happens when a local
static object throws during destruction.
[stmt.dcl] 4+5 handle properly the case of constructors of local
statics that throw exceptions (these can be caught), but do not
mention corresponding destructors.
What I have understood so far is that typical implementations do
queue such destructor (functions) into the atexit registry anyway
([basic.start.term]/3 indirectly allows this), so wouldn't it be
appropriate to require an analogous handling and guarantee the
invocation of std::terminate here?
Proposed resolution: Add one further bullet between bullets 4 and
5 of [except.terminate]/1:
"- when destruction of a local object with static storage duration
exits using an exception (3.6.2), or"
Greetings from Bremen,
Daniel Krügler
---
[ comp.std.c++ is moderated. To submit articles, try just posting with ]
[ your news-reader. If that fails, use mailto:std...@ncar.ucar.edu ]
[ --- Please see the FAQ before posting. --- ]
[ FAQ: http://www.comeaucomputing.com/csc/faq.html ]
The last reference to 3.6.2 should not be given here. Corrected
version:
- when destruction of a local object with static storage duration
exits using an exception, or"
I apologize for any irritations,