☰ Menu
CLI Open source 5 installs/mo

range-v3 for Mac

range-v3

Experimental range library for C++14/17/20

range-v3 — overview


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 abstraction 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): Usage: Talk: CppCon 2015: Eric Niebler "Ranges for the Standard Library", 2015. A slice of Python in C++, 07.12.2014. Actions (back then called Container Algorithms), 23.11.2014. Range comprehensions, 27.04.2014. Input iterators vs input ranges, 07.11.2013. Design / Implementation: Rationale behind range-v3: N4128: Ranges for the standard library Revision 1, 2014. Ranges TS: N4560: C++ Extensions for Ranges, 2015. Implementation of customization points in range-v3: N4381: Suggested Design for Customization Points, 2015. P0386: Inline variables, 2016. Customization Point Design in C++11 and Beyond, 2014. Proxy iterators in range-v3: D0022: Proxy Iterators for the Ranges Extensions. To Be or Not to Be (an Iterator), 2015. Iterators++: Part1, 2015. Iterators++: Part2, 2015. Iterators++: Part3, 2015. Metaprogramming utilities: See the meta documentation, the library has changed significantly since the 2014 blog post. Concept emulation layer: Concept checking in C++11, 2013. C++Now 2014: Eric Niebler "C++11 Library Design", 2014.

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

Details

C 14/17/20 的实验范围库

How to install range-v3

  1. Open Terminal (press ⌘ + Space and type “Terminal”).
  2. If Homebrew is not installed yet, run the command below first.
  3. Run this command:

Latest 10 releases

Last updated 2022-06-21; current version 0.12.0, with the latest 10 releases listed.

VersionReleasedTypeSizemacOSWindowsLinux
0.12.02022-06-21Stable————
0.11.02020-08-06Stable————
0.10.02019-12-07Stable————
0.9.02019-08-25Stable————
0.5.02019-04-30Stable————
0.4.02018-10-18Stable————
0.3.72018-09-20Stable————
0.3.62018-05-15Stable————
0.3.52018-02-17Stable————
0.3.02017-06-30Stable————

Data from GitHub Releases; stable releases first, each group sorted newest first.

Depended on by 1 apps

The following apps install it automatically, ranked by 30-day installs:

Compared with similar apps

Only public metadata is compared, with no subjective recommendation; see the compare pages for field-by-field comparisons.

Compared with similar apps
AppVersionLicenseArchitecture30-day installs
range-v30.12.0BSL-1.0CLI5
dirt1.1GPL-3.0-or-laterCLI7
boav0.22MIT OR UnlicenseCLI12
prips1.3.1GPL-2.0-or-laterCLI20

Similar apps: Command-line Tools

Leave a comment

评论表单加载中…