使用经过检查的 STL 实现,有什么可以免费使用的吗?

发布于 2024-08-27 21:18:35 字数 97 浏览 4 评论 0原文

  1. 您是否使用过经过检查的 STL 实现?
  2. 它是否发现了您没有预料到的错误?
  3. 有没有可以在 Linux 上免费试用的软件?
  1. Have you used a checked STL implementation?
  2. Did it find bugs you were not expecting?
  3. Is there one I can try on Linux for free?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

天邊彩虹 2024-09-03 21:18:35

GCC 附带的标准 C++ 库的 GNU 实现已经检查了 STL。只需将 -D_GLIBCXX_DEBUG 添加到命令行即可。

是的,我用过。我不能肯定地说它是否捕获了错误,但它让我更有信心不会错过某些类别的错误。

由于性能开销,我们仅使用经过检查的 STL 进行调试构建。

The GNU implementation of the standard C++ library that comes with GCC has checked STL. Just add -D_GLIBCXX_DEBUG to your command line.

Yes, I've used it. I can't say for sure if it's caught bugs but it gives me more confidence that certain classes of bugs aren't being missed.

Because of performance overhead, we only use checked STL for debug builds.

つ低調成傷 2024-09-03 21:18:35

我从来没有使用过它,但快速搜索显示 STLPort 在 检查了迭代器调试模式。

I have not used it ever, but a quick search shows that STLPort has checked iterators in DEBUG mode.

入画浅相思 2024-09-03 21:18:35
  1. 微软的VC++实现了检查。
  2. 它可以轻松捕获迭代器引用其所属 STL 容器的内存越界的位置。
  3. 我不确定,但我认为你应该尝试 Boost C++ 库。它具有多种功能,包括概念检查等。哎呀,它成为了 C++0x 标准的基础!
  1. Microsoft's VC++ implements checking.
  2. It easily catches places where iterators refer to memory out-of-bounds of the STL container to which it belongs.
  3. I'm not sure, but I think you should try the Boost C++ library. It has myriad variety of features including concept checking, etc. Heck, its become the basis for the C++0x standard!
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文