|
Boost : |
From: Jan Gaspar (jga_at_[hidden])
Date: 2003-06-10 09:48:49
Hi Howard!
Howard Hinnant wrote:
> For the general container I propose that insert reallocates if size()
> would exceed capacity (invalidating all iterators, pointers and
> references). And if size() does not exceed capacity, all iterators,
> pointers and references are still invalidated, unless the insert
> happens at one end or the other, in which case no pointers or
> references are invalidated (iterators still are invalidated). I would
> expect a quality implementation to minimize the number of elements that
> need to be shifted.
This is an interesting idea!
>
> insert in general should have the basic exception safety guarantee.
> But when inserting only one element at either end, the strong guarantee
> is in place.
I think the strong guarantee can reached only in case the cyclic_buffer is not
full (if there is no reallocation).
> Also if the value_type's copy constructor and assignment
> operator do not throw, then the strong guarantee is in place.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk