I have a std::function pointing to a function. Inside this function I change the pointer to another function.
std::function fun;
It may come back to bite you if you do it without due consideration and in code documentation, but there is no logical reason why it won't work.
In c++, the address of a function is not needed, either within the function in the return coding.
If it didn't work in some language the complier probably wouldn't accept it - if it's a half decent compiler.