
17 Apr
2007
17 Apr
'07
4:37 p.m.
Felipe Magno de Almeida wrote:
On 4/17/07, Ion Gaztañaga <igaztanaga@gmail.com> wrote: That's what the complexity guarantees are for. There could be a guarantee of O(1) for move-constructors and then the implementation chooses how to implement it. Seems very reasonable to me and seems to be usual approach in standardization, wrt. containers.
Yes. "erase" for a list is but O(1) there is call to allocator::deallocate that does not count in that complexity. allocator::deallocate can have linear complexity. But I agree that specifying O(1) would lead to "swap". That would be really nice. Regards, Ion