Subject: Re: [boost] [devector] optimum growing/insertion policy
From: Thorsten Ottosen (tottosen_at_[hidden])
Date: 2017-11-03 16:29:52
Den 03-11-2017 kl. 10:26 skrev Joaquin M LÃ³pez MuÃ±oz via Boost:
> El 02/11/2017 a las 19:10, Thorsten Ottosen escribiÃ³:
>> Den 18-10-2017 kl. 16:37 skrev Joaquin M LÃ³pez MuÃ±oz via Boost:
>> so we have clear control over inserts/push to either end.
> push_back is query_for_insertion(size(),1), push_front is
> query_for_insertion(0,1); I don't
> think we need specialized member functions for those, don't you think?
Perhaps not. I'm playing with an implementation, and it's not trivial to
get ones head around all corner cases, so I started with the push_back
case to keep things simple -- if its trivial simplify afterwards, we can
There is also the thing about a policy that do different things if
push_back is called or if insert is called. Say you only want to leave
free space on the right when push_back is called on an empty container,
but if insert is called on an empty container, you want to balance the
free space. I don't see how we can do that without knowing the nature of
the call, i.e., was it push_back, push_front or an insert.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk