Removed some uses of typename outside of template.
Merge branch 'v1.5.x' into sam_827