1, inline functions can be debugged, in the debug version does not realize true inline, release will be.
2. The function declaration and function Code of the inline function are placed in the symbol table (where the compiler collects and holds literal constants and certain symbolic constants), the compiler checks the function for type safety, and if correct replaces the calling statement, omitting the cost of the function call.
3. Assert is a macro that the debug version takes effect, not an inline function.
4, inline mechanism with macro efficiency, code security, the amount can be free to manipulate the data members of the class (this address is placed in the appropriate place, the macro cannot be done in preprocessing).
5. Inline functions and function body definitions are put together, and function declarations do not work (general function declarations do not add inline).
6. member functions in a class declaration are automatically converted into inline functions. (Constructors and destructors may call functions of the base class, so they cannot be easily converted to inline functions).
7, inline easily make code expansion too large, the function body has a loop or complex control structure, the execution function body code time to function calls more.
8, the compiler will optimize the inline function, automatically cancel the inline.
C + + inline functions