
"Peter Dimov" <pdimov@pdimov.com> 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.
Relevance? 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>? -- --Dave