Boost
arrow_drop_down
Boost.Foreach
M
D
C++ 03 发布于 Boost 1.34.0
类别:   模拟算法

在 C++ 中,编写一个迭代序列的循环非常繁琐。我们可以使用迭代器,这需要大量的样板代码;或者我们可以使用 std::for_each() 算法,并将循环体移到一个谓词中,这同样需要样板代码,并且迫使我们将逻辑移到远离使用它们的地方。相比之下,像 Perl 这样的其他语言提供了专门的“foreach”构造来自动化这个过程。BOOST_FOREACH 就是 C++ 中这样的构造。它为我们迭代序列,使我们不必直接处理迭代器或编写谓词。

本次发布

Eric Niebler
Eric Niebler
作者

依赖项

⚠️ 此库没有 README.md 或 library-details.adoc;请考虑贡献一个。

全部时间

Beman Dawes
Beman Dawes
贡献者
Daniel James
Daniel James
贡献者
Marshall Clow
Marshall Clow
贡献者
Peter Dimov
Peter Dimov
贡献者
Stephen Kelly
Stephen Kelly
贡献者
John Maddock
John Maddock
贡献者
Troy D. Straszheim
Troy D. Straszheim
贡献者
Michael A. Jackson
Michael A. Jackson
贡献者
Edward Diener
Edward Diener
贡献者
Glen Fernandes
Glen Fernandes
贡献者
nobody
贡献者
Rene Rivera
Rene Rivera
贡献者
Christopher Jefferson
Christopher Jefferson
贡献者
Markus Schöpflin
贡献者
Vladimir Prus
Vladimir Prus
贡献者
David Jenkins
David Jenkins
贡献者
Martin Delille
Martin Delille
贡献者
Tanzinul Islam
Tanzinul Islam
贡献者
Douglas Gregor
Douglas Gregor
贡献者