Here is a good explanation of what template metaprogramming is all about.
This article reminded of Francisco Pereira because I remember discussing template metaprogramming with him years ago, when he was here in Newcastle. It was the feature that persuaded him about the benefits of C++ templates. Francisco is still in CS @ CMU. I found his entry in Orkut. Let's see if he'll respond to my ping.s