Add template constraint.