模板特例化 template<>

有时候会报这种错误:[Error] an explicit specialization must be preceded by 'template <>'。

 

然后就需要加上template<>。

就是为了对于特定类型来执行不同的代码,而不是去用通用模板。

猜你喜欢

转载自blog.csdn.net/weixin_62264287/article/details/125393394
今日推荐