But he can write the code in such a way to facilitate the compiler.
1 2 3 4 5 6 7 8 9 10 11
// some header file:
#ifndef FOO_H
#define FOO_H
void general_func( int a, int b, int c );
inlinevoid specialized_func( int a, int b ) {
general_func( a, b, 4 );
}
#endif
gives the compiler the best chance to optimize away the function call to
specialized_func in the user's code.
If it's an option given by the compiler, I'll read its documantation...but I have one last question: how do I recognize a function call in the assembly code (so that I'll be able to tell whether a function has been inlined or not)?