为什么我应该使用 Apache C++标准库而不是任何其他 STL 实现以及 Boost?
我从 Apache C++ 标准库 中获得了哪些我无法从编译器附带的 STL 实现中获得的好处以及来自 Boost 库?
What benefits do I get from Apache C++ standard library that I don't get from STL implementations that come with the compiler and from Boost libraries?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(5)
听起来如果您重视极致的便携性,那么这款产品就适合您。如果您不这样做,大多数人都会默认使用其编译器的默认实现,因此如果您遇到麻烦,社区将会更大。如果您没有遇到实施问题,我不明白为什么它会产生很大的影响。
我通常会因为这种观点而受到批评,但我喜欢有一家我可以付费来解决问题的公司的想法,我的开发人员(和我)不够聪明(或没有时间)深入研究内部结构并修复错误。
Sounds like if you value extreme portability this is for you. If you don't, most everyone defaults to their compiler's default implementation, so if you ever have trouble, the community will be bigger. If you don't run into implementation issues I don't see why it should make much of a difference.
I typically get flamed for this opinion but I like the idea of having a company I can pay to fix problems, my developers (and I) aren't smart enough (or don't have the time) to dive into internals and fix bugs.
stdxx
声称的优点之一对我来说似乎是正确的:在本文中,Stroustrup 讨论了一些 C++ 编译器中应用的新想法,称为
可怕
。我第一次在他的一篇论文中读到它。无论如何,此功能可以将生成的可执行文件大小大幅减少(~1x - ~25x)
,并且速度加快(~1.2x - ~2.1x)
。在第一篇论文中,他说 Rogue Wave STL 支持 SCARY,至少在现代实现中是这样:因此,如果
stdxx
基于Rogue Wave STL
,它可能已经实现了这个想法。One of the advantages that
stdxx
claims seems to be true to me:In this paper, Stroustrup talks about a new idea applied in some C++ compilers called
SCARY
. I first read about it in one of his papers. Anyway, this feature allows reducing produced executables size by a great amount(~1x - ~25x)
, and faster by(~1.2x - ~2.1x)
. In the first paper, he said thatRogue Wave STL
supportsSCARY
, at least in modern implementations:So, if
stdxx
is based onRogue Wave STL
, it might have this idea implemented already.不幸的是,自 2013 年 7 月起,该库不再受支持。请参阅邮件列表公告:http://mail-archives.apache.org/mod_mbox/stdcxx-dev/201307.mbox/browser
Unfortunately this library is no longer supported as of July 2013. See the mailing list announcement: http://mail-archives.apache.org/mod_mbox/stdcxx-dev/201307.mbox/browser
Apache C++ 库最初是 Rogue Wave 的商业库。他们声称正在密切跟踪 C++ 标准,并努力确保跨各种操作系统和编译器的可移植性。 Rogue Wave 库声称已移植到 40 多个编译器。
Apache C++ library was originally a commercial library from Rogue Wave. They claim to be tracking the C++ standard very closely and working hard to insure portability across various operating systems and compilers. The Rogue Wave library claimed to have been ported to over 40 compilers.
我对 Apache C++ 标准库不熟悉,所以我不确定它有什么设施。如果您发现它提供了您需要的一切,那么使用它或与 Boost 一起使用另一个 STL 实现并没有太大区别。然而,Boost 提供的不仅仅是一些 TR1 功能和智能指针等小功能。它还具有:
这一切都取决于你需要的设施。
I am not familiar with the Apache C++ Standard Library, so I'm not sure what facilities it has. If you find that it provides everything that you need, then there is not much of a difference using that or using another STL implementation alongside Boost. However, Boost provides a lot more than some TR1 features and little things like smart pointers. It also has:
It all depends on the facilities that you need.