cannot appear in a constant-expression

来源:互联网 发布:下载高品质音乐的软件 编辑:程序博客网 时间:2024/05/22 14:36



mapXXX.insert(std::pair<string, std::vector<int>>('hello', xxx));

总是报  cannot appear in  a constant-expression 的错误。


其实在最下面还有个错误  ‘>>’ should be '> >' within a nested template argument list


最后面这个指出了错误个根源,

即嵌套的模板中,最后面的两个尖括号不能挨着写。。。。。。

原创粉丝点击