CXXIter: A chainable c++20 LINQ-like iterator library

This page summarizes the projects mentioned and recommended in the original post on /r/cpp

Our great sponsors
  • WorkOS - The modern identity platform for B2B SaaS
  • InfluxDB - Power Real-Time Data Analytics at Scale
  • SaaSHub - Software Alternatives and Reviews
  • CXXIter

    Ergonomic C++ Iterator interface for STL containers

  • I thought it might be a nice opportunity to get to know C++20 in the process, so I first read up about the new features, and then started applying them to a little iterator library I call CXXIter... that then somehow ended up getting a little bigger and more ergonomic than I had expected. I took inspiration for functions and appearance from LINQ, as well as from Rust's iterators. CXXIter allows passing elements as references, as well as using moves to pass them through the iterator. I know that there already are a couple of these libraries - but what would programming be without a little NIH here and there? :)

  • range-v3

    Range library for C++14/17/20, basis for C++20's std::ranges

  • [range-v3](https://github.com/ericniebler/range-v3) which std::ranges was based on has the `to>()` which as far as I know is expected to get into c++23 :)

  • WorkOS

    The modern identity platform for B2B SaaS. The APIs are flexible and easy-to-use, supporting authentication, user identity, and complex enterprise features like SSO and SCIM provisioning.

    WorkOS logo
  • libflow

  • Have you seen libflow? It's also built on the same model (Rust-style iterators), curious how they compare.

  • fms_iterable

    iterators with explicit operator bool() const

  • Good stuff! I am a fan of LINQ and see you took pains to make your library performant (a common complaint against LINQ). My take on a more C++-y way of doing this is https://github.com/keithalewis/fms_iterable. An iterable is a C++ iterator with explicit operator bool() const to detect the end. The downside is I have to figure out how to translate this into the standard set of LINQ operators. Nowhere near as complete as your work but my main use case is implementing numerical algorithms. Maybe you'll find a pony in there. :-)

  • cpplinq

    LINQ for C++ (cpplinq) is an extensible C++11 library of higher-order functions for range manipulation. cpplinq draws inspiration from LINQ for C#.

  • How does it compare to https://github.com/mrange/cpplinq

  • InfluxDB

    Power Real-Time Data Analytics at Scale. Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.

    InfluxDB logo
NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts