
11 Jun
2008
11 Jun
'08
7:49 p.m.
Jan Gaspar skrev:
because: 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. -Thorsten