On 1 March 2012 15:15, Frank Birbacher <bloodymir.crap@gmx.net> wrote:

I'd like to see it. Actually I need one of those but with some special
property: the size type shall be changable to e.g. unsigned char.

In the interface or the implementation?

If it is in the interface, I'd rather it match the other containers and be a size_t.

In the implementation, well, that's just a detail that should be weighed against other concerns (what is the efficiency (both space and typical access) tradeoff between storing the size vs. storing a pointer to end vs. conversion of a "smaller" size to size_t).

Your use case (char array) is fairly easy to whip up with just an array and a size.   Alignment, exception safety or move semantics is what makes this container non-trivial to write.
--
 Nevin ":-)" Liber  <mailto:nevin@eviloverlord.com>  (847) 691-1404