
7 Aug
2008
7 Aug
'08
9:47 a.m.
Because, like many buffers, in practice I find the maximum size is often a run-time constant. It is possible to get most of the benefits of a compile-time parameter constant with a compiletime_int (see end of e-mail).
Nice trick ! So I think this cover my worry on this subejct :)
a) Implementations of std::vector behave badly in tight memory
circumstances. <snip> I wonder if some of the STL container and/or assorted algorithm doesn't need a somewhat modern clean-up/rewrite or are they that much "holy" that we shouldn't/couldn't provide proper alternatives with backward compatible interface.
b) When you have a container which holds few elements, it is nice to be able to check how many things it can hold. <snip> That's indeed a problem