definition of "implicit" inline?

Gabriel Dos Reis gdr@integrable-solutions.net
Thu Jul 31 11:04:00 GMT 2003


dewar@gnat.com (Robert Dewar) writes:

| > Let's keep it simple and straight.  The example you gave is just that
| > of an inline function, not implicit inline function.  There is nothing
| > implicit about it.  It is an alternate syntax for defining an inline
| > function.  Not a syntax for defining an implicit inline function.
| 
| I find this exegesis confusing and self serving.

No it is not exegis not confusing neither self servin, unless you don't 
know C++. 

| It seems quite fine to
| refer to the form without inline has being implicitly inlined. Whether the
| two forms should or should not be treated differently is another matter.

In C++, they are no different.  

| One might ask *why* are there two forms. Perhaps someone should quote the
| exact language from the standard here.

I already give the reasons at multiple occasions in this debate with
the appropriate quotes.
The reason is mostly historic (see "The Design and Evolution of C++",
section "Run-Time Efficiency").
When inlining was orginally introduced in C with Classes, the only
syntax available was definition within the class declaration and
inlining was considered only for member functions.  Later, the keyword
"inline" was introduced to permit inlining request for functions not
defined within a class.  There is no slight difference nor implication
that one form is superior to the other in terms of request.

-- Gaby



More information about the Gcc mailing list