Boost logo

Boost :

Subject: Re: [boost] [utility] new auto_buffer class --- RFC
From: Thorsten Ottosen (thorsten.ottosen_at_[hidden])
Date: 2009-03-03 08:01:53


Frank Mori Hess skrev:
> On Tuesday 03 March 2009, Thorsten Ottosen wrote:
>> Steven Watanabe skrev:
>>> AMDG
>>>
>>> Thorsten Ottosen wrote:
>
>>>> I don't know. I just stay clear of it. The point is that we don't
>>>> want inexperienced users to use an O(n) swap accidently.
>>> Please define n.
>> n would be c.size()
>
> n needs to be stack capacity if you want to call it O(n) swap. If n is
> size(), then swap becomes O(1) since once you get large enough to fall
> back on dynamic allocation you can just swap the pointers.

Let me call is a linear time swap for n >= N.

-Thorsten


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk