
17 Oct
2006
17 Oct
'06
6:40 p.m.
Terry G wrote:
I've just finished reading C++ Template Metaprogramming again. I just don't get it.
Why would someone use a type container?
Imagine a case where for some reason you would like to call register<X, Y>(); for all combinations of X1..Xm and Y1..Yn. Writing the calls by hand gets tedious. If you put Xi and Yi in type sequences, you can write a metaprogram that generates the calls.