12 Jul
2014
12 Jul
'14
12:40 p.m.
On 12 July 2014 12:40, Niall Douglas
On 12 Jul 2014 at 10:20, Daniel James wrote:
I have been lazy as it's test code, and implemented a move assignment like this for an internal item_type due to value_type.first being const:
I move the nodes over when possible (when the allocators propagate on move or are equal), but copy the key otherwise.
How can you copy the key if it's const? It seemed to me, unless I have missed something, that I need to do an allocator destroy followed by at least an allocator copy construct as the key is const?
That's what I do. I've no idea what other implementations do.