开发者

Which is the default C++0x mode in Visual C++ 2010 Express?

I have just installed Visual C++ 2010 Express and I have the impression that the default mode includes C++0x features and the std::tr1 library.

error C2872: 'is_same' : ambiguous symbol
        could be 'C:\Program Files\Microsoft Visual Studio 10.0\VC\INCLUDE\type_traits(941) : std::tr1::is_same'

Could you confirm that? If this is the case, is there some way to disable the default settings?

Why the tr1 symbols are visible? is there a using inside the MS he开发者_Python百科aders?


YES : VC10 provide some C++0x featrues (auto, decltype, r-value reference, etc) and std::tr1 inside std namespace and it's not optional AFAIK.

However, you can still use VS2010 with VC9 (that don't have those features) if you have it installed too. To do this, just change the compiler version in the project setting from 100 (vc10) to 90 (vc9). In this context, std::tr1 will be available in std::tr1 namespace.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜