You just cannot. It's possible that it's not even a well-defined idea. Consider the following code as an example:
int f(int a) {
return (3*a)+1;
}
int g(int a) {
return (2*a)+1;
}
I doubt that happens in practise for this example because it would not be an optimization, but the compiler is allowed to insert a block of code that computes a+1 then returns and jump to that block from each of f and g's entry points (after doing a multiplication in each case). What is the size of f then? Should the size of the shared block be included? How about half that size? It just does not make sense in C++ to assert that the function f has a size.
A "pointer to f" may also be more than just the location of the function f. It undoubtedly gives