From: Brian McNamara (lorgon_at_[hidden])
Date: 2003-11-03 18:02:21
On Mon, Nov 03, 2003 at 02:12:42PM -0800, E. Gladyshev wrote:
> I agree with the theory. But we are talking about
> practical applications of basic guarantees in terms
> of exception safety. In practice, there seems to be
> no way to tell what generated
> an exception so in general,
> basic guarantees don't give exception safety?
Right. _In practice_, there is no way for "the basic guarantee" (or
any other theory) to provide "safety" under extreme practical
conditions. If your computer gets hits by lightning, you are just out
of luck. Rather than searching for software/theory solutions to deal
with contingencies like this, instead you should consider purchasing
Note that, despite this, it is misleading to say that
"in general, basic guarantees don't give exception safety"
for the same reason it's misleading to say
"in general, Newton's law 'F = m a' is not true".
Sure, it may turn out that, tomorrow, some cataclysmic event will
fundamentally alter the physics of our universe and invalidate the
practical applicability of "F=ma". That's fine, since physical theory
is built atop the (sometimes implicit) assumption that the laws of
physics are fixed and unchanging. If these assumptions are violated,
then the theory is not applicable to practice anymore, but the theory
is still "correct" relative to its set of assumptions.
Similarly, the "basic guarantee" does provide some "exception safety",
under some set of basic assumptions. These assumptions do not account
for cases like your computer being struck by lightning, which are
outside the scope of the theory.
If what you seek is a way to protect your computer systems from
"practical failures" (like lightning, hardware exceptions, etc.), then
I think you should find another forum for the discussion. It seems to
me you are trying to "fit a square peg into a round hole" by labelling
this issue an "exception safety" issue in order to make it applicable to
the Boost mailing lists.
-- -Brian McNamara (lorgon_at_[hidden])
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk