inline command

Started by
41 comments, last by CProgrammer 20 years, 7 months ago
Nowadays I almost have to use __declspec(noinline) more than inline.
Advertisement
quote:Original post by Anonymous Poster
Oh that's what you're saying, is it?
*Shrug* I was writing that for conciseness because the whole topic is whether inline has valid uses besides optimization, and we had already tackled this issue.

Hmmm...

Antareus: Thinking about it, I have probably used the word "lazyness" too broadly. I should have said "convenience", I think.

I was responding to Lektrix' claim that inline improves abstraction and encapsulation, but I got carried away. I still feel that this is not true, but you're right in that the inline keyword probably has legitimate uses for "convenience".

Cédric

[edited by - Cedric on September 4, 2003 3:47:22 PM]
quote:Original post by Cedric
Shrug* I was writing that for conciseness because the whole topic is whether inline has valid uses besides optimization, and we had already tackled this issue.


No it wasn''t.

CProgrammer asked when he/she should use the keyword inline.

The answer is: It doesn''t matter. If you think something is a good candidate than try it. If you declare it inline, a good compiler will determine if it should be or not, and make the right choice. Worst case scenario, you wasted six keystrokes.

"Being Irish he had an abiding sense of tragedy that sustainted him through the temporary periods of joy." -- W.B. Yeats

This topic is closed to new replies.

Advertisement