Boost logo

Boost :

Subject: Re: [boost] [circular buffer] logic behind set_capacity vs rset_capacity?
From: Jan Gaspar (jano_gaspar_at_[hidden])
Date: 2009-03-22 03:57:20

IMO this behaviour is more natural. If you want to set_capacity() lower that the current size then the elements at the end will be dropped. There is no other rationale for this. You are the first who pointed this out. Hopefully it will not cause you a real problem ... it is just naming, the functionality is there. Regards, Jan ----- Original Message ---- From: Ross Levine <ross.levine_at_[hidden]> To: boost_at_[hidden] Sent: Saturday, 21 March, 2009 21:22:34 Subject: [boost] [circular buffer] logic behind set_capacity vs rset_capacity? 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? _______________________________________________ Unsubscribe & other changes:

Boost list run by bdawes at, gregod at, cpdaniel at, john at