M
Mani
Experts, I would like to know how inline, 'static inline' and 'extern
inline' functions differs. Which one should be used when.
inline' functions differs. Which one should be used when.
Mani said:Experts, I would like to know how inline, 'static inline' and 'extern
inline' functions differs. Which one should be used when.
Experts, I would like to know how inline, 'static inline' and 'extern
inline' functions differs. Which one should be used when.
Öö Tiib said:In C++ 'inline' keyword is an hint to compiler that the function may
be inlined. Compiler has still quite free hands to inline or not to
inline what it pleases as long it does not cause externally visible
side effects.
Biggest effects of 'inline' keyword in C++ are that the definition of
function must be in code before the code calling it and that inline
function may be defined in the header file without getting linker
errors about that function being defined in several translation units
that did include the header file.
Experts, I would like to know how inline, 'static inline' and 'extern
inline' functions differs. Which one should be used when.
Experts, I would like to know how inline, 'static inline' and 'extern
inline' functions differs. Which one should be used when.
Virchanza said:static inline int Func() { return 5; }
The "static" keyword won't have any noticeable effect upon an inline
function unless the function contains a static object, e.g.:
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.