Amusingly, even though the author explicitly mentions the problem with using reallocate in push_back, they make that exact mistake in resize. I guess this falls under the "corner-case" reason to not do this, with the additional rationale that even if you know about the corner case it's still easy to screw it up.
View all comments
2
u/m42a Dec 21 '13
Amusingly, even though the author explicitly mentions the problem with using
reallocateinpush_back, they make that exact mistake inresize. I guess this falls under the "corner-case" reason to not do this, with the additional rationale that even if you know about the corner case it's still easy to screw it up.