Skip to content

Add `makeVirtualFunction` helper

Ansgar Burchardt requested to merge feature/makeVirtualFunction into master

The makeVirtualFunction helper allows to easily convert a lambda function (or any function object) to a VirtualFunction implementing the virtual evaluate method:

void doSomething(const VirtualFunction<double, double>& f);

auto f = makeVirtualFunction<double, double>(
    [](double x) { return x*x; });
doSomething(f);

Merge request reports

Loading