Boost logo

Boost :

Subject: Re: [boost] Interest in StaticVector - fixed capacity vector
From: Dave Abrahams (dave_at_[hidden])
Date: 2011-10-15 14:53:02

"Peter Dimov" <pdimov_at_[hidden]> wrote:
> Dave Abrahams wrote:
> > If we can figure out how to get cars to bounce harmlessly out of
> > collisions we could decide to make it legal to ignore stop signs and
> > just count on the bounce to handle it. Should we?
> Cars are cars, and static_vector::push_back is, well,
> static_vector::push_back. They have nothing in common.

Obviously an exaggeration on your part. Do you want a list?

> You can't
> mechanically apply the same rule to both.

The fact that I made an analogy should not be construed to mean I think
there is equivalence.

push_back throwing doesn't imply
> operator[] throwing, for example.


Their uses are different. A throwing
> static_vector::push_back enables existing algorithms that use
> push_back or
> back_inserter to continue to work without their behavior becoming
> undefined.
> A throwing static_vector::operator[]... does not enable anything. :-)

Existing algorithms that use map<int,T>?


Boost list run by bdawes at, gregod at, cpdaniel at, john at