26 Jul
2016
26 Jul
'16
9 p.m.
On 24 July 2016 at 14:44, Benedek Thaler
Thanks for the feedback, Mathias. You are right. This implementation detail is a consequence of honoring reserve calls:
devector<int> d; d.push_back(1); d.reserve_front(100); d.reserve_back(100);
The reserve back has to keep the front capacity untouched or it breaks the promise of it. This also applies to a series of push_front/pop_backs, for example.
I think it's pretty serious. Consider:
int n;
devector<int> d;
d.push_back(0);
for(int i=0; i