|
Boost Users : |
From: Howard Hinnant (hinnant_at_[hidden])
Date: 2004-08-26 17:47:21
On Aug 26, 2004, at 5:05 PM, David Abrahams wrote:
> In question was whether an exception can be thrown from within the
> run_time_error's copy ctor during unwinding, and whether that would
> cause termination. It's no longer clear to me that such an
> implementation would be legal.
18.6.1 makes it clear that std::exception and all classes derived from
it can not let an exception escape from their copy constructor. So if
std::runtime_error's copy ctor throws, unexpected must be called, which
will lead to termination.
I suspect what was meant by the standard was that std::exception's copy
ctor can't fail, and ditto for all classes derived from std::exception.
And thus the need for a statically checked nothrow (or can't fail)
spec.
-Howard
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net