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.17.0 |
|---|---|
| target | x86_64-microsoft-win32-msvc14.3 |
| tgt config | windows_10-msvc_17.10-O2 |
| timestamp | 2025-12-20 16:23:19 UTC (02:59:43 hours ago) |
| result | success | log | rebuild |
| toolchain | public-0.17.0 |
|---|---|
| target | x86_64-microsoft-win32-msvc14.3 |
| tgt config | windows_10-msvc_17.10-static_O2 |
| timestamp | 2025-12-20 16:16:06 UTC (03:06:55 hours ago) |
| result | success | log | rebuild |
| toolchain | public-0.17.0 |
|---|---|
| target | x86_64-microsoft-win32-msvc14.3 |
| tgt config | windows_10-msvc_17.10 |
| timestamp | 2025-12-20 16:10:33 UTC (03:12:29 hours ago) |
| result | success | log | rebuild |
| toolchain | public-0.17.0 |
|---|---|
| target | x86_64-linux-gnu |
| tgt config | linux_debian_12-gcc_14-O3 |
| timestamp | 2025-12-20 11:35:19 UTC (07:47:42 hours ago) |
| result | success | log | rebuild |
| toolchain | public-0.17.0 |
|---|---|
| target | x86_64-linux-gnu |
| tgt config | linux_fedora_40-gcc_14-bindist |
| timestamp | 2025-12-20 08:16:19 UTC (11:06:43 hours ago) |
| result | success | log | rebuild |
| toolchain | public-0.17.0 |
|---|---|
| target | x86_64-linux-gnu |
| tgt config | linux_debian_12-gcc_14-static_O3 |
| timestamp | 2025-12-20 01:00:50 UTC (18:22:12 hours ago) |
| result | success | log | rebuild |
| toolchain | public-0.17.0 |
|---|---|
| target | x86_64-linux-gnu |
| tgt config | linux_debian_12-gcc_14-ndebug_O3 |
| timestamp | 2025-12-20 00:56:43 UTC (18:26:19 hours ago) |
| result | success | log | rebuild |
| toolchain | public-0.17.0 |
|---|---|
| target | x86_64-linux-gnu |
| tgt config | linux_debian_12-gcc_14 |
| timestamp | 2025-12-20 00:52:48 UTC (18:30:14 hours ago) |
| result | success | log | rebuild |
| toolchain | public-0.17.0 |
|---|---|
| target | aarch64-linux-gnu |
| tgt config | linux_debian_12-clang_18_libc++-static_O3 |
| timestamp | 2025-12-19 21:28:24 UTC (21:54:38 hours ago) |
| result | success | log | rebuild |
| toolchain | public-0.17.0 |
|---|---|
| target | aarch64-linux-gnu |
| tgt config | linux_debian_12-clang_18_libc++ |
| timestamp | 2025-12-19 21:21:17 UTC (22:01:45 hours ago) |
| result | success | log | rebuild |
| toolchain | public-0.17.0 |
|---|---|
| target | aarch64-linux-gnu |
| tgt config | linux_debian_12-clang_18-O3 |
| timestamp | 2025-12-19 21:18:48 UTC (22:04:14 hours ago) |
| result | success | log | rebuild |
| toolchain | public-0.17.0 |
|---|---|
| target | aarch64-linux-gnu |
| tgt config | linux_debian_12-clang_18_libc++-O3 |
| timestamp | 2025-12-19 21:15:28 UTC (22:07:34 hours ago) |
| result | success | log | rebuild |
| toolchain | public-0.17.0 |
|---|---|
| target | aarch64-linux-gnu |
| tgt config | linux_debian_12-clang_18-static_O3 |
| timestamp | 2025-12-19 21:09:45 UTC (22:13:17 hours ago) |
| result | success | log | rebuild |
| toolchain | public-0.17.0 |
|---|---|
| target | aarch64-linux-gnu |
| tgt config | linux_debian_12-clang_18 |
| timestamp | 2025-12-19 20:55:35 UTC (22:27:27 hours ago) |
| result | success | log | rebuild |
| toolchain | public-0.17.0 |
|---|---|
| target | x86_64-w64-mingw32 |
| tgt config | windows_10-gcc_13.2_mingw_w64-static_O2 |
| timestamp | 2025-12-19 19:08:35 UTC (01 00:14:27 days ago) |
| result | success | log | rebuild |
| toolchain | public-0.17.0 |
|---|---|
| target | x86_64-microsoft-win32-msvc14.3 |
| tgt config | windows_10-clang_18_llvm_msvc_17.10-static_O2 |
| timestamp | 2025-12-19 18:52:34 UTC (01 00:30:28 days ago) |
| result | success | log | rebuild |
| toolchain | public-0.17.0 |
|---|---|
| target | x86_64-microsoft-win32-msvc14.3 |
| tgt config | windows_10-clang_18_llvm_msvc_17.10-O2 |
| timestamp | 2025-12-19 18:51:11 UTC (01 00:31:51 days ago) |
| result | success | log | rebuild |
| toolchain | public-0.17.0 |
|---|---|
| target | x86_64-w64-mingw32 |
| tgt config | windows_10-gcc_13.2_mingw_w64-O2 |
| timestamp | 2025-12-19 18:49:12 UTC (01 00:33:49 days ago) |
| result | success | log | rebuild |
| toolchain | public-0.17.0 |
|---|---|
| target | x86_64-microsoft-win32-msvc14.3 |
| tgt config | windows_10-msvc_17.8-static_O2 |
| timestamp | 2025-12-19 18:39:16 UTC (01 00:43:46 days ago) |
| result | success | log | rebuild |
| toolchain | public-0.17.0 |
|---|---|
| target | x86_64-w64-mingw32 |
| tgt config | windows_10-gcc_13.2_mingw_w64 |
| timestamp | 2025-12-19 18:38:29 UTC (01 00:44:32 days ago) |
| result | success | log | rebuild |
| toolchain | public-0.17.0 |
|---|---|
| target | x86_64-microsoft-win32-msvc14.3 |
| tgt config | windows_10-clang_18_llvm_msvc_17.10 |
| timestamp | 2025-12-19 18:36:54 UTC (01 00:46:08 days ago) |
| result | success | log | rebuild |
| toolchain | public-0.17.0 |
|---|---|
| target | x86_64-microsoft-win32-msvc14.3 |
| tgt config | windows_10-msvc_17.8-O2 |
| timestamp | 2025-12-19 18:35:09 UTC (01 00:47:53 days ago) |
| result | success | log | rebuild |
| toolchain | public-0.17.0 |
|---|---|
| target | x86_64-linux-gnu |
| tgt config | linux_debian_12-gcc_12-bindist |
| timestamp | 2025-12-19 18:32:24 UTC (01 00:50:38 days ago) |
| result | success | log | rebuild |
| toolchain | public-0.17.0 |
|---|---|
| target | x86_64-microsoft-win32-msvc14.3 |
| tgt config | windows_10-clang_17_msvc_msvc_17.10 |
| timestamp | 2025-12-19 18:19:36 UTC (01 01:03:26 days ago) |
| result | success | log | rebuild |
| toolchain | public-0.17.0 |
|---|---|
| target | x86_64-microsoft-win32-msvc14.3 |
| tgt config | windows_10-msvc_17.8 |
| timestamp | 2025-12-19 18:18:18 UTC (01 01:04:44 days ago) |
| result | success | log | rebuild |
| toolchain | public-0.17.0 |
|---|---|
| target | x86_64-linux-gnu |
| tgt config | linux_ubuntu_24.04-gcc_13-bindist |
| timestamp | 2025-12-19 18:03:23 UTC (01 01:19:39 days ago) |
| result | success | log | rebuild |
| toolchain | public-0.17.0 |
|---|---|
| target | x86_64-freebsd13.3 |
| tgt config | freebsd_13-clang_17 |
| timestamp | 2025-12-19 17:56:09 UTC (01 01:26:53 days ago) |
| result | success | log | rebuild |
| toolchain | public-0.17.0 |
|---|---|
| target | x86_64-freebsd14.1 |
| tgt config | freebsd_14-clang_18-static_O3 |
| timestamp | 2025-12-19 17:53:39 UTC (01 01:29:23 days ago) |
| result | success | log | rebuild |
| toolchain | public-0.17.0 |
|---|---|
| target | x86_64-linux-gnu |
| tgt config | linux_debian_12-clang_17 |
| timestamp | 2025-12-19 17:52:26 UTC (01 01:30:36 days ago) |
| result | success | log | rebuild |
| toolchain | public-0.17.0 |
|---|---|
| target | x86_64-linux-gnu |
| tgt config | linux_debian_12-clang_17_libc++ |
| timestamp | 2025-12-19 17:46:12 UTC (01 01:36:49 days ago) |
| result | success | log | rebuild |
| toolchain | public-0.17.0 |
|---|---|
| target | x86_64-freebsd14.1 |
| tgt config | freebsd_14-clang_18-O3 |
| timestamp | 2025-12-19 17:45:44 UTC (01 01:37:18 days ago) |
| result | success | log | rebuild |
| toolchain | public-0.17.0 |
|---|---|
| target | x86_64-freebsd14.1 |
| tgt config | freebsd_14-clang_18 |
| timestamp | 2025-12-19 17:44:21 UTC (01 01:38:41 days ago) |
| result | success | log | rebuild |
| toolchain | public-0.17.0 |
|---|---|
| target | x86_64-linux-gnu |
| tgt config | linux_debian_12-gcc_13.1 |
| timestamp | 2025-12-19 17:43:52 UTC (01 01:39:10 days ago) |
| result | success | log | rebuild |
| toolchain | public-0.17.0 |
|---|---|
| target | aarch64-linux-gnu |
| tgt config | linux_debian_12-gcc_13 |
| timestamp | 2025-12-19 12:40:38 UTC (01 06:42:24 days ago) |
| result | success | log | rebuild |
| toolchain | public-0.17.0 |
|---|---|
| target | aarch64-linux-gnu |
| tgt config | linux_debian_12-clang_17_libc++ |
| timestamp | 2025-12-19 12:38:05 UTC (01 06:44:57 days ago) |
| result | success | log | rebuild |
| toolchain | public-0.17.0 |
|---|---|
| target | aarch64-linux-gnu |
| tgt config | linux_debian_12-clang_17 |
| timestamp | 2025-12-19 09:49:24 UTC (01 09:33:38 days ago) |
| result | success | log | rebuild |
| toolchain | public-0.17.0 |
|---|---|
| target | aarch64-linux-gnu |
| tgt config | linux_debian_12-gcc_14-O3 |
| timestamp | 2025-12-18 03:50:30 UTC (02 15:32:32 days ago) |
| result | success | log | rebuild |
| toolchain | public-0.17.0 |
|---|---|
| target | aarch64-linux-gnu |
| tgt config | linux_debian_12-gcc_14-ndebug_O3 |
| timestamp | 2025-12-18 03:29:25 UTC (02 15:53:37 days ago) |
| result | success | log | rebuild |
| toolchain | public-0.17.0 |
|---|---|
| target | aarch64-linux-gnu |
| tgt config | linux_debian_12-gcc_14-static_O3 |
| timestamp | 2025-12-18 03:21:22 UTC (02 16:01:39 days ago) |
| result | success | log | rebuild |
| toolchain | public-0.17.0 |
|---|---|
| target | aarch64-linux-gnu |
| tgt config | linux_debian_12-gcc_14 |
| timestamp | 2025-12-18 02:58:34 UTC (02 16:24:28 days ago) |
| result | success | log | rebuild |
| toolchain | public-0.17.0 |
|---|---|
| target | x86_64-linux-gnu |
| tgt config | linux_debian_12-clang_18 |
| result | unbuilt |
| toolchain | public-0.17.0 |
|---|---|
| target | x86_64-linux-gnu |
| tgt config | linux_debian_12-clang_18-O3 |
| result | unbuilt |
| toolchain | public-0.17.0 |
|---|---|
| target | x86_64-linux-gnu |
| tgt config | linux_debian_12-clang_18-static_O3 |
| result | unbuilt |
| toolchain | public-0.17.0 |
|---|---|
| target | x86_64-linux-gnu |
| tgt config | linux_debian_12-clang_18_libc++ |
| result | unbuilt |
| toolchain | public-0.17.0 |
|---|---|
| target | x86_64-linux-gnu |
| tgt config | linux_debian_12-clang_18_libc++-O3 |
| result | unbuilt |
| toolchain | public-0.17.0 |
|---|---|
| target | x86_64-linux-gnu |
| tgt config | linux_debian_12-clang_18_libc++-static_O3 |
| result | unbuilt |
| toolchain | public-0.17.0 |
|---|---|
| target | x86_64-linux-gnu |
| tgt config | linux_fedora_39-gcc_13-bindist |
| result | unbuilt |
| toolchain | public-0.17.0 |
|---|---|
| target | x86_64-apple-darwin22.5.0 |
| tgt config | macos_13-clang_15.0 |
| result | unbuilt |
| toolchain | public-0.17.0 |
|---|---|
| target | x86_64-apple-darwin23.5.0 |
| tgt config | macos_14-clang_15.0 |
| result | unbuilt |
| toolchain | public-0.17.0 |
|---|---|
| target | x86_64-apple-darwin23.5.0 |
| tgt config | macos_14-clang_15.0-O3 |
| result | unbuilt |
| toolchain | public-0.17.0 |
|---|---|
| target | x86_64-apple-darwin23.5.0 |
| tgt config | macos_14-clang_15.0-static_O3 |
| result | unbuilt |
| 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) |