write out template at compile-time