The template mechanism in C++ only accidentally became useful for template metaprogramming. On the other hand, D\'s was designed specifically to facilitate this. And apparently
Well in D you can easily impose static constraints on template parameters and write code depending on the actual template argument with static if.
It's possible to simulate that for simple cases with C++ by using template specialization and other tricks (see boost) but it's a PITA and very limited cause the compiler doesn't expose many details about types.
One thing C++ really just can't do is sophisticated compile time code generation.