fix cpp template linux
Merge pull request #6801 from dabingnn/v3_fix_template

[ci skip]fix cpp template linux