From: David Abrahams (dave_at_[hidden])
Date: 2003-10-29 19:19:02
"E. Gladyshev" <egladysh_at_[hidden]> writes:
> --- David Abrahams <dave_at_[hidden]> wrote:
>> This problem doesn't change the fact that std::vector assignment gives
>> the basic guarantee. Any class is allowed to break its own invariants
>> temporarily during the execution of its member functions.
> Well, I am completely confused about the whole
> basic guarantees stuff and its usefullness then.
> I just hope I am alone in this *undefined* state. :)
That a class' member functions may temporarily disturb its invariants
is a well-established principle that is accomodated even by languages
with built-in support for invariant checking.
> BTW: is there a "scientific" definition
> of what basic guarantees really are?
Can you give a "scientific" definition of what you mean by
"scientific?" If you mean something suitable for use in a formal
proof of program correctness, the answer is no.
-- Dave Abrahams Boost Consulting 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