Re: Deque code cleanup and optimizations

2019-05-17 Thread Jonathan Wakely
On 17/05/19 07:06 +0200, François Dumont wrote: Here is the simplified patch. I put back the _M_map checks, we'll see later if those can be removed.     * include/bits/stl_deque.h     (_Deque_iterator<>::__ptr_to): Remove, use std::__ptr_rebind.     (_Deque_base(_Deque_base&&, const

Re: Deque code cleanup and optimizations

2019-05-16 Thread François Dumont
Here is the simplified patch. I put back the _M_map checks, we'll see later if those can be removed.     * include/bits/stl_deque.h     (_Deque_iterator<>::__ptr_to): Remove, use std::__ptr_rebind.     (_Deque_base(_Deque_base&&, const allocator_type&)): New.    

Re: Deque code cleanup and optimizations

2019-05-13 Thread François Dumont
On 5/10/19 3:38 PM, Jonathan Wakely wrote: This seems generally OK, but ... On Fri, 10 May 2019, 05:59 François Dumont wrote: I remove several _M_map != nullptr checks cause in current implementation it can't be null. I have several patches following this one to support it but in this

Re: Deque code cleanup and optimizations

2019-05-10 Thread Jonathan Wakely
This seems generally OK, but ... On Fri, 10 May 2019, 05:59 François Dumont wrote: > I remove several _M_map != nullptr checks cause in current > implementation it can't be null. I have several patches following this > one to support it but in this case we will be using a different code

Deque code cleanup and optimizations

2019-05-09 Thread François Dumont
Hi     This patch implements a number of simplifications and optimizations already done to other containers like std::vector - Default default and move constructors - The std::swap optimization - The construction always equal allocator optimization - Shortcuts on method calls.     I