Variable expansion: Use std::function internally

Authored by dhaumann on Oct 3 2019, 5:20 PM.

Description

Variable expansion: Use std::function internally

This change will end up in the public API for KF6, since with
std::function, we can capture scope, which is not possible
via a simple function pointer.

Details