
2 Mar
2009
2 Mar
'09
11:22 p.m.
On Mon, Mar 2, 2009 at 6:11 PM, Scott McMurray <me22.ca+boost@gmail.com>wrote:
It seems to me that if you need unchecked, then the class shouldn't be storing the capacity at all (outside of debug versions), as it's unnecessary overhead, which suggests to me that it would be the domain of a separate, obviously unsafe class (unchecked_vector?).
True, or behavior could be specified by a template argument -- one instantiation has a static max_size() function that yields the appropriate value based on the N argument and has an unsafe, unchecked push_back, the other is more flexible/safe and behaves more similarly to vector. -- -Matt Calabrese