Boost logo

Boost :

Subject: Re: [boost] [circular buffer] logic behind set_capacity vs rset_capacity?
From: Scott McMurray (me22.ca+boost_at_[hidden])
Date: 2009-03-22 13:35:54


On Sat, Mar 21, 2009 at 16:22, Ross Levine <ross.levine_at_[hidden]> wrote:
> I was using Boost.Circular_buffer for the first time today, and
> noticed that the set_capacity and rset_capacity methods did the
> opposite of what I expect; namely, set_capacity will clip elements
> from the back and rset_capacity from the front, despite the fact that
> insertion using push_back will overwrite elements from the front. Is
> there any rationale for this operation?
>

Perhaps in analogy to a container's resize(), which removes from the back?


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