C++: “auto” on anonymous functions

C++14 introduced an improvement to the way we can declare anonymous functions (a.k.a. lambda expressions).

For example, before C++14, if you wanted to pass an anonymous function to the sort algorithm, you had to do something like this:

Continue reading “C++: “auto” on anonymous functions”