What is this programming technique known as

Of course this is true, but using templates (like <algorithm> from stl) gives the advantage that the passed lambda/function object can be inlined by compiler. Inlining gives massive boost in runtime and for me this is worth longer compilation times :wink:

In the case of using a traditional function pointer, I have doubts whether inlining is possible at all, and if so, probably under very restrictive conditions.

As always, everything depends on what’s your goal.