Re: What is the gain of "inline"
- From: "Dik T. Winter" <Dik.Winter@xxxxxx>
- Date: Fri, 11 Dec 2009 03:27:31 GMT
In article <421dd75c-e08e-44ee-acbb-fa832c142dc4@xxxxxxxxxxxxxxxxxxxxxxxxxxxx> gwowen <gwowen@xxxxxxxxx> writes:
On Dec 10, 8:39=A0am, gwowen <gwo...@xxxxxxxxx> wrote:
I can only think of one place where C++ mandates inline (in
the absence of an explicit "inline" and thats when the definition of a
member function is included in the class definition. =A0What are the
others?
Reference to r7.1.2 [dcl.fct.spec] in the C++ standard confirms this.
A function in C++ is never mandated to be inline. The keyword is only
ever a hint, but member functions defined with a class definition are
implicitly specified as if declared "inline".
So even in that case it is no more than a hint. So apparently C++ *never*
mandates an actual inline.
--
dik t. winter, cwi, science park 123, 1098 xg amsterdam, nederland, +31205924131
home: bovenover 215, 1025 jn amsterdam, nederland; http://www.cwi.nl/~dik/
.
- Follow-Ups:
- Re: What is the gain of "inline"
- From: gwowen
- Re: What is the gain of "inline"
- References:
- Re: What is the gain of "inline"
- From: jacob navia
- Re: What is the gain of "inline"
- From: gwowen
- Re: What is the gain of "inline"
- From: gwowen
- Re: What is the gain of "inline"
- Prev by Date: Re: Pointer and string literal question
- Next by Date: Re: What is the gain of "inline"
- Previous by thread: Re: What is the gain of "inline"
- Next by thread: Re: What is the gain of "inline"
- Index(es):
Relevant Pages
|