The reserved word inline used before a function’s return type instructs the compiler to insert a copy of that function into the program at each call to the function, rather than making the function call.
Use for very small often-used functions.
Makes execution faster because the overhead of the function-call is avoided.
Increases program size, memory footprint.
The compiler generally makes functions inline when it wishes, whether or not you asked it to. “Inline is considered a hint to the compiler not a command. That means compilers are free to ignore your inline directives whenever they want to, and it’s not hard to make them want to.” (Effective C++, Scott Myers, p.138)
Most likely ignored if your
function: