From: David Abrahams (dave_at_[hidden])
Date: 2004-07-15 06:03:38
Pavol Droba <droba_at_[hidden]> writes:
> Such a guarantee would allow me to use a local variable of a given type
> without needing to worry, that it will break the guarantie of the whole
> Is this ok?
> How would you name such a property?
While I support the use of the "pure" distinction in exception-safety
analysis, a word of caution: be careful not to specify such a detailed
ES contract that it becomes unreasonably hard to use. Another risk is
that you'll undly constrain your future implementation choices.
Sometimes it makes sense to paint with a slightly broader brush and
and provide a simpler guarantee.
Further, I'm not sure it usually makes sense to use "pure" when
describing constraints on user-supplied operations. It stands to
reason that in general, the library has no knowledge of external state
that might be modified by a user-supplied operation and can't roll
back the results. It's often a reasonable shorthand to say "gives the
strong guarantee" when you mean "gives the strong guarantee as long
as the user-supplied operation is pure".
-- Dave Abrahams Boost Consulting http://www.boost-consulting.com
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk