Our great sponsors
-
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.
-
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#.
-
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.
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](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 :)
Have you seen libflow? It's also built on the same model (Rust-style iterators), curious how they compare.
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. :-)
How does it compare to https://github.com/mrange/cpplinq