Re: Templates and Non-Inline Functions
- From: "Jonathan Wood" <jwood@xxxxxxxxxxxxxxxx>
- Date: Tue, 7 Mar 2006 10:09:54 -0700
Do you know of any references that discuss the size of a function being used
by Visual C++ to determine whether or not the function will be inline or
not?
Thanks.
--
Jonathan Wood
SoftCircuits
http://www.softcircuits.com
Available for consulting: http://www.softcircuits.com/jwood/resume.htm
"Bo Persson" <bop@xxxxxx> wrote in message
news:475q5iFdsg1tU1@xxxxxxxxxxxxxxxxx
"AliR" <AliR@xxxxxxxxxxxxx> skrev i meddelandet
news:440daf5c$0$28685$a8266bb1@xxxxxxxxxxxxxxxxxxxxxx
Yes you did. SomethingElse is not marked as inline and the body is not
within the class definition, so it's not going to be inlined.
Unless, of course, the compiler thinks it is a good idea to do that
anyway. :-)
If the function really is just a "return somethingelse", the compiler
might inline it however you define it.
Also, even if you specifically ask for a function to be inlined, the
compiler isn't required to obey. Sometimes it's not possible anyway.
The safest way to avoid inlining is to make the function too big.
Bo Persson
.
- References:
- Templates and Non-Inline Functions
- From: Jonathan Wood
- Re: Templates and Non-Inline Functions
- From: Jonathan Wood
- Re: Templates and Non-Inline Functions
- From: AliR
- Re: Templates and Non-Inline Functions
- From: Jonathan Wood
- Re: Templates and Non-Inline Functions
- From: AliR
- Re: Templates and Non-Inline Functions
- From: Jonathan Wood
- Re: Templates and Non-Inline Functions
- From: AliR
- Re: Templates and Non-Inline Functions
- From: Bo Persson
- Templates and Non-Inline Functions
- Prev by Date: Re: Determining if a file contents has changed
- Next by Date: Re: Templates and Non-Inline Functions
- Previous by thread: Re: Templates and Non-Inline Functions
- Next by thread: Re: Templates and Non-Inline Functions
- Index(es):
Relevant Pages
|