fix the compile error by add template parameters
Merge pull request #1013 from Tonsty/master

fix the compile error by add template parameters