range-v3/0.11.0

[brief]

Range library for C++14/17/20.

Range library for C++14/17/20. This code was the basis of a formal proposal to add range support to the C++ standard library. That proposal evolved through a Technical Specification, and finally into P0896R4 "The One Ranges Proposal" which was merged into the C++20 working drafts in November 2018.

About:

Ranges are an extension of the Standard Template Library that makes its iterators and algorithms more powerful by making them composable. Unlike other range-like solutions which seek to do away with iterators, in range-v3 ranges are an abstration layer on top of iterators.

Range-v3 is built on three pillars: Views, Actions, and Algorithms. The algorithms are the same as those with which you are already familiar in the STL, except that in range-v3 all the algorithms have overloads that take ranges in addition to the overloads that take iterators. Views are composable adaptations of ranges where the adaptation happens lazily as the view is iterated. And an action is an eager application of an algorithm to a container that mutates the container in-place and returns it for further processing.

Views and actions use the pipe syntax (e.g., rng | adapt1 | adapt2 | ...) so your code is terse and readable from left to right.

Documentation:

Check out the (woefully incomplete) documentation here.

Other resources (mind the dates, the library probably has changed since then):

License:

Most of the source code in this project are mine, and those are under the Boost Software License. Parts are taken from Alex Stepanov's Elements of Programming, Howard Hinnant's libc++, and from the SGI STL. Please see the attached LICENSE file and the CREDITS file for the licensing and acknowledgments.

Supported Compilers

The code is known to work on the following compilers:

Development Status: This code is fairly stable, well-tested, and suitable for casual use, although currently lacking documentation. In general, no promise is made about support or long-term stability. This code will evolve without regard to backwards compatibility.

A notable exception is anything found within the ranges::cpp20 namespace. Those components will change rarely or (preferably) never at all.

Build status

Building range-v3 - Using vcpkg

You can download and install range-v3 using the vcpkg dependency manager:

git clone https://github.com/Microsoft/vcpkg.git
cd vcpkg
./bootstrap-vcpkg.sh
./vcpkg integrate install
./vcpkg install range-v3

The range-v3 port in vcpkg is kept up to date by Microsoft team members and community contributors. If the version is out of date, please create an issue or pull request on the vcpkg repository.

Building range-v3 - Using Conan

You can download and install range-v3 using the Conan dependency manager.

Setup your CMakeLists.txt (see Conan documentation on how to use MSBuild, Meson and others):

project(myproject CXX)

add_executable(${PROJECT_NAME} main.cpp)

include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) # Include Conan-generated file
conan_basic_setup(TARGETS) # Introduce Conan-generated targets

target_link_libraries(${PROJECT_NAME} CONAN_PKG::range-v3)

Create conanfile.txt in your source dir:

[requires]
range-v3/0.10.0

[generators]
cmake

Install and run conan, then build your project as always:

pip install conan
mkdir build
cd build
conan install ../ --build=missing
cmake ../
cmake --build .

Say Thanks!

I do this work because I love it and because I love C++ and want it to be as excellent as I know it can be. If you like my work and are looking for a way to say thank you, you can leave a supportive comment on my blog. Or you could leave me some kudos on my Open Hub range-v3 contribution page. Just click the Give Kudos button here.

version 0.11.0
license Boost Software License
repository https://pkg.cppget.org/1/alpha
download range-v3-0.11.0.tar.gz
sha256 e78cb96a2f06db1c7556cd17d14dfde380d08f7de5cdf7be5aaa7168d8ff8b2d
project range-v3
url github.com/ericniebler/range-v3
package-url github.com/build2-packaging/range-v3
package-email mjklaim@gmail.com

Requires (1)

c++14 | c++17 | c++20

Builds

toolchain public-0.16.0
target x86_64-linux-gnu
tgt config linux_debian_12-clang_15.0_libc++
timestamp 2024-03-28 10:29:55 UTC (02:27:50 hours ago)
result error (update) | log | rebuild
toolchain public-0.16.0
target x86_64-linux-gnu
tgt config linux_debian_12-clang_15.0
timestamp 2024-03-28 10:29:20 UTC (02:28:24 hours ago)
result error (update) | log | rebuild
toolchain public-0.16.0
target x86_64-linux-gnu
tgt config linux_fedora_37-gcc_12.2-bindist
timestamp 2024-03-27 12:39:42 UTC (01 00:18:02 days ago)
result warning (update) | log | rebuild
toolchain public-0.16.0
target x86_64-linux-gnu
tgt config linux_debian_12-gcc_12-bindist
timestamp 2024-03-27 12:16:38 UTC (01 00:41:06 days ago)
result warning (update) | log | rebuild
toolchain public-0.16.0
target x86_64-apple-darwin22.5.0
tgt config macos_13-gcc_13_homebrew-static_O3
timestamp 2024-03-27 11:55:32 UTC (01 01:02:12 days ago)
result error (update) | log | rebuild
toolchain public-0.16.0
target x86_64-apple-darwin22.5.0
tgt config macos_13-gcc_13_homebrew-O3
timestamp 2024-03-27 11:53:52 UTC (01 01:03:52 days ago)
result error (update) | log | rebuild
toolchain public-0.16.0
target x86_64-apple-darwin22.5.0
tgt config macos_13-gcc_13_homebrew
timestamp 2024-03-27 11:52:19 UTC (01 01:05:26 days ago)
result error (update) | log | rebuild
toolchain public-0.16.0
target x86_64-apple-darwin22.5.0
tgt config macos_13-clang_14.0-O3
timestamp 2024-03-27 11:28:11 UTC (01 01:29:34 days ago)
result error (update) | log | rebuild
toolchain public-0.16.0
target x86_64-linux-gnu
tgt config linux_debian_11-gcc_12.1
timestamp 2024-03-27 11:23:56 UTC (01 01:33:49 days ago)
result warning (update) | log | rebuild
toolchain public-0.16.0
target x86_64-apple-darwin22.5.0
tgt config macos_13-clang_14.0
timestamp 2024-03-27 11:22:53 UTC (01 01:34:51 days ago)
result error (update) | log | rebuild
toolchain public-0.16.0
target x86_64-linux-gnu
tgt config linux_debian_12-clang_16.0-static_O3
timestamp 2024-03-27 11:13:57 UTC (01 01:43:48 days ago)
result error (update) | log | rebuild
toolchain public-0.16.0
target x86_64-apple-darwin22.5.0
tgt config macos_13-clang_14.0-static_O3
timestamp 2024-03-27 11:13:35 UTC (01 01:44:09 days ago)
result error (update) | log | rebuild
toolchain public-0.16.0
target x86_64-linux-gnu
tgt config linux_debian_12-clang_16.0-O3
timestamp 2024-03-27 11:11:36 UTC (01 01:46:09 days ago)
result error (update) | log | rebuild
toolchain public-0.16.0
target x86_64-linux-gnu
tgt config linux_debian_12-clang_16.0_libc++-static_O3
timestamp 2024-03-27 11:11:07 UTC (01 01:46:37 days ago)
result error (update) | log | rebuild
toolchain public-0.16.0
target x86_64-linux-gnu
tgt config linux_debian_12-clang_16.0_libc++-O3
timestamp 2024-03-27 11:11:03 UTC (01 01:46:41 days ago)
result error (update) | log | rebuild
toolchain public-0.16.0
target x86_64-apple-darwin22.5.0
tgt config macos_13-clang_15.0-static_O3
timestamp 2024-03-27 11:10:04 UTC (01 01:47:41 days ago)
result error (update) | log | rebuild
toolchain public-0.16.0
target x86_64-apple-darwin22.5.0
tgt config macos_13-clang_15.0-O3
timestamp 2024-03-27 11:09:19 UTC (01 01:48:25 days ago)
result error (update) | log | rebuild
toolchain public-0.16.0
target x86_64-apple-darwin22.5.0
tgt config macos_13-clang_15.0
timestamp 2024-03-27 11:08:34 UTC (01 01:49:10 days ago)
result error (update) | log | rebuild
toolchain public-0.16.0
target x86_64-linux-gnu
tgt config linux_debian_12-clang_16.0
timestamp 2024-03-27 11:08:07 UTC (01 01:49:37 days ago)
result error (update) | log | rebuild
toolchain public-0.16.0
target x86_64-linux-gnu
tgt config linux_debian_12-clang_16.0_libc++
timestamp 2024-03-27 11:06:56 UTC (01 01:50:49 days ago)
result error (update) | log | rebuild
toolchain public-0.16.0
target x86_64-linux-gnu
tgt config linux_fedora_38-gcc_13-bindist
timestamp 2024-03-27 11:00:33 UTC (01 01:57:11 days ago)
result error (update) | log | rebuild
toolchain public-0.16.0
target x86_64-freebsd13.2
tgt config freebsd_13-clang_14.0
timestamp 2024-03-27 10:55:05 UTC (01 02:02:40 days ago)
result error (update) | log | rebuild
toolchain public-0.16.0
target x86_64-freebsd13.2
tgt config freebsd_13-clang_14.0-static_O3
timestamp 2024-03-27 10:54:39 UTC (01 02:03:06 days ago)
result error (update) | log | rebuild
toolchain public-0.16.0
target x86_64-freebsd13.2
tgt config freebsd_13-clang_14.0-O3
timestamp 2024-03-27 10:53:44 UTC (01 02:04:01 days ago)
result error (update) | log | rebuild
toolchain public-0.16.0
target aarch64-linux-gnu
tgt config linux_debian_12-gcc_13
timestamp 2024-03-27 10:53:11 UTC (01 02:04:33 days ago)
result error (update) | log | rebuild
toolchain public-0.16.0
target x86_64-linux-gnu
tgt config linux_debian_12-gcc_13.1-ndebug_O3
timestamp 2024-03-27 10:49:56 UTC (01 02:07:48 days ago)
result error (update) | log | rebuild
toolchain public-0.16.0
target x86_64-linux-gnu
tgt config linux_debian_12-gcc_13.1-static_O3
timestamp 2024-03-27 10:49:51 UTC (01 02:07:53 days ago)
result error (update) | log | rebuild
toolchain public-0.16.0
target x86_64-linux-gnu
tgt config linux_debian_12-gcc_13.1
timestamp 2024-03-27 10:48:27 UTC (01 02:09:18 days ago)
result error (update) | log | rebuild
toolchain public-0.16.0
target x86_64-linux-gnu
tgt config linux_debian_12-gcc_13.1-O3
timestamp 2024-03-27 10:47:53 UTC (01 02:09:51 days ago)
result error (update) | log | rebuild
toolchain public-0.16.0
target aarch64-linux-gnu
tgt config linux_debian_12-gcc_13-O3
timestamp 2024-03-27 10:43:38 UTC (01 02:14:07 days ago)
result error (update) | log | rebuild
toolchain public-0.16.0
target aarch64-linux-gnu
tgt config linux_debian_12-gcc_13-ndebug_O3
timestamp 2024-03-27 10:41:56 UTC (01 02:15:48 days ago)
result error (update) | log | rebuild
toolchain public-0.16.0
target aarch64-linux-gnu
tgt config linux_debian_12-gcc_13-static_O3
timestamp 2024-03-27 10:40:55 UTC (01 02:16:50 days ago)
result error (update) | log | rebuild
toolchain public-0.16.0
target aarch64-linux-gnu
tgt config linux_debian_11-gcc_12
timestamp 2024-03-27 10:38:40 UTC (01 02:19:05 days ago)
result warning (update) | log | rebuild
toolchain public-0.16.0
target x86_64-freebsd12.4
tgt config freebsd_12-clang_13.0
timestamp 2024-03-27 10:38:08 UTC (01 02:19:37 days ago)
result error (update) | log | rebuild
toolchain public-0.16.0
target aarch64-linux-gnu
tgt config linux_debian_12-clang_15_libc++
timestamp 2024-03-27 10:30:56 UTC (01 02:26:49 days ago)
result error (update) | log | rebuild
toolchain public-0.16.0
target aarch64-linux-gnu
tgt config linux_debian_12-clang_15
timestamp 2024-03-27 10:30:20 UTC (01 02:27:25 days ago)
result error (update) | log | rebuild
toolchain public-0.16.0
target aarch64-linux-gnu
tgt config linux_debian_12-clang_16-static_O3
timestamp 2024-03-26 12:31:50 UTC (02 00:25:55 days ago)
result error (update) | log | rebuild
toolchain public-0.16.0
target aarch64-linux-gnu
tgt config linux_debian_12-clang_16_libc++-static_O3
timestamp 2024-03-26 12:30:07 UTC (02 00:27:38 days ago)
result error (update) | log | rebuild
toolchain public-0.16.0
target aarch64-linux-gnu
tgt config linux_debian_12-clang_16_libc++
timestamp 2024-03-26 12:28:25 UTC (02 00:29:19 days ago)
result error (update) | log | rebuild
toolchain public-0.16.0
target aarch64-linux-gnu
tgt config linux_debian_12-clang_16_libc++-O3
timestamp 2024-03-26 12:25:07 UTC (02 00:32:37 days ago)
result error (update) | log | rebuild
toolchain public-0.16.0
target aarch64-linux-gnu
tgt config linux_debian_12-clang_16-O3
timestamp 2024-03-26 12:22:52 UTC (02 00:34:53 days ago)
result error (update) | log | rebuild
toolchain public-0.16.0
target aarch64-linux-gnu
tgt config linux_debian_12-clang_16
timestamp 2024-03-26 12:22:12 UTC (02 00:35:33 days ago)
result error (update) | log | rebuild
toolchain public-0.16.0
target wasm32-emscripten
tgt config linux_debian_11-emcc_3.1.6
timestamp 2024-03-26 10:12:11 UTC (02 02:45:33 days ago)
result error (update) | log | rebuild
target x86_64-w64-mingw32
tgt config windows_10-gcc_12.2_mingw_w64
result excluded (only use msvc on Windows)
target x86_64-w64-mingw32
tgt config windows_10-gcc_12.2_mingw_w64-O2
result excluded (only use msvc on Windows)
target x86_64-w64-mingw32
tgt config windows_10-gcc_12.2_mingw_w64-static_O2
result excluded (only use msvc on Windows)
target x86_64-microsoft-win32-msvc14.3
tgt config windows_10-msvc_17.5
result excluded (only use msvc on Windows)
target x86_64-microsoft-win32-msvc14.3
tgt config windows_10-msvc_17.6
result excluded (only use msvc on Windows)
target x86_64-microsoft-win32-msvc14.3
tgt config windows_10-msvc_17.6-O2
result excluded (only use msvc on Windows)
target x86_64-microsoft-win32-msvc14.3
tgt config windows_10-msvc_17.6-static_O2
result excluded (only use msvc on Windows)
target x86_64-microsoft-win32-msvc14.3
tgt config windows_10-clang_15.0_msvc_msvc_17.6
result excluded (only use msvc on Windows)
target x86_64-microsoft-win32-msvc14.3
tgt config windows_10-clang_16.0_llvm_msvc_17.6
result excluded (only use msvc on Windows)
target x86_64-microsoft-win32-msvc14.3
tgt config windows_10-clang_16.0_llvm_msvc_17.6-O2
result excluded (only use msvc on Windows)
target x86_64-microsoft-win32-msvc14.3
tgt config windows_10-clang_16.0_llvm_msvc_17.6-static_O2
result excluded (only use msvc on Windows)