
15 Oct
2011
15 Oct
'11
3 p.m.
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. You can't mechanically apply the same rule to both. 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. :-)