From: Ion Gaztañaga (igaztanaga_at_[hidden])
Date: 2007-04-17 12:37:41
Felipe Magno de Almeida wrote:
> On 4/17/07, Ion Gaztañaga <igaztanaga_at_[hidden]> 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.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk