Boost logo

Boost :

From: Pavel Vozenilek (pavel_vozenilek_at_[hidden])
Date: 2004-03-09 00:24:38


"Alberto Barbati" <abarbati_at_[hidden]> wrote

> If there is space, the buffer tries to copy construct an element in an
> empty (uninitialized) space, then the internal state of the buffer is
> updated (this operation does not throw). If the copy ctor throws an
> exception, no object is constructed and the buffer state is not modified
> => the buffer is in the exact state it was before the call => strong
> guarantee.
>
> If there is not enough space, the buffer tries to replace one value by
> invoking operator=, then the internal state is updated (this operation
> doesn't throw). *If operator= provides the strong guarantee* and throws,
> the element already in the buffer is not modified and the buffer state
> is not modified either => the buffer is in the exact state it was before
> the call => strong guarantee.
>
> It seems to me that this cover all cases and you always get strong
> guarantee. Am I missing something?
>
No, you are right here.

/Pavel


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk