I have two questions:
1) Why are pointers to inline functions allowed in C++? I have read that the code of inline functions just gets copied to the function call stateme
You read old material. The main reason for using inline
nowdays is to allow function bodies in header files. Use of inline
keyword with a function signals to the linker that all instances of the function across translation units can be combined; having a non-inline function in a header that is included from multiple units causes undefined behaviour due to a One Definition Rule violation.
C++17 also adds inline variables, which have the same property that the variable can be defined in a header, and all definitions are combined by the linker instead of causing ODR violation.
The stuff you are talking about with "code getting copied to the calling function" is called inlining and is independent of the inline
keyword. The compiler will decide whether or not to do this, based on optimization settings, for non-inline functions as well as inline functions.