Hi Experts,

I got 3 sister concepts playing and colliding in my mind. I know each can be passed to another function. All of them seem to me like alternatives with subtle differences.

1. function pointer: a pointer to a function

2. function object: instance of a class that has overloaded the () operator; capable of acting as a function;

3. lambda function: an anonymous function (newly introduced in C++11) that may be defined on the spot and that exists only during the lifetime of the statement of which it is a part

Because of the subtilities, I wonder which of the 3 choices would be the most appropriate in a given scenario. So, experts out there, kindly shed some light (on some selection criteria?) so that I could decide and use them in different scenarios.

BR,
softwarelover