A header-only C++14 library providing push-based pipelines for expressive collection processing with operators like filter, transform, and fork.
Pipes is a header-only C++ library that provides a pipeline abstraction for processing collections with expressive, chainable operations. It allows developers to write clear, functional-style code for transforming, filtering, and routing data through small, reusable components. The library solves the problem of verbose or complex collection manipulation by offering a push-based model where data flows from sources through operations to destinations.
C++ developers working with collections who want to write more readable and maintainable data processing code, especially those interested in functional programming patterns or needing operations beyond standard algorithms.
Developers choose Pipes for its unique push-based design, which enables operations like forking and multiplexing that are difficult with range adaptors, seamless integration with STL algorithms as output iterators, and a clean, composable syntax that reduces boilerplate.
Pipelines for expressive code on collections in C++
The >>= operator allows clear chaining of operations like transform and filter, reducing boilerplate compared to manual loops or nested STL calls, as shown in the first example with vectors.
Enables fork and unzip for splitting data streams to multiple destinations, which is difficult with pull-based ranges, demonstrated in the branching pipeline example with graphical representation.
Pipes can serve as output iterators for standard algorithms like std::copy, allowing custom pipelines to replace traditional output iterators without modifying algorithm calls.
Directly reads from input streams and writes to output streams within pipelines, simplifying I/O operations, as seen in the example with std::cin and to_out_stream.
The README explicitly states the library is 'under development and subject to change,' risking breaking updates and making it less suitable for production code without careful versioning.
Unlike ranges, Pipes is push-based and requires finite data sources, limiting use cases for lazy or infinite sequences, which the README admits as a range capability pipes can't do.
Being a template-heavy header-only library, it can increase compilation times and code bloat compared to compiled alternatives, especially in large projects.
stb single-file public domain libraries for C/C++
A modern formatting library
Extremely fast non-cryptographic hash algorithm
List of single-file C/C++ libraries, with emphasis on clause-less licenses.
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.