r/cpp • u/Weary-Inspector-4297 • Jun 17 '26
Function Composition Arc: C++17 -> C++20 -> C++23
For those that may be interested, I took a piece of educational code written years ago that composes an arbitrary number of functions and showed how to evolve it to take advantage of modern C++ features using ranges and functional programming.
37
Upvotes
View all comments
Show parent comment
8
u/StaticCoder Jun 17 '26
I don't see anything about
function<T(T)>that wouldn't have worked all the way back to C++11. Even earlier ifstd::functionhad existed.