Boost logo

Boost :

Subject: Re: [boost] [utility] new auto_buffer class --- RFC
From: Frank Mori Hess (fmhess_at_[hidden])
Date: 2009-03-03 07:39:31


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.




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