Hmm, the C code and C++ code aren't even solving the same problem, and they aren't using the same data structures. C++ uses inheritance while C uses a union, for no good reason. What in C++ is struct A : B { } is in C struct A { struct B b; }, not some weird union. Of course unions are not type safe.<p>And in practice, you can come close to the template solution with a macro for the loop. Sure, it will be a little more explicit about which functions are being called, but that's not a bad thing in my book. And, as with the C++, you'll have to build up the equivalent scaffolding and associated code, which I notice is conveniently left out of the C++ examples.h