Sujet : what inline means?
De : thiago.adams (at) *nospam* gmail.com (Thiago Adams)
Groupes : comp.lang.cDate : 22. Nov 2024, 19:52:36
Autres entêtes
Organisation : A noiseless patient Spider
Message-ID : <vhqjtj$19sgb$1@dont-email.me>
User-Agent : Mozilla Thunderbird
My current thoughts.
- if the function is not defined (no implementation) then inline will define the function.
inline int f(){ return 1; }
inline int f(){ return 1; } //error already defined
- if the function is already defined somewhere then it is just a "view" of the code. (This view can be used to "inline code")
extern int f();
inline int f(){ return 1; } //ok
- if a inline function is declared and not define at current file then it is a warning
inline int f();//warning