Template within template: why “`>>' should be `> >' within a nested template argument list” 解决方法
2013-08-11 16:16
471 查看
如果直接这样写:
gcc编译器会把">>"当成operator,报错:boost vector error: ‘>>’ should be ‘> >’ within a nested template argument list
正确做法是加上空格:
不过VS2010测试下不加空格也可以的。
std::vector<boost::shared_ptr<int>> intvec;
gcc编译器会把">>"当成operator,报错:boost vector error: ‘>>’ should be ‘> >’ within a nested template argument list
正确做法是加上空格:
std::vector<boost::shared_ptr<int> > intvec;
不过VS2010测试下不加空格也可以的。
相关文章推荐
- Template within template: why “`>>' should be `> >' within a nested template argument list” 解决方法
- 在Linux C++中要区分”>>" 和"> >" ——`>>' should be `> >' within a nested template argument list
- error: '>>' should be '> >' within a nested template argument list| C++ Dev
- error: '>>' should be '> >' within a nested template argument list
- error: '>>' should be '> >' within a nested template argument list|
- '>>' should be '> >' within a nested template argument list
- error:'>>' should be '> >' within a nested template argument list
- AsParallel \AsQueryable<T>().ToList() [System.ArgumentOutOfRangeException was unhandled" 索引超出范围。必须为非负值并小于集合大小]解决方法
- 【已解决】Discuz自定义表情后出现array_slice() [function.array-slice]: The first argument should be an array……的解决方法
- linux error: ‘>>’ should be ‘> >’ within a nested template argument list
- Table '' is marked as crashed and should be repaired 解决方法
- C++编译出错——1 '>>' should be '> >' within a nested template argument list
- Environment error: "JAVA_HOME" should not be defined. 错误解决方法
- ORACLE用SYS登录报ORA-28009:connection as SYS should be as SYSDBA OR SYSOPER解决方法
- ECShop出现Strict Standards: Only variables should be passed by reference in的解决方法
- This Handler class should be static or leaks might occur 解决方法
- 错误:The project cannot be built until build path errors are resolved 和 Unbound classpath container: 'JRE System Library [JavaSE-1.7]' in project 'MyJavaCode'的解决方法
- handler 警告This Handler class should be static or leaks might occur 的回调解决方法
- ORACLE用SYS登录报ORA-28009:connection as SYS should be as SYSDBA OR SYSOPER解决方法
- Linux下通过rm -f删除大量文件时提示"-bash: /bin/rm: Argument list too long"的解决方法