Templates struct for recursively building templates