Template within template: why “`>>' should be `> >' within a nested template argument list” 解决方法

来源:互联网 发布:淘宝店铺装修购买 编辑:程序博客网 时间:2024/05/19 17:10

如果直接这样写:

vector<pair<string, int>> word;

gcc编译器会把">>"当成operator,报错:boost vector  error: ‘>>’ should be ‘> >’ within a nested template argument list

 

正确做法是加上空格: “ ”

vector<pair<string, int> > word;
0 0
原创粉丝点击