Click here to Skip to main content
15,902,636 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Multiple calls to WaitForSingleObject within the same thread Pin
Michael Dunn19-Aug-02 17:05
sitebuilderMichael Dunn19-Aug-02 17:05 
Generaltemplate question Pin
Ancient Dragon19-Aug-02 14:53
Ancient Dragon19-Aug-02 14:53 
GeneralRe: template question Pin
Chris Losinger19-Aug-02 16:53
professionalChris Losinger19-Aug-02 16:53 
GeneralCommand Message Handlers Pin
Stew19-Aug-02 14:34
Stew19-Aug-02 14:34 
GeneralRe: Command Message Handlers Pin
567890123419-Aug-02 20:46
567890123419-Aug-02 20:46 
Generalhtml documentation template Pin
Wes Jones19-Aug-02 12:54
Wes Jones19-Aug-02 12:54 
QuestionWhen to use "inline"? Pin
User 665819-Aug-02 12:16
User 665819-Aug-02 12:16 
AnswerRe: When to use "inline"? Pin
Christian Graus19-Aug-02 12:33
protectorChristian Graus19-Aug-02 12:33 
Gregor S. wrote:
Is it a good way to use the "inline" statement?

No, that has nothing to do with it.


Gregor S. wrote:
And what is it actually for?

The idea of inline is you tell the compiler that a function is so small that it should be written
'in place' where it is called, rather than written once and then called via function calls. You can consider it similar to a macro, in that you write it once, but it gets expanded 'in place' where-ever you call it. Big caveat coming though.....

Gregor S. wrote:
When is it suitable to use it?

Whenever you have a very small function that you think will be called a lot and you want to improve performance.


Gregor S. wrote:
The MSDN documentation didn't really help me.

There's a surprise Blush | :O ) The M$ guys don't really know C++ that well, or at least that's what you'd think if you read MSDN for anything that is to do with the standard.

Speaking of which - the caveat. In the standard, inline is a SUGGESTION to the compiler, it is free to ignore you, and free to inline something itself if it feels it should. Therefore, there is almost no value in the inline keyword.



Christian

We're just observing the seasonal migration from VB to VC. Most of these birds will be killed by predators or will die of hunger. Only the best will survive - Tomasz Sowinski 29-07-2002 ( on the number of newbie posters in the VC forum )

Cats, and most other animals apart from mad cows can write fully functional vb code. - Simon Walton - 6-Aug-2002
GeneralRe: When to use "inline"? Pin
User 665819-Aug-02 12:38
User 665819-Aug-02 12:38 
GeneralRe: When to use "inline"? Pin
Nick Hodapp19-Aug-02 13:12
sitebuilderNick Hodapp19-Aug-02 13:12 
GeneralRe: When to use "inline"? Pin
Christian Graus19-Aug-02 13:17
protectorChristian Graus19-Aug-02 13:17 
GeneralRe: When to use "inline"? Pin
Nick Hodapp19-Aug-02 13:27
sitebuilderNick Hodapp19-Aug-02 13:27 
GeneralRe: When to use "inline"? Pin
Christian Graus19-Aug-02 13:46
protectorChristian Graus19-Aug-02 13:46 
GeneralRe: When to use "inline"? Pin
Nick Hodapp19-Aug-02 14:06
sitebuilderNick Hodapp19-Aug-02 14:06 
GeneralRe: When to use "inline"? Pin
Daniel Lohmann19-Aug-02 23:42
Daniel Lohmann19-Aug-02 23:42 
GeneralRe: When to use "inline"? Pin
Mike Nordell12-Sep-02 6:40
Mike Nordell12-Sep-02 6:40 
GeneralRe: When to use "inline"? Pin
Stuart Dootson19-Aug-02 14:05
professionalStuart Dootson19-Aug-02 14:05 
GeneralRe: When to use "inline"? Pin
Nick Hodapp19-Aug-02 14:37
sitebuilderNick Hodapp19-Aug-02 14:37 
GeneralRe: When to use "inline"? Pin
Stuart Dootson19-Aug-02 15:07
professionalStuart Dootson19-Aug-02 15:07 
GeneralRe: When to use "inline"? Pin
Mustafa Demirhan19-Aug-02 14:03
Mustafa Demirhan19-Aug-02 14:03 
GeneralRe: When to use "inline"? Pin
Chris Maunder19-Aug-02 14:36
cofounderChris Maunder19-Aug-02 14:36 
GeneralRe: When to use "inline"? Pin
Mustafa Demirhan20-Aug-02 8:05
Mustafa Demirhan20-Aug-02 8:05 
GeneralRe: When to use "inline"? Pin
Chris Maunder20-Aug-02 17:03
cofounderChris Maunder20-Aug-02 17:03 
AnswerRe: When to use "inline"? Pin
Ed Gadziemski19-Aug-02 12:38
professionalEd Gadziemski19-Aug-02 12:38 
AnswerRe: When to use "inline"? Pin
Le centriste19-Aug-02 12:56
Le centriste19-Aug-02 12:56 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.