In C++, writing a loop that iterates over a sequence is tedious. We can either use iterators, which requires a considerable amount of boiler-plate, or we can use the std::for_each() algorithm and move our loop body into a predicate, which requires no less boiler-plate and forces us to move our logic far from where it will be used. In contrast, some other languages, like Perl, provide a dedicated "foreach" construct that automates this process. BOOST_FOREACH is just such a construct for C++. It iterates over sequences for us, freeing us from having to deal directly with iterators or write predicates
| version | 1.83.0 |
|---|---|
| license | BSL-1.0Boost Software License 1.0 |
| repository | https://pkg.cppget.org/1/stable |
| download | libboost-foreach-1.83.0.tar.gz |
| sha256 | 480c9ebc6a7ced5c524ac93ff94be419975bc9d8ae510959ee97a6b67778584f |
| project | boost |
|---|---|
| url | github.com/boostorg/foreach |
| doc-url | www.boost.org/doc/libs/1_83_0/libs/foreach |
| package-url | github.com/build2-packaging/boost |
| boost-users@lists.boost.orgMailing list | |
| package-email | packaging@build2.orgMailing list |
| topics | C++Boost |
Depends (6)
| libboost-config == 1.83.0 | |
| libboost-core == 1.83.0 | |
| libboost-iterator == 1.83.0 | |
| libboost-mpl == 1.83.0 | |
| libboost-range == 1.83.0 | |
| libboost-type-traits == 1.83.0 |
Reviews
| fail | 0 |
|---|---|
| pass | 1 |
Builds
| toolchain | public-0.18.1 |
|---|---|
| target | x86_64-linux-gnu |
| tgt config | linux_fedora_44-gcc_16-bindist |
| timestamp | 2026-05-19 00:23:18 UTC (19:16:11 hours ago) |
| result | success | log | rebuild |
| toolchain | public-0.18.1 |
|---|---|
| target | x86_64-apple-darwin23.5.0 |
| tgt config | macos_14-clang_15.0-static_O3 |
| timestamp | 2026-05-14 21:52:31 UTC (04 21:46:58 days ago) |
| result | success | log | rebuild |
| toolchain | public-0.18.1 |
|---|---|
| target | x86_64-apple-darwin23.5.0 |
| tgt config | macos_14-clang_15.0-O3 |
| timestamp | 2026-05-14 21:49:10 UTC (04 21:50:19 days ago) |
| result | success | log | rebuild |
| toolchain | public-0.18.1 |
|---|---|
| target | x86_64-apple-darwin23.5.0 |
| tgt config | macos_14-clang_15.0 |
| timestamp | 2026-05-14 21:45:49 UTC (04 21:53:40 days ago) |
| result | success | log | rebuild |
| toolchain | public-0.18.1 |
|---|---|
| target | x86_64-linux-gnu |
| tgt config | linux_fedora_43-gcc_15-bindist |
| timestamp | 2026-05-14 19:07:40 UTC (05 00:31:48 days ago) |
| result | success | log | rebuild |
| toolchain | public-0.18.1 |
|---|---|
| target | x86_64-linux-gnu |
| tgt config | linux_debian_13-clang_22_libc++-static_O3 |
| timestamp | 2026-05-14 18:22:21 UTC (05 01:17:08 days ago) |
| result | success | log | rebuild |
| toolchain | public-0.18.1 |
|---|---|
| target | x86_64-linux-gnu |
| tgt config | linux_debian_13-clang_22_libc++-O3 |
| timestamp | 2026-05-14 18:21:56 UTC (05 01:17:33 days ago) |
| result | success | log | rebuild |
| toolchain | public-0.18.1 |
|---|---|
| target | x86_64-linux-gnu |
| tgt config | linux_debian_13-clang_22_libc++ |
| timestamp | 2026-05-14 18:20:54 UTC (05 01:18:35 days ago) |
| result | success | log | rebuild |
| toolchain | public-0.18.1 |
|---|---|
| target | x86_64-linux-gnu |
| tgt config | linux_debian_13-clang_22-static_O3 |
| timestamp | 2026-05-14 18:20:26 UTC (05 01:19:03 days ago) |
| result | success | log | rebuild |
| toolchain | public-0.18.1 |
|---|---|
| target | x86_64-linux-gnu |
| tgt config | linux_debian_13-clang_22-O3 |
| timestamp | 2026-05-14 18:19:48 UTC (05 01:19:40 days ago) |
| result | success | log | rebuild |
| toolchain | public-0.18.1 |
|---|---|
| target | x86_64-linux-gnu |
| tgt config | linux_debian_13-clang_22 |
| timestamp | 2026-05-14 18:18:47 UTC (05 01:20:42 days ago) |
| result | success | log | rebuild |
| toolchain | public-0.18.1 |
|---|---|
| target | x86_64-linux-gnu |
| tgt config | linux_debian_13-gcc_16-ndebug_O3 |
| timestamp | 2026-05-14 15:45:00 UTC (05 03:54:29 days ago) |
| result | success | log | rebuild |
| toolchain | public-0.18.1 |
|---|---|
| target | x86_64-linux-gnu |
| tgt config | linux_debian_13-gcc_16-static_O3 |
| timestamp | 2026-05-14 15:44:34 UTC (05 03:54:55 days ago) |
| result | success | log | rebuild |
| toolchain | public-0.18.1 |
|---|---|
| target | x86_64-linux-gnu |
| tgt config | linux_debian_13-gcc_16-O3 |
| timestamp | 2026-05-14 15:43:20 UTC (05 03:56:09 days ago) |
| result | success | log | rebuild |
| toolchain | public-0.18.1 |
|---|---|
| target | x86_64-linux-gnu |
| tgt config | linux_debian_13-gcc_16 |
| timestamp | 2026-05-14 15:42:35 UTC (05 03:56:54 days ago) |
| result | success | log | rebuild |
| toolchain | public-0.18.1 |
|---|---|
| target | aarch64-linux-gnu |
| tgt config | linux_debian_12-clang_18_libc++-static_O3 |
| timestamp | 2026-05-14 13:57:15 UTC (05 05:42:14 days ago) |
| result | success | log | rebuild |
| toolchain | public-0.18.1 |
|---|---|
| target | aarch64-linux-gnu |
| tgt config | linux_debian_12-clang_18_libc++-O3 |
| timestamp | 2026-05-14 13:56:56 UTC (05 05:42:33 days ago) |
| result | success | log | rebuild |
| toolchain | public-0.18.1 |
|---|---|
| target | aarch64-linux-gnu |
| tgt config | linux_debian_12-clang_18_libc++ |
| timestamp | 2026-05-14 13:55:17 UTC (05 05:44:12 days ago) |
| result | success | log | rebuild |
| toolchain | public-0.18.1 |
|---|---|
| target | aarch64-linux-gnu |
| tgt config | linux_debian_12-clang_18-static_O3 |
| timestamp | 2026-05-14 13:54:52 UTC (05 05:44:37 days ago) |
| result | success | log | rebuild |
| toolchain | public-0.18.1 |
|---|---|
| target | aarch64-linux-gnu |
| tgt config | linux_debian_12-clang_18-O3 |
| timestamp | 2026-05-14 13:53:27 UTC (05 05:46:01 days ago) |
| result | success | log | rebuild |
| toolchain | public-0.18.1 |
|---|---|
| target | aarch64-linux-gnu |
| tgt config | linux_debian_12-clang_18 |
| timestamp | 2026-05-14 13:52:47 UTC (05 05:46:42 days ago) |
| result | success | log | rebuild |
| toolchain | public-0.18.1 |
|---|---|
| target | x86_64-linux-gnu |
| tgt config | linux_debian_13-clang_21_libc++ |
| timestamp | 2026-05-14 12:55:06 UTC (05 06:44:23 days ago) |
| result | success | log | rebuild |
| toolchain | public-0.18.1 |
|---|---|
| target | x86_64-linux-gnu |
| tgt config | linux_debian_13-clang_21 |
| timestamp | 2026-05-14 12:54:39 UTC (05 06:44:49 days ago) |
| result | success | log | rebuild |
| toolchain | public-0.18.1 |
|---|---|
| target | x86_64-linux-gnu |
| tgt config | linux_debian_13-gcc_15-O3 |
| timestamp | 2026-05-14 12:50:25 UTC (05 06:49:03 days ago) |
| result | success | log | rebuild |
| toolchain | public-0.18.1 |
|---|---|
| target | x86_64-linux-gnu |
| tgt config | linux_debian_13-gcc_15 |
| timestamp | 2026-05-14 12:50:23 UTC (05 06:49:06 days ago) |
| result | success | log | rebuild |
| toolchain | public-0.18.1 |
|---|---|
| target | x86_64-apple-darwin22.5.0 |
| tgt config | macos_13-clang_15.0 |
| timestamp | 2026-05-14 12:41:26 UTC (05 06:58:03 days ago) |
| result | success | log | rebuild |
| toolchain | public-0.18.1 |
|---|---|
| target | x86_64-linux-gnu |
| tgt config | linux_debian_13-gcc_14-bindist |
| timestamp | 2026-05-14 12:36:48 UTC (05 07:02:41 days ago) |
| result | success | log | rebuild |
| toolchain | public-0.18.1 |
|---|---|
| target | x86_64-freebsd15.0 |
| tgt config | freebsd_15-clang_19-O3 |
| timestamp | 2026-05-14 12:35:32 UTC (05 07:03:57 days ago) |
| result | success | log | rebuild |
| toolchain | public-0.18.1 |
|---|---|
| target | x86_64-linux-gnu |
| tgt config | linux_ubuntu_24.04-gcc_13-bindist |
| timestamp | 2026-05-14 12:34:51 UTC (05 07:04:38 days ago) |
| result | success | log | rebuild |
| toolchain | public-0.18.1 |
|---|---|
| target | x86_64-freebsd15.0 |
| tgt config | freebsd_15-clang_19-static_O3 |
| timestamp | 2026-05-14 12:34:04 UTC (05 07:05:25 days ago) |
| result | success | log | rebuild |
| toolchain | public-0.18.1 |
|---|---|
| target | x86_64-freebsd15.0 |
| tgt config | freebsd_15-clang_19 |
| timestamp | 2026-05-14 12:33:57 UTC (05 07:05:31 days ago) |
| result | success | log | rebuild |
| toolchain | public-0.18.1 |
|---|---|
| target | x86_64-freebsd14.1 |
| tgt config | freebsd_14-clang_18 |
| timestamp | 2026-05-14 12:32:38 UTC (05 07:06:51 days ago) |
| result | success | log | rebuild |
| toolchain | public-0.18.1 |
|---|---|
| target | aarch64-linux-gnu |
| tgt config | linux_debian_12-gcc_14-static_O3 |
| timestamp | 2026-05-14 06:21:42 UTC (05 13:17:47 days ago) |
| result | success | log | rebuild |
| toolchain | public-0.18.1 |
|---|---|
| target | aarch64-linux-gnu |
| tgt config | linux_debian_12-gcc_14-ndebug_O3 |
| timestamp | 2026-05-14 06:21:12 UTC (05 13:18:17 days ago) |
| result | success | log | rebuild |
| toolchain | public-0.18.1 |
|---|---|
| target | aarch64-linux-gnu |
| tgt config | linux_debian_12-gcc_14-O3 |
| timestamp | 2026-05-14 06:19:30 UTC (05 13:19:59 days ago) |
| result | success | log | rebuild |
| toolchain | public-0.18.1 |
|---|---|
| target | aarch64-linux-gnu |
| tgt config | linux_debian_12-gcc_14 |
| timestamp | 2026-05-14 06:19:05 UTC (05 13:20:24 days ago) |
| result | success | log | rebuild |
| toolchain | public-0.18.1 |
|---|---|
| target | aarch64-linux-gnu |
| tgt config | linux_debian_12-gcc_13 |
| timestamp | 2026-05-13 16:30:21 UTC (06 03:09:08 days ago) |
| result | success | log | rebuild |
| toolchain | public-0.18.1 |
|---|---|
| target | x86_64-microsoft-win32-msvc14.5 |
| tgt config | windows_10-msvc_18-static_O2 |
| timestamp | 2026-05-11 15:15:08 UTC (08 04:24:21 days ago) |
| result | success | log | rebuild |
| toolchain | public-0.18.1 |
|---|---|
| target | x86_64-microsoft-win32-msvc14.5 |
| tgt config | windows_10-msvc_18-O2 |
| timestamp | 2026-05-11 15:15:03 UTC (08 04:24:26 days ago) |
| result | success | log | rebuild |
| toolchain | public-0.18.1 |
|---|---|
| target | x86_64-microsoft-win32-msvc14.5 |
| tgt config | windows_10-msvc_18 |
| timestamp | 2026-05-11 15:14:40 UTC (08 04:24:49 days ago) |
| result | success | log | rebuild |
| toolchain | public-0.18.1 |
|---|---|
| target | x86_64-microsoft-win32-msvc14.5 |
| tgt config | windows_10-clang_21_msvc_18-static_O2 |
| timestamp | 2026-05-11 15:14:27 UTC (08 04:25:02 days ago) |
| result | success | log | rebuild |
| toolchain | public-0.18.1 |
|---|---|
| target | x86_64-microsoft-win32-msvc14.5 |
| tgt config | windows_10-clang_21_msvc_18-O2 |
| timestamp | 2026-05-11 15:14:19 UTC (08 04:25:09 days ago) |
| result | success | log | rebuild |
| toolchain | public-0.18.1 |
|---|---|
| target | x86_64-microsoft-win32-msvc14.5 |
| tgt config | windows_10-clang_21_msvc_18 |
| timestamp | 2026-05-11 15:14:04 UTC (08 04:25:25 days ago) |
| result | success | log | rebuild |
| toolchain | public-0.18.1 |
|---|---|
| target | x86_64-microsoft-win32-msvc14.3 |
| tgt config | windows_10-msvc_17 |
| timestamp | 2026-05-11 10:24:05 UTC (08 09:15:24 days ago) |
| result | success | log | rebuild |
| toolchain | public-0.18.1 |
|---|---|
| target | x86_64-w64-mingw32 |
| tgt config | windows_10-gcc_15.2_mingw_w64-static_O2 |
| timestamp | 2026-05-08 17:58:25 UTC (11 01:41:04 days ago) |
| result | success | log | rebuild |
| toolchain | public-0.18.1 |
|---|---|
| target | x86_64-w64-mingw32 |
| tgt config | windows_10-gcc_15.2_mingw_w64-O2 |
| timestamp | 2026-05-08 17:56:48 UTC (11 01:42:41 days ago) |
| result | success | log | rebuild |
| toolchain | public-0.18.1 |
|---|---|
| target | x86_64-w64-mingw32 |
| tgt config | windows_10-gcc_15.2_mingw_w64 |
| timestamp | 2026-05-08 17:56:29 UTC (11 01:43:00 days ago) |
| result | success | log | rebuild |
| toolchain | public-0.18.1 |
|---|---|
| target | x86_64-linux-gnu |
| tgt config | linux_ubuntu_26.04-gcc_15-bindist |
| timestamp | 2026-05-08 15:17:02 UTC (11 04:22:26 days ago) |
| result | success | log | rebuild |
| target | x86_64-apple-darwin23.5.0 |
|---|---|
| tgt config | macos_14-gcc_14_homebrew |
| result | excluded (https://github) |
| target | x86_64-apple-darwin23.5.0 |
|---|---|
| tgt config | macos_14-gcc_14_homebrew-O3 |
| result | excluded (https://github) |
| target | x86_64-apple-darwin23.5.0 |
|---|---|
| tgt config | macos_14-gcc_14_homebrew-static_O3 |
| result | excluded (https://github) |