Showing posts with label inline functions. Show all posts
Showing posts with label inline functions. Show all posts

Thursday, 25 December 2014

Situations where inline expansion may not work

The inline keyword merely sends a request, not a command, to the compiler. The compiler may ignore this request if the function definition is too large or too complicated and compile the function as a normal function.

Some of the situation where inline expansion may not work are:

1. For functions returning value, if a loop, a switch, or a goto exists.
2. For functions not returning values, if a return statement exist.
3. If functions contain static variables.
4. If inline functions are recursive.