What is the advantage of std::function<T1(T2)> over the original T1 (*)(T2)?
std::function<T1(T2)>
T1 (*)(T2)
std::function can hold function objects (including lambdas), as well as function pointers with the correct signature. So it is more versatile.
std::function