简体   繁体   English

对即将推出的 C++0x 的编译器支持

[英]Compiler support for upcoming C++0x

Is there a compiler that has good support for the new C++0x?是否有对新 C++0x 有良好支持的编译器?

I use GCC but unfortunately the current version 4.4 has a poor support for the new features.我使用 GCC,但不幸的是当前版本 4.4 对新功能的支持很差。

The Apache Standard C++ Library project maintains a wiki page of major compilers' C++0x support . Apache 标准 C++ 库项目维护主要编译器的 C++0x 支持的 wiki 页面

Here are links to the vendors' pages describing their C++0x support:以下是供应商页面的链接,这些页面描述了他们的 C++0x 支持:

I'm afraid gcc is probably the best you're going to get at this stage.恐怕 gcc 可能是你在这个阶段会得到的最好的。

There's a list of features and supported compilers here:这里有一个特性列表和支持的编译器:

http://wiki.apache.org/stdcxx/C++0xCompilerSupport http://wiki.apache.org/stdcxx/C++0xCompilerSupport

The only compiler that has an implementation of concepts is conceptgcc (and even that is incomplete - but it is good enough to get a good feel for the feature).唯一实现了概念的编译器是conceptgcc(即使它是不完整的——但它足以让你对这个特性有一个好的感觉)。
Visual C++ 2010 Beta has some useful C++0x support - you can play with lambdas, rvalue references, auto, decltype. Visual C++ 2010 Beta 有一些有用的 C++0x 支持——您可以使用 lambda、右值引用、auto、decltype。
Comeau C++ or the EDG based compilers are surprisingly not as advanced I would have expected them to be in their implementation of C++0x. Comeau C++ 或基于 EDG 的编译器出人意料地没有我预期它们在 C++0x 实现中的先进程度。
GCC 4.4 (variadic templates, initializer lists, inline namespaces, autor, decltype) probably has the most features implemented out of any of the other compilers, but is lagging in concepts and lambdas (separate branch development is ongoing). GCC 4.4(可变参数模板、初始化列表、内联命名空间、autor、decltype)可能在任何其他编译器中实现了最多的功能,但在概念和 lambdas 方面落后(单独的分支开发正在进行中)。

Scott Meyers has a nice and detailed comparison here: Scott Meyers 在这里进行了详细的比较:

http://www.aristeia.com/C++0x/C++0xFeatureAvailability.htm http://www.aristeia.com/C++0x/C++0xFeatureAvailability.htm

GCC 4.6, released 3/25/11, supports most of the non-concurrency-related features of C++0x . 2011 年 3 月 25 日发布的 GCC 4.6 支持C++0x 的大部分非并发相关特性 Now that C++0x is no longer in flux compiler support may progress a little more quickly.现在 C++0x 不再处于不断变化的编译器支持中,可能会进展得更快一些。

Comeau 编译器的当前beta 版本似乎具有良好的 C++0x 支持。

GCC 4.4 does at least have some of the cool features ( auto , variadic templates, rvalue references, etc.). GCC 4.4 至少有一些很酷的特性( auto 、可变参数模板、右值引用等)。 There are also development branches for concepts and lambdas.还有概念和 lambda 的开发分支。

See C++0x support in GCC .请参阅GCC 中的 C++0x 支持

C++0x is still not ready, so don't expect to have it supported atm. C++0x 还没有准备好,所以不要指望它支持 atm。 GCC 4.4 and Visual C++ 2010 are good candidates (they have some of the most anticipated new feautres like lambdas and auto) that get you started, but the standard isn't finished yet. GCC 4.4 和Visual C++ 2010是很好的候选(它们有一些最受期待的新功能,如 lambdas 和 auto),可以帮助您入门,但标准尚未完成。

如果你在 linux/unix 上,我推荐英特尔编译器,它比 GCC 得到更好的支持并且生成更快/更小的二进制文件(我通常使用它可以获得 10% 的免费性能提升)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM