Expand templates

From LHDB
Expand templates