context-length is a template function