One can implement linked lists as you describe in a C++ fashion using multiple inheritance. The LLVM project has many examples of this using the ilist_node class [1], e.g. [2].<p>Between using preprocessor directives in C and multiple inheritance in C++ (comes with associated complexity in the resulting client code), I&#x27;d always pick the latter.<p>[1] <a href="https:&#x2F;&#x2F;github.com&#x2F;llvm-mirror&#x2F;llvm&#x2F;blob&#x2F;release_37&#x2F;include&#x2F;llvm&#x2F;ADT&#x2F;ilist_node.h#L43" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;llvm-mirror&#x2F;llvm&#x2F;blob&#x2F;release_37&#x2F;include&#x2F;...</a>
[2] <a href="https:&#x2F;&#x2F;github.com&#x2F;llvm-mirror&#x2F;llvm&#x2F;blob&#x2F;release_37&#x2F;include&#x2F;llvm&#x2F;IR&#x2F;BasicBlock.h#L66" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;llvm-mirror&#x2F;llvm&#x2F;blob&#x2F;release_37&#x2F;include&#x2F;...</a>