Cpp - Function Function Inline


If a C++ function is declared with the keyword inline, the compiler copies the code from the inline function directly into the place where the function was called.

The inline keyword is used in the function prototype:

inline int double(int); 

The function itself does not change:

int double(int target) 
    return 2 * target;