When to use functors over lambdas
A lambda is a functor – just defined with a shorter syntax. The problem is that this syntax is limited. It doesn’t always allow you to solve a problem in the most efficient and flexible way – or at all. Until C++14, the operator() couldn’t even be a template. Furthermore, a lambda has exactly one … Read more