Function pointers cannot be inlined unless their value is fully resolvable at compile time. Your case is not solvable.
In most cases, function pointers will never be inlined, even if the compiler can see which function is specified in the function.
source share