C++ Boost:BOOST_FOREACH 有什么问题吗?

2021-12-24 00:00:00 loops c++ boost

这是给 Boost 专家的.在程序员进入并用看起来精益求精的BOOST_FOREACH替换所有旧的C/C++风格循环之前,是否有任何问题或细节需要注意?

This one is for Boost experts. Are there any gotchas or details that the programmer needs to be aware of before he goes in and replaces all his old C/C++ style loops with the lean-and-mean-looking BOOST_FOREACH?

(此问题部分源自此处.)

推荐答案

看一看:

  • 有条件的爱文章,了解基本原理
  • 文档的陷阱部分
  • 可移植性部分就在如果您正在开发跨平台产品
  • BOOST_FOREACH
  • The Conditional Love article for an understanding of the rationale
  • The Pitfalls section of documentation
  • The Portability section just in case you are developing cross-platform products
  • The bugs page for BOOST_FOREACH

相关文章