|
Boost : |
From: Valentin Bonnard (Bonnard.V_at_[hidden])
Date: 2000-01-18 11:32:02
Kevlin Henney wrote:
> Andy Sawyer skulduggered:
> >Someone might argue that array<T,N> actually _does_ satisfy constant time
> >swap, since the numer of operations required is the same for all instances
> >of array<T,N> (bearing in mind that array<T,N+1> is a different type to
> >array<T,N>). This would, of course, be skulduggery of the highest order...
>
> The best kind!
>
> That said, I can't see that it is anything but a true and accurate
> observation, albeit a little subtle and devious. So perhaps constant time
> plus a footnote to clarify?
BTW, the standard only says that swap on containers should be O(1),
so this is not required, just recommended.
-- Valentin Bonnard
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk