If you really want to learn how to do this, and do it really really well, check out sglib:
It's got nearly every data structure you can imagine, all implemented as CPP meta hackery. Brilliant.
It's got nearly every data structure you can imagine, all implemented as CPP meta hackery. Brilliant.
I went to go check out the code to see if this issue had been fixed, but the download link has gone bad.
I mentioned this library on HN some years back, when I was still excited about it, and the reply I got was something like "No! Not that macro boneyard!" He was right.