Contrary to popular opinion, the keyword
inline is not some sort of magic bullet. It is, however, a useful tool when employed properly. The question is: When should you use it?
Does making a function
When and how should you decide to
1. What does
Making a function
inline directs the compiler that it may choose to place a copy of the function's code directly into each place the code is used. In the cases where the compiler does so, it avoids generating a function call.
2. Does making a function
Not necessarily. ...