Development and Compile-Time Inlining Considerations

Inlined methods must logically appear in their class' headers. This is necessary to make the code bodies of inlined methods available to their invokers. Unfortunately this also means that any change in the body of an inlined method will necessitate the recompilation of every module that uses it—that is recompilation, not just relinking. For large programs this can actually increase a program's development time due to the amount of extra time consumed per compile.

Debugging of inlined code is complicated by the fact that single breakpoints cannot be used to track entry and exit from inlined methods. There are ways of using watchpoints to accomplish the same thing, though doing so hampers the ...

Get Efficient C++ Performance Programming Techniques now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.