
13 Oct
2017
13 Oct
'17
10:49 a.m.
Den 12-10-2017 kl. 20:34 skrev Nevin Liber via Boost:
Normally, my check against capacity() is usually about iterators, pointers and/or references possibly being invalidated more than knowing that an actual allocation will take place.
What is the difference be an allocation and an invalidation? I assume your context is "what happens when I call push_back?".
Have we considered capacity() == min(front_capacity(), back_capacity())?
Or is your context "what happens when I call either push_back or push_front?" Maybe you can tell us what your program does when it detects that things are invalidated? Do you then recompute the iterators and references? kind regards -Thorsten