I'd like to do in c++
FunctionAXPY f; f.eval(values,x);
If you look at the FunctionAXPY class it is just a light weight container of pairs of scalars and Functions. It can be used to assign to Functions, so try:
FunctionAXPY
Function v(V); v = f; v.eval(values, x);