This makes it easy to share almost all of the code, regardless of the type (s) by which you create it. Almost all of the code is in a single std::list<void *> . Each instance only adds code for casting between T * and void * where necessary.
Of course, modern compilers / linkers can do a lot of this without such help, but this has not always been the case (and some people still use the old tool chains for various reasons).
Jerry Coffin
source share