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 path.
You can't remove those checks. If _M_map can ever be null now or in the future, then we need the checks. Otherwise code compiled today would break if passed a deque compiled with a future GCC that allows the map to be null. I'm curious how you plan to support it though, I don't think it's possible without an ABI break. > (_Deque_base::_Deque_impl::_M_move_impl()): Remove _M_impl._M_map > check. _M_move_impl and the constructor that calls it can be removed completely, because https://cplusplus.github.io/LWG/issue2593 means that the same allocator can still be used after moving from it. That function only exists to handle the case where an allocator changes value after being moved from.