In this blog post, we’ll show how to implement a custom pipe operator and apply it to a data processing example. Thanks to C++23 and std::expectedwe can write a rather efficient framework that easily handles unexpected outcomes.
This is a collaborative guest post by prof. Bogusław Cyganek:
Prof. Cyganek is a researcher and lecturer at the Department of Electronics, AGH University of Science and Technology in Cracow, Poland.
I found this interesting as someone who really enjoys using the
|>
operator that’s present in a bunch of other languages. I also like how it uses “result or error”-like types to be able to report errors from the pipeline too.Highly unlikely that I’d ever use this in code I work with personally, but an interesting and fresh take. I definitely learned a few new interesting concepts from reading this!