From: Jan Gaspar (jano_gaspar_at_[hidden])
Date: 2008-06-12 07:30:17
Sorry I don't have time to do this. Anyway IMO implementing reserve would give an impression that the capacity is not fixed and increases as you put elements into the circular buffer. And at last circular buffer is not a vector.
----- Original Message ----
From: Thorsten Ottosen <thorsten.ottosen_at_[hidden]>
Sent: Wednesday, 11 June, 2008 9:49:29 PM
Subject: Re: [boost] [circular_buffer] why is there no reserve(size_type)?
Jan Gaspar skrev:
> 1) it's behaviour is slightly different from the standard - you can increase but also decrease the capaciry of the container; decreasing of the capacity is not supported by reserve()
> 2) the word capacity is used all over the documentation of the circular buffer. I think set_capacity expresses better what the method does.
So the function is slightly different from the one in std::vector :-)
Having a reserve() won't hurt ... in fact, it will make it easier to
write code that works for both vector and circular_buffer.
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost
Sent from Yahoo! Mail.
A Smarter Email http://uk.docs.yahoo.com/nowyoucan.html
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk