I’ve looked around and there aren’t (at least easy to find) articles that just walk you through how to implement generics in C. So I’ve decided to document the approach I use and that some others use as well. Personally I feel it’s the best approach to doing it simply because it’s more flexible and works better with tooling since macros are only applied to symbol names and not the whole source code. The macro abuse tends to make LSPs break and type erasure just makes it too easy to run into potential UB since you have to make everything void pointers. Comments
You must log in or register to comment.
