Problem. I can't implement a covariant “pointer” type to which I can add my own features (notably automatic nulling) but also access a ref counting etc.
My solution to this is more about demonstrating the walking and iteration of data structures than any practical use
Several C++ features are missing from this, notably multiple inheritance. Some curse at multiple inheritance but as C++ has only the single feature for object model programming (unlike other languages with built in “category”, “interface”, “extends” features I use multiple inheritance a lot, especially for interfaces.
int main(int argc, char * argv)
managing_simple_inheritance_with_c_templates.txt · Last modified: 2017/09/05 08:33 by xylene