Playing with variable length templates

Haven't decided whether this magic is good or bad.