>>22,23,26
None of these are me,
>>19. Let me dispel a few myths.
Using void* is not slower than any other growable pointer array. In fact it's typically faster that vector<T*> for any T, because the overhead of duplicating templates leads to worse cache performance. You can easily hide the casts by writing a few wrapper macros that cast for you, but obviously there's no type safety there.
It can be considerably slower however if you are allocating objects as pointers that you would otherwise use in-place in a growable (non-pointer'd) array; e.g. using a generic void* array to point to a bunch of individually malloc'd ints is obviously way slower than vector<int>. Conversely it's faster if the objects are huge, because growing the vector needs only to move the pointers, not the objects.
You can write a generic in-place growable array. There are several ways to do this. If you make your array take element_size, it *may* be faster or slower. The element_size is an extra multiplication for basically every method, at the cost of huge code bloat for a template instantiation of every type.
You can also just use macros. You can in fact do it just like templates; you write a macro that instantiates the struct and all of its functions, subbing in the typename into the struct and function names. This is completely equivalent to extern templates in every way, except for SFINAE.
It may interest you to note that most low-memory implementations of C++ vectors (e.g. those in ustl) actually implement a generic growable array using element_size, and then implement the templated vector fully inline which just does casts. I've written one of these before, and it is in my opinion absolutely the best way to do it (though technically not legal C++; you're not supposed to bitwise move objects due to possible self-references, which is a dumb restriction you can usually ignore.) I would gladly exchange template bloat for runtime calculations of element_size.
To summarize, I'm not sure how I want to solve this yet. I actually like that growable arrays are not easy right now in C; most of the time (in my particular project) the right array size can be pre-calculated, so I feel like not having vector<> forces me to do that which is all-around better in my opinion. I'll probably end up making a generic element_size memory block though (like ustl) and write the above macros for instantiating lists for them.