The inline specifier indicates the compiler that inline
substitution is preferred to the usual function call mechanism for a
specific function. This does not change the behavior of a function
itself, but is used to suggest to the compiler that the code generated
by the function body is inserted at each point the function is called,
instead of being inserted only once and perform a regular call to it,
which generally involves some additional overhead in running time.
The format for its declaration is:
inline type name ( arguments ... ) { instructions ... }
and the call is just like the call to any other function. You do not have to include the inline keyword when calling the function, only in its declaration.
Most compilers already optimize code to generate inline functions when it is more convenient. This specifier only indicates the compiler that inline is preferred for this function.
The format for its declaration is:
inline type name ( arguments ... ) { instructions ... }
and the call is just like the call to any other function. You do not have to include the inline keyword when calling the function, only in its declaration.
Most compilers already optimize code to generate inline functions when it is more convenient. This specifier only indicates the compiler that inline is preferred for this function.
Comments
Post a Comment
https://gengwg.blogspot.com/