On 12/10/2017 20:34, Nevin Liber via Boost wrote:
On Thu, Oct 12, 2017 at 12:17 PM, Ion GaztaƱaga via Boost < boost@lists.boost.org> wrote:
On 12/10/2017 10:37, Thorsten Ottosen via Boost wrote:
That means your design where capacity is the the full buffer length can
satisfy both situations. So I agree with you. But it also calls into question the need for anything else than capacity (i.e., there seem to be vanishingly little use for back_capacity/front_capacity and they probably confuse more than they help).
I agree. If capacity is the full buffer length, only back/front_capacity make sense.
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.
Might be. But the name capacity() might not be a good name to check for invalidation. Best, Ion