4 ms·
some headers are meant to be included multiple times with different definitions (although templates are usually a better way to do this).
by cozzyd 6y ago
some headers are meant to be included multiple times with different definitions (although templates are usually a better way to do this).
- dkersten 6y agoYeah I used to see it from time to time, but it’s been w long time now. It seems to me that modern C++ doesn’t really need it unless you’re doing something like including data files (rather than source files) multiple times. Having said that, I almost did something like that recently, to initialise some generated data structures (include once for the structs and again to initialise memory pools), but I ended up finding a cleaner way that didn’t need it.