Den 18-10-2017 kl. 16:37 skrev Joaquin M López Muñoz via Boost:
Writing this has led me to realize that a generic growing/insertion policy also needs a member function to indicate what to do on erasure:
struct free_space{std::size_t back,front;}; free_space query_for_insertion(std::size_t pos,std::size_t n); free_space query_for_erasure(std::size_t pos,std::size_t n);
I don't get how we know if we have a push_back or push_front. So I think we should use free_space query_for_middle_insertion(std::size_t pos,std::size_t n); free_space query_for_back_insertion(std::size_t pos,std::size_t n); free_space query_for_front_insertion(std::size_t pos,std::size_t n); so we have clear control over inserts/push to either end. kind regards -Thorsten