5 Mar
2022
5 Mar
'22
8:24 p.m.
Hi Jan, On 05.03.22 15:18, Jan Rheinländer wrote:
here are two patches: One for push_front() / pop_front(), the other for sort().
Are you sure you want to container<std::vector>::prepend()? It's very slow. For std::list and std::deque, .push_front() and .insert(.begin) seem to be equally fast. So, your first patch techniqually at least not a regression. Your second patch makes container::sort_(std::input_iterator_tag) use std::sort. That seems wrong to me because std::sort requires a random access iterator. And std::list iterators are only bidirectional, not random access. (Note that random_access_iterator_tag is derived from input_iterator_tag.) Could you explain why you needed this second patch? -richy.