This rule is Obsolete | |
Synopsis: | Avoid the usage of inline methods/functions |
Language: | C++ |
Severity Level: | 6 |
Category: | Optimization and Performance |
Description: |
In general usage of inline methods and functions is discouraged. Be aware that the usage of inline code, may result in versioning problems. For example, this may happen for an inline method or function in a dynamic link library. When the implementation of this inline method is changed, but code using the inline method or function is not recompiled, it still uses the old implementation. In other words, replacing the dynamic link library with the latest version on a target machine, will no longer work. Using inline methods or functions is considered an optimization that is best performed by the compiler. Only in case performance is an issue, the usage of inline may be helpful. There are a few exceptions to this rule:
|
Literature References: |
Ellemtel Rec. 31 |
Ellemtel Rec. 45, adapted. |
ISC++ Style A. 15 |