嵌套模板vs移位运算符 [英] Nested templates vs shift operator

查看:113
本文介绍了嵌套模板vs移位运算符的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我一直在阅读所有关于>> 作为嵌套模板的结尾和>> as shift operator ...



现在我已经在我的MSVS2010中尝试过了,没有问题。



std :: map< int,std :: pair< int,int>> m;



这段代码正好是我想要的(对的映射),但我应该得到一些关于

解决方案

MSVC ++ 2010支持C ++ 0x功能直角括号


I have been reading all around about be aware >> as ending of nested template and >> as shift operator...

Now I have tried it in my MSVS2010 and no problem occured.

std::map<int, std::pair<int, int>> m;

This code works exactly what I want (map of pairs) but I supposed to get some error about >>

Compiler is smarter these days?

解决方案

MSVC++2010 supports C++0x feature Right Angle Brackets

这篇关于嵌套模板vs移位运算符的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆